Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't show dependencies table if gem/rpm has no dependencies

	modified:   app/views/fedorarpms/show.html.haml
	modified:   app/views/rubygems/show.html.haml
	modified:   locale/app.pot
	modified:   locale/es/app.po
  • Loading branch information...
commit b1fabde5d8c1cadb4d61dbdf4354f9be7735921c 1 parent 468be55
nicolassatragno authored
View
31 app/views/fedorarpms/show.html.haml
@@ -16,22 +16,25 @@
%p= link_to _('Maintainer: %{maintainer_email}') % { :maintainer_email => @rpm.obfuscated_fedora_user }, fedorarpm_path(@rpm.fedora_user.split("@").first + "/by_owner")
%label= _('Versions: %{rpm_versions}') % { :rpm_versions => @rpm.versions}
%label= _('Git Commits: %{rpm_commits}') % { :rpm_commits => @rpm.commits}
- %label= _('Depends on:')
-
- %table.table.table-striped.table-condensed.dependency
- %thead
- %tr
- %th= _('Package')
- -FedoraRpm::FEDORA_VERSIONS.each do |t, g|
- %th= t
- %th= _('Gem Version')
- %tbody
- - @dependencies.each do |d|
+ - if @dependencies.blank?
+ %label= _('No dependencies')
+ - else
+ %label= _('Depends on:')
+
+ %table.table.table-striped.table-condensed.dependency
+ %thead
%tr
- %td= link_to d.name, fedorarpm_path(d.name)
+ %th= _('Package')
-FedoraRpm::FEDORA_VERSIONS.each do |t, g|
- %td= d.version_for(t)
- %td= d.ruby_gem.version
+ %th= t
+ %th= _('Gem Version')
+ %tbody
+ - @dependencies.each do |d|
+ %tr
+ %td= link_to d.name, fedorarpm_path(d.name)
+ -FedoraRpm::FEDORA_VERSIONS.each do |t, g|
+ %td= d.version_for(t)
+ %td= d.ruby_gem.version
%label= _('Bugs:')
%table.table.table-striped.table-condensed.dependency
View
29 app/views/rubygems/show.html.haml
@@ -10,22 +10,25 @@
%label= _('Description:')
%label= @gem.description.blank? ? _('%{gem_name} does not have a description yet') % { :gem_name => @gem.name} : @gem.description
- %label= _('Depends on:')
+ - if @dependencies.blank?
+ %label= _('No dependencies')
+ - else
+ %label= _('Depends on:')
- %table.table.table-striped.table-condensed.dependency
- %thead
- %tr
- %th= _('Package')
- %th= _('Gem Version')
- -FedoraRpm::FEDORA_VERSIONS.each do |t, g|
- %th= t
- %tbody
- - @dependencies.each do |d|
+ %table.table.table-striped.table-condensed.dependency
+ %thead
%tr
- %td= link_to d.name, rubygem_path(d.name)
- %td= d.version
+ %th= _('Package')
+ %th= _('Gem Version')
-FedoraRpm::FEDORA_VERSIONS.each do |t, g|
- %td= d.fedora_rpm.version_for(t)
+ %th= t
+ %tbody
+ - @dependencies.each do |d|
+ %tr
+ %td= link_to d.name, rubygem_path(d.name)
+ %td= d.version
+ -FedoraRpm::FEDORA_VERSIONS.each do |t, g|
+ %td= d.fedora_rpm.version_for(t)
= render :partial => 'gemcomments/comments'
= render :partial => 'gemcomments/new_comment'
View
3  locale/app.pot
@@ -286,6 +286,9 @@ msgstr ""
msgid "Dependencies:"
msgstr ""
+msgid "No dependencies"
+msgstr ""
+
msgid "build with koji"
msgstr ""
View
3  locale/es/app.po
@@ -295,6 +295,9 @@ msgstr "RubyGems -> RPMs"
msgid "Dependencies:"
msgstr "Dependencias:"
+msgid "No dependencies"
+msgstr "Sin dependencias"
+
msgid "build with koji"
msgstr "construir con koji"
Please sign in to comment.
Something went wrong with that request. Please try again.