-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[webui] Add description editor for Kiwi packages
- Loading branch information
Evan Rolfe
committed
Oct 27, 2017
1 parent
28f59ee
commit 14cee74
Showing
6 changed files
with
117 additions
and
2 deletions.
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
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
44 changes: 44 additions & 0 deletions
44
src/api/app/views/webui/kiwi/images/_description.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,44 @@ | ||
#kiwi-description | ||
.nested-fields | ||
%h2#image-name | ||
= @image.name | ||
%p | ||
%span.fill{ data: { tag: 'specification' }}= @image.description.specification | ||
%ul.inline | ||
%li | ||
%strong Author: | ||
%span.fill{ data: { tag: 'author' }}= @image.description.author | ||
%li | ||
%strong Contact: | ||
%span.fill{ data: { tag: 'contact' }}= @image.description.contact | ||
%p | ||
= link_to sprited_text('package_edit', 'Edit details'), '#', class: 'description_edit' | ||
|
||
.dialog.darkgrey_box.hidden{ style: "width: 500px; left: 45%;" } | ||
.box.box-shadow | ||
%h2.box-header Edit Kiwi Details | ||
|
||
.dialog-content | ||
%p | ||
= f.label :name | ||
= f.text_field :name, data: { default: f.object.name } | ||
|
||
%p | ||
= f.fields_for :description, f.object.description do |description_fields| | ||
%p | ||
= description_fields.label :author | ||
= description_fields.text_field :author, data: { default: description_fields.object.author } | ||
%p | ||
= description_fields.label :contact | ||
= description_fields.text_field :contact, data: { default: description_fields.object.contact } | ||
%p | ||
= description_fields.label :specification | ||
= description_fields.text_field :specification, data: { default: description_fields.object.specification } | ||
|
||
%p#flash-messages | ||
%p.ui-state-error.ui-widget-shadow.hidden | ||
Kiwi Image name can not be empty! | ||
|
||
.dialog-buttons | ||
= link_to('Cancel', '#', title: 'Cancel', class: 'revert-dialog') | ||
= link_to('Continue', '#', title: 'Continue', class: 'close-description-dialog') |
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