summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/groups_controller.rb8
-rw-r--r--app/views/groups/show.html.erb7
2 files changed, 12 insertions, 3 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index f6358080b..0ca636e19 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -21,7 +21,7 @@ class GroupsController < ApplicationController
layout 'admin'
self.main_menu = false
- before_action :require_admin
+ before_action :require_admin, :except => [:show]
before_action :find_group, :except => [:index, :new, :create]
accept_api_auth :index, :show, :create, :update, :destroy, :add_users, :remove_user
@@ -50,8 +50,12 @@ class GroupsController < ApplicationController
end
def show
+ return render_404 unless @group.visible?
+
respond_to do |format|
- format.html
+ format.html do
+ render :layout => 'base'
+ end
format.api
end
end
diff --git a/app/views/groups/show.html.erb b/app/views/groups/show.html.erb
index 4f413afe8..ad7ee2626 100644
--- a/app/views/groups/show.html.erb
+++ b/app/views/groups/show.html.erb
@@ -1,4 +1,8 @@
-<%= title [l(:label_group_plural), groups_path], @group.name %>
+<div class="contextual">
+<%= link_to(l(:button_edit), edit_group_path(@group), :class => 'icon icon-edit') if User.current.admin? %>
+</div>
+
+<h2><%= @group.name %></h2>
<% if @group.custom_field_values.any? %>
<ul>
@@ -14,3 +18,4 @@
<li><%= user %></li>
<% end %>
</ul>
+<% html_title @group.name %>