Skip to content

Commit

Permalink
Add show_linkinfo partial
Browse files Browse the repository at this point in the history
  • Loading branch information
vpereira committed Sep 14, 2018
1 parent 19caf77 commit 52bfe49
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
23 changes: 23 additions & 0 deletions src/api/app/views/webui2/webui/package/_show_linkinfo.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- linked_package = linkinfo[:package]
%li
%i.fas.fa-link.text-dark
Links to
- if linkinfo[:remote_project]
remote
%i
= linkinfo[:remote_project]
\/
= linked_package
- else
= project_or_package_link(project: linked_package.project.name, package: linked_package.name, short: true)
- if linkinfo[:error]
%li
%i.fas.fa-times-circle.text-danger
Link has errors:
%i= linkinfo[:error]
- elsif linkinfo[:diff]
%li
%i.fas.fa-info-circle.text-info
Has a
= link_to('link diff', package_rdiff_path(oproject: linked_package.project.name, opackage: linked_package.name,
project: project, package: package, rev: revision))
24 changes: 1 addition & 23 deletions src/api/app/views/webui2/webui/package/_side_links.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,6 @@
= render partial: 'show_derived_packages', locals: { package: package, project: project }

- if linkinfo
- linked_package = linkinfo[:package]
%li
%i.fas.fa-link.text-dark
Links to
- if linkinfo[:remote_project]
remote
%i
= linkinfo[:remote_project]
\/
= linked_package
- else
= project_or_package_link(project: linked_package.project.name, package: linked_package.name, short: true)
- if linkinfo[:error]
%li
%i.fas.fa-times-circle.text-danger
Link has errors:
%i= linkinfo[:error]
- elsif linkinfo[:diff]
%li
%i.fas.fa-info-circle.text-info
Has a
= link_to('link diff', package_rdiff_path(oproject: linked_package.project.name, opackage: linked_package.name,
project: project, package: package, rev: revision))
= render partial: 'show_linkinfo', locals: { package: package, project: project, linkinfo: linkinfo, revision: revision }

= render partial: 'extra_actions', locals: { project: project, package: package }

0 comments on commit 52bfe49

Please sign in to comment.