forked from openSUSE/open-build-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openSUSE#16642 from danidoni/edit-label-templates
Edit label templates
- Loading branch information
Showing
5 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,12 @@ def index? | |
|
||
true | ||
end | ||
|
||
def edit? | ||
index? | ||
end | ||
|
||
def update? | ||
index? | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
src/api/app/views/webui/projects/label_templates/edit.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- @pagetitle = "Edit label template \"#{@label_template.name}\" for #{@project}" | ||
.card | ||
= render(partial: 'webui/project/tabs', locals: { project: @project }) | ||
|
||
.card-body | ||
%h3= @pagetitle | ||
.row | ||
.col-12.col-md-10.col-lg-8 | ||
= form_with(model: @label_template, url: project_label_template_path(project_name: @project, id: @label_template), method: :put) do |f| | ||
.row | ||
.col-12.col-md-10.col-lg-9 | ||
.mb-3#name | ||
= f.label(:name, 'Name:') | ||
= f.text_field(:name, class: 'form-control') | ||
.mb-3#color | ||
= f.label(:color, 'Color:') | ||
= f.color_field(:color, class: 'form-control') | ||
.actions | ||
= link_to('Cancel', project_label_templates_path(@project), title: 'Cancel', class: 'btn btn-outline-secondary px-4 me-3 mt-3 mt-sm-0') | ||
= f.submit('Update', class: 'btn btn-primary px-4 mt-3 mt-sm-0') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters