Skip to content

Commit

Permalink
Add Expert Download link in the package show page
Browse files Browse the repository at this point in the history
Link to the download page, which shows all instalation options (such as the
manually install one) and not only the binaries.

Co-authored-by: Alexander Graul <mail@agraul.de>
  • Loading branch information
Ana06 and agraul committed Sep 8, 2019
1 parent 9e42d8d commit bc3cd4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
16 changes: 4 additions & 12 deletions app/views/package/_download_rows.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,10 @@
<a class="btn btn-sm btn-primary" href="<%= url %>"><span class="typcn typcn-flash-outline"></span> <%= _("1 Click Install") %></a>
<% end %>
<div class="btn-group">
<button class="btn btn-sm btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="typcn typcn-download-outline"></span> <%= _("Download") %>
</button>
<div class="dropdown-menu dropdown-menu-right">
<% archs.each do |arch| %>
<% items.select{|item| human_arch( item.arch ) == arch}.each do |bin| %>
<%= link_to _(human_arch( bin.arch )), "http://download.opensuse.org/repositories/" + bin.filepath, :class => 'dropdown-item' %>
<% end -%>
<% end -%>
</div>
</div>
<%= link_to download_package_path(project: result.first, package: @pkgname), class: 'btn btn-sm btn-secondary' do %>
<span class="typcn typcn-download-outline"></span>
<%= _('Expert Download') %>
<% end %>

</div><!-- /.col- -->
</div><!-- /.card-body -->
Expand Down
5 changes: 5 additions & 0 deletions app/views/package/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
<span class="typcn typcn-flash-outline"></span>
<%= _("Direct Install") %>
</a>

<%= link_to download_package_path(project: @default_package.project, package: @pkgname), class: 'btn btn-lg btn-secondary' do %>
<span class="typcn typcn-download-outline"></span>
<%= _('Expert Download') %>
<% end %>
<% end -%>
</div><!-- /#package-description -->
</div><!-- /.row -->
Expand Down

0 comments on commit bc3cd4a

Please sign in to comment.