# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class AdminController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
helper :sort
def render_403
@project = nil
- render :template => "common/403", :layout => !request.xhr?, :status => 403
+ render :template => "common/403", :layout => (request.xhr? ? false : 'base'), :status => 403
return false
end
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class AuthSourcesController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
def index
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CustomFieldsController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
def index
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class EnumerationsController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
helper :custom_fields
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class GroupsController < ApplicationController
- layout 'base'
+ layout 'admin'
+
before_filter :require_admin
helper :custom_fields
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class IssueStatusesController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
verify :method => :post, :only => [ :destroy, :create, :update, :move, :update_issue_done_ratio ],
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class RolesController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
verify :method => :post, :only => [ :destroy, :move ],
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class SettingsController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
def index
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class TrackersController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
def index
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class UsersController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin, :except => :show
helper :sort
if @user != User.current && !User.current.admin? && @memberships.empty? && events.empty?
render_404 and return
end
-
+ render :layout => 'base'
+
rescue ActiveRecord::RecordNotFound
render_404
end
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class WorkflowsController < ApplicationController
+ layout 'admin'
+
before_filter :require_admin
def index
-<div id="menuAdmin" class="menu" onmouseover="menuMouseover(event)">
- <a class="menuItem" href="#" onmouseover="menuItemMouseover(event,'menuProjects');" onclick="this.blur(); return false;"><span class="menuItemText"><%=l(:label_project_plural)%></span><span class="menuItemArrow">▶</span></a>
- <a class="menuItem" href="#" onmouseover="menuItemMouseover(event,'menuUsers');" onclick="this.blur(); return false;"><span class="menuItemText"><%=l(:label_user_plural)%></span><span class="menuItemArrow">▶</span></a>
- <%= link_to l(:label_role_and_permissions), {:controller => 'roles' }, :class => "menuItem" %>
- <a class="menuItem" href="#" onmouseover="menuItemMouseover(event,'menuTrackers');" onclick="this.blur(); return false;"><span class="menuItemText"><%=l(:label_issue_tracking)%></span><span class="menuItemArrow">▶</span></a>
- <%= link_to l(:label_custom_field_plural), {:controller => 'custom_fields' }, :class => "menuItem" %>
- <%= link_to l(:label_enumerations), {:controller => 'enumerations' }, :class => "menuItem" %>
- <%= link_to l(:field_mail_notification), {:controller => 'admin', :action => 'mail_options' }, :class => "menuItem" %>
- <%= link_to l(:label_authentication), {:controller => 'auth_sources' }, :class => "menuItem" %>
- <%= link_to l(:label_settings), {:controller => 'settings' }, :class => "menuItem" %>
- <%= link_to l(:label_information_plural), {:controller => 'admin', :action => 'info' }, :class => "menuItem" %>
-</div>
-<div id="menuTrackers" class="menu">
- <%= link_to l(:label_tracker_plural), {:controller => 'trackers' }, :class => "menuItem" %>
- <%= link_to l(:label_issue_status_plural), {:controller => 'issue_statuses' }, :class => "menuItem" %>
- <%= link_to l(:label_workflow), {:controller => 'roles', :action => 'workflow' }, :class => "menuItem" %>
-</div>
-<div id="menuProjects" class="menu">
- <%= link_to l(:button_list), {:controller => 'admin', :action => 'projects' }, :class => "menuItem" %>
- <%= link_to l(:label_new), {:controller => 'projects', :action => 'add' }, :class => "menuItem" %>
-</div>
-<div id="menuUsers" class="menu">
- <%= link_to l(:button_list), {:controller => 'users' }, :class => "menuItem" %>
- <%= link_to l(:label_new), {:controller => 'users', :action => 'add' }, :class => "menuItem" %>
+<div id="admin-menu">
+ <ul>
+ <li><%= link_to l(:label_project_plural), {:controller => 'admin', :action => 'projects'}, :class => 'projects' %></li>
+ <li><%= link_to l(:label_user_plural), {:controller => 'users'}, :class => 'users' %></li>
+ <li><%= link_to l(:label_group_plural), {:controller => 'groups'}, :class => 'groups' %></li>
+ <li><%= link_to l(:label_role_and_permissions), {:controller => 'roles'}, :class => 'roles' %></li>
+ <li><%= link_to l(:label_tracker_plural), {:controller => 'trackers'}, :class => 'trackers' %></li>
+ <li><%= link_to l(:label_issue_status_plural), {:controller => 'issue_statuses'}, :class => 'issue_statuses' %></li>
+ <li><%= link_to l(:label_workflow), {:controller => 'workflows', :action => 'edit'}, :class => 'workflows' %></li>
+ <li><%= link_to l(:label_custom_field_plural), {:controller => 'custom_fields'}, :class => 'custom_fields' %></li>
+ <li><%= link_to l(:label_enumerations), {:controller => 'enumerations'}, :class => 'enumerations' %></li>
+ <li><%= link_to l(:label_settings), {:controller => 'settings'}, :class => 'settings' %></li>
+ <% menu_items_for(:admin_menu) do |item| -%>
+ <li><%= link_to h(item.caption), item.url, item.html_options %></li>
+ <% end -%>
+ <li><%= link_to l(:label_plugins), {:controller => 'admin', :action => 'plugins'}, :class => 'plugins' %></li>
+ <li><%= link_to l(:label_information_plural), {:controller => 'admin', :action => 'info'}, :class => 'info' %></li>
+ </ul>
</div>
<h2><%=l(:label_administration)%></h2>
-<%= render :partial => 'no_data' if @no_configuration_data %>
-
-<p class="icon22 icon22-projects">
-<%= link_to l(:label_project_plural), :controller => 'admin', :action => 'projects' %> |
-<%= link_to l(:label_new), :controller => 'projects', :action => 'add' %>
-</p>
-
-<p class="icon22 icon22-users">
-<%= link_to l(:label_user_plural), :controller => 'users' %> |
-<%= link_to l(:label_new), :controller => 'users', :action => 'add' %>
-</p>
-
-<p class="icon22 icon22-groups">
-<%= link_to l(:label_group_plural), :controller => 'groups' %> |
-<%= link_to l(:label_new), :controller => 'groups', :action => 'new' %>
-</p>
-
-<p class="icon22 icon22-role">
-<%= link_to l(:label_role_and_permissions), :controller => 'roles' %>
-</p>
-
-<p class="icon22 icon22-tracker">
-<%= link_to l(:label_tracker_plural), :controller => 'trackers' %> |
-<%= link_to l(:label_issue_status_plural), :controller => 'issue_statuses' %> |
-<%= link_to l(:label_workflow), :controller => 'workflows', :action => 'edit' %>
-</p>
-
-<p class="icon22 icon22-workflow">
-<%= link_to l(:label_custom_field_plural), :controller => 'custom_fields' %>
-</p>
-
-<p class="icon22 icon22-options">
-<%= link_to l(:label_enumerations), :controller => 'enumerations' %>
-</p>
-
-<p class="icon22 icon22-settings">
-<%= link_to l(:label_settings), :controller => 'settings' %>
-</p>
-
-<% menu_items_for(:admin_menu) do |item| -%>
- <%= content_tag 'p',
- link_to(h(item.caption), item.url, item.html_options),
- :class => ["icon22", "icon22-#{item.name}"].join(' ') %>
-<% end -%>
-
-<p class="icon22 icon22-plugin">
-<%= link_to l(:label_plugins), :controller => 'admin', :action => 'plugins' %>
-</p>
-
-<p class="icon22 icon22-info">
-<%= link_to l(:label_information_plural), :controller => 'admin', :action => 'info' %>
-</p>
+<div id="admin-index">
+ <%= render :partial => 'no_data' if @no_configuration_data %>
+ <%= render :partial => 'menu' %>
+</div>
<% html_title(l(:label_administration)) -%>
--- /dev/null
+<% unless controller_name == 'admin' && action_name == 'index' %>
+ <% content_for :sidebar do %>
+ <h3><%=l(:label_administration)%></h3>
+ <%= render :partial => 'admin/menu' %>
+ <% end %>
+<% end %>
+
+<%= render :file => "layouts/base" %>
#main-menu li a:hover {background:#759FCF; color:#fff;}
#main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}
+#admin-menu ul {margin: 0; padding: 0;}
+#admin-menu li {margin: 0; padding: 0 0 12px 0; list-style-type:none;}
+
+#admin-menu a { background-position: 0% 40%; background-repeat: no-repeat; padding-left: 20px; padding-top: 2px; padding-bottom: 3px;}
+#admin-menu a.projects { background-image: url(../images/projects.png); }
+#admin-menu a.users { background-image: url(../images/user.png); }
+#admin-menu a.groups { background-image: url(../images/group.png); }
+#admin-menu a.roles { background-image: url(../images/database_key.png); }
+#admin-menu a.trackers { background-image: url(../images/ticket.png); }
+#admin-menu a.issue_statuses { background-image: url(../images/ticket_edit.png); }
+#admin-menu a.workflows { background-image: url(../images/ticket_go.png); }
+#admin-menu a.custom_fields { background-image: url(../images/textfield.png); }
+#admin-menu a.enumerations { background-image: url(../images/text_list_bullets.png); }
+#admin-menu a.settings { background-image: url(../images/changeset.png); }
+#admin-menu a.plugins { background-image: url(../images/plugin.png); }
+#admin-menu a.info { background-image: url(../images/help.png); }
+
#main {background-color:#EEEEEE;}
#sidebar{ float: right; width: 17%; position: relative; z-index: 9; min-height: 600px; padding: 0; margin: 0;}