修改了管理员权限

This commit is contained in:
huangjingquan 2013-11-16 11:09:10 +08:00
parent eb36cb40ce
commit 16611d8eff
10 changed files with 81 additions and 97 deletions

View File

@ -134,7 +134,7 @@ module ProjectsHelper
#Added by young #Added by young
def course_settings_tabs def course_settings_tabs
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural, :course=>'1'}, tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural, :course=>'1'},
# {:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural}, {:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural, :project_type => 1},
# {:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural}, # {:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural},
{:name => 'members', :action => :manage_members, :partial => 'projects/settings/members', :label => :label_member_plural} {:name => 'members', :action => :manage_members, :partial => 'projects/settings/members', :label => :label_member_plural}
] ]

View File

@ -1,3 +1,3 @@
<div id="admin-menu"> <div>
<%= render_menu :admin_menu %> <%= render_menu :admin_menu %>
</div> </div>

View File

@ -2,19 +2,27 @@
<%= form_for "bid_for_save", :remote=>true, :url => {:controller => 'bids', :action => 'add_homework'}, <%= form_for "bid_for_save", :remote=>true, :url => {:controller => 'bids', :action => 'add_homework'},
:update => "bidding_project_list", :update => "bidding_project_list",
:complete => '$("#put-bid-form").hide();' do |f| %> :complete => '$("#put-bid-form").hide();' do |f| %>
<fieldset><legend><%= l(:label_attachment_plural) %></legend> <fieldset>
<p><%= render :partial => 'attachments/form', :locals => {:container => @homework} %></p> <legend>
<%= l(:label_attachment_plural) %>
</legend>
<p>
<%= render :partial => 'attachments/form', :locals => {:container => @homework} %>
</p>
</fieldset> </fieldset>
<%= submit_tag l(:button_create) %> <%= submit_tag l(:button_create) %>
<% end %> <% end %>
</div> </div>
<% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0) %> <% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0) %>
<div class='icon icon-add'> <div class='icon icon-add'>
<%= toggle_link l(:label_commit_homework), 'put-bid-form' %> <%= toggle_link l(:label_commit_homework), 'put-bid-form' %>
</div> </div>
<% elsif @homework_list.empty? %> <% end %>
<div class="font_lighter_sidebar" style="padding-left: 10px">暂无学生提交作业!</div>
<% if @homework_list.empty? %>
<div class="font_lighter_sidebar" style="padding-left: 10px">
暂无学生提交作业!
</div>
<% end %> <% end %>
<div id='bidding_project_list'> <div id='bidding_project_list'>

View File

@ -4,7 +4,7 @@
<div class="project-search-block"> <div class="project-search-block">
<table width="100%" valign="center"> <table width="100%" valign="center">
<tr> <tr>
<td width="16%"><span style="margin-left:0px"><%= l(:label_task_plural)%></span></td> <td ><span style="margin-left:0px"><%= l(:label_task_plural)%></span></td>
<td align="right"> <td align="right">
<div class="project-search"> <div class="project-search">
<%= text_field_tag 'student_id', params[:student_id], :size => 30 %> <%= text_field_tag 'student_id', params[:student_id], :size => 30 %>

View File

@ -19,59 +19,35 @@
<div id="wrapper"> <div id="wrapper">
<div id="wrapper2"> <div id="wrapper2">
<div id="wrapper3"> <div id="wrapper3">
<div id="top-menu"> <%= render :partial => 'layouts/base_header'%>
<div id="account"> <div style="margin-top: 10px;">
<%= render_menu :account_menu -%> <div id="main">
</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"> <div id="sidebar">
<%= yield :sidebar %> <%= yield :sidebar %>
<%= view_layouts_base_sidebar_hook_response %> <%= view_layouts_base_sidebar_hook_response %>
</div> </div>
<div id="content" style="padding-top: 0px;">
<div id="content">
<%= render_flash_messages %> <%= render_flash_messages %>
<%= yield %> <%= yield %>
<%= call_hook :view_layouts_base_content %> <%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div> <div style="clear:both;"></div>
<%= render_flash_messages %>
</div>
<%= render :partial => 'layouts/base_footer'%>
</div> </div>
</div> </div>
</div> </div>
<div id="ajax-indicator" style="display:none;">
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div> <span><%= l(:label_loading) %></span>
</div>
<div id="ajax-modal" style="display:none;"></div> <div id="ajax-modal" style="display:none;"></div>
<div id="footer"> <div id="footer">
<div class="bgl"><div class="bgr"> <div class="bgl">
<div class="bgr">
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> &copy; 2006-2013 Jean-Philippe Lang Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> &copy; 2006-2013 Jean-Philippe Lang
</div></div> </div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -135,7 +135,7 @@
<!-- addedby bai 教师姓名加超链接、加入开课时间、结课时间与课时 --> <!-- addedby bai 教师姓名加超链接、加入开课时间、结课时间与课时 -->
<tr> <tr>
<td valign="top" style="padding-left: 8px;"><%= l(:label_main_teacher) %> :</td><td class="font_lighter_sidebar"><%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %></td> <td valign="top" style="padding-left: 8px; width:60px"><%= l(:label_main_teacher) %> :</td><td class="font_lighter_sidebar"><%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %></td>
</tr> </tr>
<tr> <tr>
@ -213,7 +213,7 @@
<%= link_to l(:label_course_overview), project_path(@project), :class => link_class(:overview) %> <%= link_to l(:label_course_overview), project_path(@project), :class => link_class(:overview) %>
</li> </li>
<li> <li>
<%= link_to l(:label_homework), homework_project_path(@project), :class => link_class('Task')%> <%= link_to l(:label_homework), {:controller => 'projects', :action => 'homework'}, :class => link_class('Task'), :project_type => 1 %>
</li> </li>
<li> <li>
<%= link_to l(:label_course_board), { :controller => 'boards', :action => 'index', :project_id => @project}, :class => link_class(:boards) %> <%= link_to l(:label_course_board), { :controller => 'boards', :action => 'index', :project_id => @project}, :class => link_class(:boards) %>

View File

@ -621,7 +621,7 @@ zh:
label_course_overview: "课程动态" label_course_overview: "课程动态"
label_question_student: 作业交流 #bai label_question_student: 作业交流 #bai
label_homework_commit: 提交作业 #huang label_homework_commit: 提交作业 #huang
label_homework_info: 作业提交情况 #huang label_homework_info: 提交情况 #huang
label_course_news: 课程通知 label_course_news: 课程通知
label_course_board: 讨论区 label_course_board: 讨论区
label_version: 版本 label_version: 版本

View File

@ -1723,7 +1723,7 @@ button.tab-right {
#content .tabs_new {height: 2.6em; margin-bottom:1.2em; margin-top: 0.8em; position:relative; overflow:hidden;} #content .tabs_new {height: 2.6em; margin-bottom:1.2em; margin-top: 0.8em; position:relative; overflow:hidden;}
#content .tabs_new ul {margin:0; position:absolute; bottom:0; padding-left: 0.5em; width: 2000px; border-bottom: 1px solid #15BCCF;font-size:14px;} #content .tabs_new ul {margin:0; position:absolute; bottom:0; padding-left: 0.5em; width: 2000px; border-bottom: 1px solid #15BCCF;font-size:14px;}
#content .tabs_new ul li { #content .tabs_new ul li {
width:100px; /*modified by linchun*/ width:85px; /*modified by linchun*/
float:left; float:left;
list-style-type:none; list-style-type:none;
white-space:nowrap; white-space:nowrap;