Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions app/views/rubygems/_aside.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<div class="gem__aside l-col--r--pad">
<% if @latest_version.indexed %>
<div class="gem__downloads-wrap" data-href="<%= api_v1_download_path(@latest_version.full_name, :format => 'json') %>">
<h2 class="gem__downloads__heading t-text--s">
<%= t('stats.index.total_downloads') %>
<span class="gem__downloads"><%= number_with_delimiter(@rubygem.downloads) %></span>
</h2>
<h2 class="gem__downloads__heading t-text--s">
<%= t('.downloads_for_this_version') %>
<span class="gem__downloads"><%= number_with_delimiter(@latest_version.downloads_count) %></span>
</h2>
</div>
<% end %>

<% if @latest_version.indexed %>
<h2 class="gem__ruby-version__heading t-list__heading">
<%= t '.bundler_header' %>:
<div class="gem__code-wrap">
<input type="text" class="gem__code" id="gemfile_text" value="<%= @latest_version.to_bundler %>" readonly="readonly">
<span class="gem__code__icon" id="js-gem__code--gemfile" data-clipboard-target="#gemfile_text">=</span>
<span class="gem__code__tooltip--copy"><%= t('.copy_to_clipboard') %></span>
<span class="gem__code__tooltip--copied"><%= t('.copied') %></span>
</div>
</h2>
<h2 class="gem__ruby-version__heading t-list__heading">
<%= t '.install' %>:
<div class="gem__code-wrap">
<input type="text" class="gem__code" id="install_text" value="<%= @latest_version.to_install %>" readonly="readonly">
<span class="gem__code__icon" id="js-gem__code--install" data-clipboard-target="#install_text">=</span>
</div>
</h2>
<h2 class="gem__ruby-version__heading t-list__heading">
<%= pluralized_licenses_header @latest_version %>:
<span class="gem__ruby-version">
<p><%= formatted_licenses @latest_version.licenses %></p>
</span>
</h2>
<% end %>

<h2 class="gem__ruby-version__heading t-list__heading">
<%= t('.required_ruby_version') %>:
<i class="gem__ruby-version">
<% if @latest_version.required_ruby_version %>
<%= @latest_version.required_ruby_version %>
<% else %>
<%= t('none') %>
<% end %>
</i>
</h2>

<% if @latest_version.required_rubygems_version != '>= 0' %>
<h2 class="gem__ruby-version__heading t-list__heading">
<%= t('.required_rubygems_version') %>:
<i class="gem__ruby-version">
<%= @latest_version.required_rubygems_version %>
</i>
</h2>
<% end %>

<h3 class="t-list__heading"><%= t '.links.header' %>:</h3>
<div class="t-list__items">
<%= link_to t('edit'), edit_rubygem_path(@rubygem), :class => "gem__link t-list__item", :id => "edit" if @rubygem.owned_by?(current_user) %>

<% if @latest_version.indexed %>
<% if @rubygem.linkset.present? %>
<%- Linkset::LINKS.each do |link| %>
<%= link_to_page link, @rubygem.linkset.public_send(link) %>
<%- end %>
<% end %>

<%= download_link(@latest_version) %>
<% end %>

<%= documentation_link(@latest_version, @rubygem.linkset) %>
<%= badge_link(@rubygem) %>
<%= subscribe_link(@rubygem) if @latest_version.indexed %>
<%= unsubscribe_link(@rubygem) %>
<%= atom_link(@rubygem) %>
<%= report_abuse_link(@rubygem) %>
</div>
</div>
82 changes: 1 addition & 81 deletions app/views/rubygems/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,85 +57,5 @@
<%= render partial: "rubygems/version_navigation", locals: { rubygem: @rubygem, latest_version: @latest_version } %>
</div>

<div class="gem__aside l-col--r--pad">
<% if @latest_version.indexed %>
<div class="gem__downloads-wrap" data-href="<%= api_v1_download_path(@latest_version.full_name, :format => 'json') %>">
<h2 class="gem__downloads__heading t-text--s">
<%= t('stats.index.total_downloads') %>
<span class="gem__downloads"><%= number_with_delimiter(@rubygem.downloads) %></span>
</h2>
<h2 class="gem__downloads__heading t-text--s">
<%= t('.downloads_for_this_version') %>
<span class="gem__downloads"><%= number_with_delimiter(@latest_version.downloads_count) %></span>
</h2>
</div>
<% end %>

<% if @latest_version.indexed %>
<h2 class="gem__ruby-version__heading t-list__heading">
<%= t '.bundler_header' %>:
<div class="gem__code-wrap">
<input type="text" class="gem__code" id="gemfile_text" value="<%= @latest_version.to_bundler %>" readonly="readonly">
<span class="gem__code__icon" id="js-gem__code--gemfile" data-clipboard-target="#gemfile_text">=</span>
<span class="gem__code__tooltip--copy"><%= t('.copy_to_clipboard') %></span>
<span class="gem__code__tooltip--copied"><%= t('.copied') %></span>
</div>
</h2>
<h2 class="gem__ruby-version__heading t-list__heading">
<%= t '.install' %>:
<div class="gem__code-wrap">
<input type="text" class="gem__code" id="install_text" value="<%= @latest_version.to_install %>" readonly="readonly">
<span class="gem__code__icon" id="js-gem__code--install" data-clipboard-target="#install_text">=</span>
</div>
</h2>
<h2 class="gem__ruby-version__heading t-list__heading">
<%= pluralized_licenses_header @latest_version %>:
<span class="gem__ruby-version">
<p><%= formatted_licenses @latest_version.licenses %></p>
</span>
</h2>
<% end %>

<h2 class="gem__ruby-version__heading t-list__heading">
<%= t('.required_ruby_version') %>:
<i class="gem__ruby-version">
<% if @latest_version.required_ruby_version %>
<%= @latest_version.required_ruby_version %>
<% else %>
<%= t('none') %>
<% end %>
</i>
</h2>

<% if @latest_version.required_rubygems_version != '>= 0' %>
<h2 class="gem__ruby-version__heading t-list__heading">
<%= t('.required_rubygems_version') %>:
<i class="gem__ruby-version">
<%= @latest_version.required_rubygems_version %>
</i>
</h2>
<% end %>

<h3 class="t-list__heading"><%= t '.links.header' %>:</h3>
<div class="t-list__items">
<%= link_to t('edit'), edit_rubygem_path(@rubygem), :class => "gem__link t-list__item", :id => "edit" if @rubygem.owned_by?(current_user) %>

<% if @latest_version.indexed %>
<% if @rubygem.linkset.present? %>
<%- Linkset::LINKS.each do |link| %>
<%= link_to_page link, @rubygem.linkset.public_send(link) %>
<%- end %>
<% end %>

<%= download_link(@latest_version) %>
<% end %>

<%= documentation_link(@latest_version, @rubygem.linkset) %>
<%= badge_link(@rubygem) %>
<%= subscribe_link(@rubygem) if @latest_version.indexed %>
<%= unsubscribe_link(@rubygem) %>
<%= atom_link(@rubygem) %>
<%= report_abuse_link(@rubygem) %>
</div>
</div>
<%= render "rubygems/aside" %>
</div>
21 changes: 11 additions & 10 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,7 @@ de:
index:
title: 'Gems'
downloads: Downloads
show:
not_hosted_notice: Dieses Gem wird aktuell nicht auf RubyGems.org gehostet.
install: installieren
authors_header: Autoren
downloads_for_this_version: "Für diese Version"
owners_header: Besitzer
aside:
links:
header: Links
home: Startseite
Expand All @@ -129,16 +124,22 @@ de:
report_abuse: Missbrauch melden
badge: Abzeichen
rss: RSS
versions_header: Versionen
downloads_for_this_version: "Für diese Version"
bundler_header: Gemfile
copy_to_clipboard: In die Zwischenablage kopieren
copied: Kopiert!
install: installieren
required_ruby_version: Erforderliche Ruby-Version
show:
not_hosted_notice: Dieses Gem wird aktuell nicht auf RubyGems.org gehostet.
authors_header: Autoren
owners_header: Besitzer
versions_header: Versionen
show_all_versions: "Zeige alle Versionen (%{count} total)"
licenses_header: Lizenz
no_licenses: k.A.
requirements_header: Anforderungen
sha_256_checksum: SHA 256-Prüfsumme
copy_to_clipboard: In die Zwischenablage kopieren
copied: Kopiert!
required_ruby_version: Erforderliche Ruby-Version

searches:
show:
Expand Down
19 changes: 10 additions & 9 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ en:
If you are the previous owner of this gem, you can change ownership of this gem using the gem owner command. You can also create new versions of this gem using gem push.
other: This gem previously existed, but has been removed by its owner. The RubyGems.org team has reserved this gem name for %{count} more days. After that time is up, anyone will be able to claim this gem name using gem push. <br/>
If you are the previous owner of this gem, you can change ownership of this gem using the gem owner command. You can also create new versions of this gem using gem push.
show:
install: install
yanked_notice: "This version has been yanked, and it is not available for download directly or for other gems that may have depended on it."
downloads_for_this_version: "For this version"
aside:
links:
header: Links
home: Homepage
Expand All @@ -152,16 +149,20 @@ en:
report_abuse: Report Abuse
badge: Badge
rss: RSS
versions_header: Versions
downloads_for_this_version: "For this version"
bundler_header: Gemfile
show_all_versions: "Show all versions (%{count} total)"
licenses_header: License
no_licenses: N/A
requirements_header: Requirements
copy_to_clipboard: Copy to clipboard
copied: Copied!
install: install
required_ruby_version: Required Ruby Version
required_rubygems_version: Required Rubygems Version
show:
yanked_notice: "This version has been yanked, and it is not available for download directly or for other gems that may have depended on it."
versions_header: Versions
show_all_versions: "Show all versions (%{count} total)"
licenses_header: License
no_licenses: N/A
requirements_header: Requirements

searches:
show:
Expand Down
13 changes: 7 additions & 6 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,7 @@ es:
index:
subtitle:
title: Gemas
show:
authors_header: Autores
bundler_header: Gemfile
downloads_for_this_version: Para esta versión
install: instalar
licenses_header: Licencia
aside:
links:
header: Enlaces
home: Sitio
Expand All @@ -174,6 +169,12 @@ es:
download: Descargar
subscribe: Suscribirse
report_abuse: Reportar abuso
downloads_for_this_version: Para esta versión
bundler_header: Gemfile
install: instalar
show:
authors_header: Autores
licenses_header: Licencia
no_licenses: N/D
not_hosted_notice: Esta gema no se encuentra alojada en Gemcutter.
owners_header: Administradores
Expand Down
23 changes: 12 additions & 11 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,7 @@ fr:
index:
title: "Gems"
downloads: Téléchargements
show:
not_hosted_notice: "Gem non hébergé sur Rubygems pour le moment."
install: "installation"
yanked_notice: "Retrait de Gem : disponible ni directement, ni pour les gems qui en dépendraient."
authors_header: "Auteurs"
downloads_for_this_version: "Pour cette version"
owners_header: "Propriétaires"
aside:
links:
header: "Liens"
home: "Page d'accueil"
Expand All @@ -132,16 +126,23 @@ fr:
report_abuse: Signaler un abus
badge: Badge
rss: RSS
versions_header: "Versions"
downloads_for_this_version: "Pour cette version"
bundler_header: "Gemfile"
copy_to_clipboard: Copier
copied: Copié!
install: "installation"
required_ruby_version: Version de Ruby requise
show:
not_hosted_notice: "Gem non hébergé sur Rubygems pour le moment."
yanked_notice: "Retrait de Gem : disponible ni directement, ni pour les gems qui en dépendraient."
authors_header: "Auteurs"
owners_header: "Propriétaires"
versions_header: "Versions"
show_all_versions: "Voir toutes les versions (%{count})"
licenses_header: "Licence"
no_licenses: "aucune"
requirements_header: "Dépendances"
sha_256_checksum: Total de contrôle SHA 256
copy_to_clipboard: Copier
copied: Copié!
required_ruby_version: Version de Ruby requise

searches:
show:
Expand Down
19 changes: 10 additions & 9 deletions config/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,7 @@ nl:
title: Wijzig gem links
other_fields_notice: Alle andere velden kunnen alleen gewijzigd worden door een nieuwe versie van de gem te publiceren.
subtitle: voor %{gem}
show:
install: Installeer
bundler_header: Gemfile
downloads_for_this_version: ! 'Voor deze versie'
stats_header: Statistieken
authors_header: Auteurs
versions_header: Versies
not_hosted_notice: Deze gem wordt momenteel niet gehost op rubygems.org.
owners_header: Eigenaren
aside:
links:
home: Startpagina
mail: Mailing-list
Expand All @@ -103,6 +95,15 @@ nl:
code: source code
wiki: Wiki
header: Links
downloads_for_this_version: ! 'Voor deze versie'
bundler_header: Gemfile
install: Installeer
show:
stats_header: Statistieken
authors_header: Auteurs
versions_header: Versies
not_hosted_notice: Deze gem wordt momenteel niet gehost op rubygems.org.
owners_header: Eigenaren
show_all_versions: Toon alle versies (%{count} totaal)
dashboards:
show:
Expand Down
17 changes: 9 additions & 8 deletions config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,7 @@ pt-BR:
other_fields_notice: Os outros campos só podem ser editados quando você submeter uma versão atualizada da sua gem.
index:
title: 'Gems'
show:
not_hosted_notice: Esta gem não está hospedada no Gemcutter.
install: instalar
yanked_notice: "Esta gem foi removida, e não está mais disponível para download."
authors_header: Autores
downloads_for_this_version: "Desta versão"
owners_header: Donos
aside:
links:
header: Links
home: Homepage
Expand All @@ -125,8 +119,15 @@ pt-BR:
wiki: Wiki
mail: Lista de Emails
bugs: Bug Tracker
versions_header: Versões
downloads_for_this_version: "Desta versão"
bundler_header: Gemfile
install: instalar
show:
not_hosted_notice: Esta gem não está hospedada no Gemcutter.
yanked_notice: "Esta gem foi removida, e não está mais disponível para download."
authors_header: Autores
owners_header: Donos
versions_header: Versões
show_all_versions: "Mostrar todas as versões (%{count})"
licenses_header: Licença
no_licenses: N/A
Expand Down
Loading