Add better contextual view hooks to navigation and empty view

This commit adds distinguishable view hooks for plugins wanting
to:

* Add a toolbar item to the repository navigation
* Show contextual information specifically on the empty repository
  screen
pull/3358/head
Oliver Günther 9 years ago
parent d8f3e00f0a
commit 5b4ebe8dc0
  1. 1
      app/views/repositories/_navigation.html.erb
  2. 2
      app/views/repositories/empty.html.erb

@ -40,6 +40,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
</li>
<% end %>
<%= call_hook(:repositories_navigation_toolbar, { repository: @repository, project: @project }) %>
<% if User.current.allowed_to?(:manage_repository, @project) %>
<li class="toolbar-item">
<%= link_to settings_project_path(@project, tab: 'repository') , class: 'button' do %>

@ -35,3 +35,5 @@ See doc/COPYRIGHT.rdoc for more details.
</div>
<%= call_hook(:view_repositories_show_contextual,
{ repository: @repository, project: @project }) %>
<%= call_hook(:repositories_below_empty_warning,
{ repository: @repository, project: @project }) %>

Loading…
Cancel
Save