prepare fix admin/

new file:   app/views/layouts/base_admin.html.erb
This commit is contained in:
yanxd 2013-11-15 10:55:11 +08:00
parent e5baf0959b
commit a9ec58f245
3 changed files with 95 additions and 6 deletions

View File

@ -5,4 +5,4 @@
<% end %>
<% end %>
<%= render :file => "layouts/base" %>
<%= render :file => "layouts/base_admin" %>

View File

@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="<%= current_language %>">
<head>
<meta charset="utf-8" />
<title><%=h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<body class="<%=h body_css_classes %>">
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<div id="top-menu">
<div id="account">
<%= render_menu :account_menu -%>
</div>
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
</div>
<div id="header">
<% if User.current.logged? || !Setting.login_required? %>
<div id="quick-search">
<%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
<%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
<label for='q'>
<%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>:
</label>
<%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %>
<% end %>
<%= render_project_jump_box %>
</div>
<% end %>
<h1><%= page_header_title %></h1>
<% if display_main_menu?(@project) %>
<div id="main-menu">
<%= render_main_menu(@project) %>
</div>
<% end %>
</div>
<div id="main" class="<%= sidebar_content? ? '' : 'nosidebar' %>">
<div id="sidebar">
<%= yield :sidebar %>
<%= view_layouts_base_sidebar_hook_response %>
</div>
<div id="content">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
</div>
</div>
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
<div id="ajax-modal" style="display:none;"></div>
<div id="footer">
<div class="bgl"><div class="bgr">
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> &copy; 2006-2013 Jean-Philippe Lang
</div></div>
</div>
</div>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -55,11 +55,20 @@
<td>
<table>
<tr>
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><%= h @user.lastname<<@user.firstname %> <!-- added by bai --> <% unless @user.user_extensions.nil?%>
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><%= h @user.lastname<<@user.firstname %> <!-- added by bai -->
<% img_path = '' %>
<% unless @user.user_extensions.nil?%>
<% unless @user.user_extensions.identity == 2 %>
<% if @user.user_extensions.gender == 1 %> <%= image_tag("/images/sidebar/female.png", weight:"22px", height:"22px") %>
<% else %> <%= image_tag("/images/sidebar/male.png", weight:"25px", height:"25px") %> <% end %><% end %>
<% else %> <%= image_tag("/images/sidebar/male.png", weight:"25px", height:"25px") %> <% end %> <!-- end --></td>
<% if @user.user_extensions.gender == 1 %>
<% img_uri = '/images/sidebar/female.png' %>
<% else %>
<% img_uri = '/images/sidebar/male.png' %>
<% end %>
<% end %>
<% else %>
<% img_uri = '/images/sidebar/female.png' %>
<% end %> <!-- end --></td>
<%= image_tag(img_uri, weight:"25px", height:"25px") %>
</tr>
<tr>
<td align="center"> <% unless User.current == @user %>