-
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.
Refactor bottom_actions Package view: Add partials:
- bottom_actions/bugzilla_owner - bottom_actions/branch_package - bottom_actions/submit_package - bottom_actions/edit_description - bottom_actions/delete_package - bottom_actions/cloud_upload - bottom_actions/trigger_services - bottom_actions/view_kiwi - bottom_actions/request_deletion - bottom_action/request_devel_project_change - bottom_action/request_role_adiction
- Loading branch information
Showing
12 changed files
with
63 additions
and
45 deletions.
There are no files selected for viewing
64 changes: 19 additions & 45 deletions
64
src/api/app/views/webui2/webui/package/_bottom_actions.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 |
---|---|---|
@@ -1,58 +1,32 @@ | ||
-# FIXME: Refactor this file | ||
%ul.list-inline.mb-0 | ||
- if bugowners_mail.present? && configuration['bugzilla_url'] | ||
%li.list-inline-item | ||
= link_to(bugzilla_url(bugowners_mail, "#{project.name}/#{package.name}: Bug"), class: 'nav-link') do | ||
%i.fas.fa-bug.text-danger | ||
Report Bug | ||
= render partial: 'webui2/webui/package/bottom_actions/bugzilla_owner', locals: { bugowners_mail: bugowners_mail, | ||
package_name: package.name, project_name: project.name } | ||
- unless User.current.is_nobody? | ||
- if current_rev | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#branch-modal' }) do | ||
%i.fas.fa-code-branch.text-primary | ||
Branch package | ||
%li.list-inline-item | ||
= link_to(package_submit_request_dialog_path(project: project, package: package, revision: revision), remote: true, class: 'nav-link') do | ||
%i.fas.fa-share-square.text-obs-yellow | ||
Submit package | ||
= render partial: 'webui2/webui/package/bottom_actions/branch_package' | ||
= render partial: 'webui2/webui/package/bottom_actions/submit_package', locals: { package: package, project: project, | ||
revision: revision } | ||
- if User.current.can_modify?(package) | ||
%li.list-inline-item | ||
= link_to(package_edit_path(project: project, package: package, spec_count: spec_count), class: 'nav-link') do | ||
%i.fas.fa-edit.text-info | ||
Edit description | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#delete-modal' }) do | ||
%i.fas.fa-times-circle.text-danger | ||
Delete package | ||
= render partial: 'webui2/webui/package/bottom_actions/edit_description', locals: { project: project, package: package, spec_count: spec_count } | ||
= render partial: 'webui2/webui/package/bottom_actions/delete_package' | ||
|
||
- Feature.with(:kiwi_image_editor) do | ||
- if package.kiwi_image? && policy(package).update? | ||
%li.list-inline-item | ||
= link_to(import_kiwi_image_path(package.id), id: 'edit-kiwi', class: 'nav-link') do | ||
%i.fas.fa-compact-disc.text-primary | ||
View Image | ||
- if Feature.active?(:cloud_upload) && !User.current.is_nobody? | ||
= render partial: 'webui2/webui/package/bottom_actions/view_kiwi', locals: { package_id: package.id } | ||
|
||
- if Feature.active?(:cloud_upload) | ||
- if package.kiwi_image? | ||
%li.list-inline-item | ||
= link_to(cloud_upload_index_path, id: 'cloud-upload', class: 'nav-link') do | ||
%i.fas.fa-cloud-upload-alt.text-info | ||
Cloud Upload | ||
= render partial: 'webui2/webui/package/bottom_actions/cloud_upload', locals: { cloud_upload_index_path: cloud_upload_index_path } | ||
|
||
- if services.present? | ||
%li.list-inline-item | ||
= link_to(package_trigger_services_path(package: package, project: project), method: :post, class: 'nav-link') do | ||
%i.fas.fa-project-diagram.text-obs-yellow | ||
Trigger services | ||
= render partial: 'webui2/webui/package/bottom_actions/trigger_services', locals: { package: package, project: project } | ||
|
||
- else | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#add-role-modal' }) do | ||
%i.fas.fa-user-plus.text-primary | ||
Request role addition | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#delete-request-modal' }) do | ||
%i.fas.fa-list-alt.text-danger | ||
Request deletion | ||
= render partial: 'webui2/webui/package/bottom_actions/request_role_addition' | ||
= render partial: 'webui2/webui/package/bottom_actions/request_deletion' | ||
|
||
//TODO: only users w/o rights should see this, maintainers should get a different dialog: | ||
- if package.develpackage | ||
%li.list-inline-item | ||
= link_to(request_change_devel_dialog_path(project: project, package: package), remote: true, class: 'nav-link') do | ||
%i.fas.fa-exchange-alt.text-primary | ||
Request devel project change | ||
= render partial: 'webui2/webui/package/bottom_actions/request_devel_project_change', locals: { package: package, project: project } |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_branch_package.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,4 @@ | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#branch-modal' }) do | ||
%i.fas.fa-code-branch.text-primary | ||
Branch package |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_bugzilla_owner.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,4 @@ | ||
%li.list-inline-item | ||
= link_to(bugzilla_url(bugowners_mail, "#{project_name}/#{package_name}: Bug"), class: 'nav-link') do | ||
%i.fas.fa-bug.text-danger | ||
Report Bug |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_cloud_upload.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,4 @@ | ||
%li.list-inline-item | ||
= link_to(cloud_upload_index_path, id: 'cloud-upload', class: 'nav-link') do | ||
%i.fas.fa-cloud-upload-alt.text-info | ||
Cloud Upload |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_delete_package.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,4 @@ | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#delete-modal' }) do | ||
%i.fas.fa-times-circle.text-danger | ||
Delete package |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_edit_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,4 @@ | ||
%li.list-inline-item | ||
= link_to(package_edit_path(project: project, package: package, spec_count: spec_count), class: 'nav-link') do | ||
%i.fas.fa-edit.text-info | ||
Edit description |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_request_deletion.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,4 @@ | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#delete-request-modal' }) do | ||
%i.fas.fa-list-alt.text-danger | ||
Request deletion |
4 changes: 4 additions & 0 deletions
4
...api/app/views/webui2/webui/package/bottom_actions/_request_devel_project_change.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,4 @@ | ||
%li.list-inline-item | ||
= link_to(request_change_devel_dialog_path(project: project, package: package), remote: true, class: 'nav-link') do | ||
%i.fas.fa-exchange-alt.text-primary | ||
Request devel project change |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_request_role_addition.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,4 @@ | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#add-role-modal' }) do | ||
%i.fas.fa-user-plus.text-primary | ||
Request role addition |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_submit_package.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,4 @@ | ||
%li.list-inline-item | ||
= link_to(package_submit_request_dialog_path(project: project, package: package, revision: revision), remote: true, class: 'nav-link') do | ||
%i.fas.fa-share-square.text-obs-yellow | ||
Submit package |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_trigger_services.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,4 @@ | ||
%li.list-inline-item | ||
= link_to(package_trigger_services_path(package: package, project: project), method: :post, class: 'nav-link') do | ||
%i.fas.fa-project-diagram.text-obs-yellow | ||
Trigger services |
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/package/bottom_actions/_view_kiwi.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,4 @@ | ||
%li.list-inline-item | ||
= link_to(import_kiwi_image_path(package_id), id: 'edit-kiwi', class: 'nav-link') do | ||
%i.fas.fa-compact-disc.text-primary | ||
View Image |