This commit is contained in:
nwb 2014-07-22 16:56:34 +08:00
commit f22a39fbfa
12 changed files with 132 additions and 19 deletions

View File

@ -24,6 +24,7 @@ class AdminController < ApplicationController
before_filter :require_admin
helper :sort
helper :Users
helper :Settings
include SortHelper
def index

View File

@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class AttachmentsController < ApplicationController
layout "users_base"
before_filter :find_project, :only => [:show, :download, :thumbnail, :destroy, :delete_homework]#, :except => [:upload, :autocomplete]
before_filter :file_readable, :read_authorize, :only => [:show, :thumbnail]#Modified by young
before_filter :delete_authorize, :only => :destroy

View File

@ -1,4 +1,5 @@
class HomeworkAttachController < ApplicationController
layout "course_base"
include CoursesHelper
###############################
#判断当前角色权限时需先找到当前操作的project

View File

@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class IssueCategoriesController < ApplicationController
layout "project_base"
menu_item :settings
model_object IssueCategory
before_filter :find_model_object, :except => [:index, :new, :create]

View File

@ -315,7 +315,7 @@ class UsersController < ApplicationController
# get users ActiveRecord
@users = @users_statuses.includes(:user).map(&:user)
@user_base_tag = params[:id] ? 'base_users':'base'
@user_base_tag = params[:id] ? 'base_users':'users_base'
respond_to do |format|
format.html {
@groups = Group.all.sort
@ -344,7 +344,7 @@ class UsersController < ApplicationController
scope = scope.like(params[:name]) if params[:name].present?
@user_count = scope.count
@user_pages = Paginator.new @user_count, @limit, params['page']
@user_base_tag = params[:id] ? 'base_users':'base'
@user_base_tag = params[:id] ? 'base_users':'users_base'
@offset ||= @user_pages.reverse_offset
unless @offset == 0
@users = scope.offset(@offset).limit(@limit).all.reverse
@ -475,7 +475,7 @@ class UsersController < ApplicationController
def new
@user = User.new(:language => Setting.default_language, :mail_notification => Setting.default_notification_option)
@auth_sources = AuthSource.all
render :layout => "base"
render :layout => "users_base"
end
def create
@ -510,7 +510,7 @@ class UsersController < ApplicationController
@user.password = @user.password_confirmation = nil
respond_to do |format|
format.html { render :action => 'new',:layout => "base" }
format.html { render :action => 'new',:layout => "users_base" }
format.api { render_validation_errors(@user) }
end
end

View File

@ -1,6 +1,6 @@
<h3><%=l(:label_first_page_made)%></h3>
<%= form_tag(:controller => 'admin', :action => 'contest_page_made') do %>
<%= form_tag(:controller => 'admin', :action => 'contest_page_made') do%>
<p style="margin-left:60px;padding-right: 20px;">
<label for='web_title'><%= l(:label_web_title) %>:</label>
<%= text_field_tag 'web_title', params[:wbe_title],:value => @first_page.web_title, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
@ -29,7 +29,17 @@
<label for='contest_description' style="vertical-align: top">&nbsp;&nbsp;&nbsp;<%= l(:label_site_description)%>:</label>
<%= text_area_tag 'contest_description',@contest_page.description,:rows => 8, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
</p>
<p style="margin-left:60px;padding-right: 20px;">
<label>&nbsp;&nbsp;&nbsp;<%= link_to l(:label_notification), '#',
:onclick => '$("#notification").slideToggle(400); ' %></label>
</p>
<div style="margin-left:60px;padding-right: 20px;" id="notification">
<label for='contest_description' style="vertical-align: top">&nbsp;&nbsp;&nbsp;</label>
<% labelled_form_for %>
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
</div>
<%= submit_tag l(:button_save), :class => "small", :name => nil %>
<% end %>
<div>

View File

@ -1,7 +1,4 @@
<% @nav_dispaly_course_all_label = 1
@nav_dispaly_forum_label = 1
@nav_dispaly_course_label = nil
@nav_dispaly_store_all_label = 1 %>
<script type="text/javascript">
function switchTab(ProTag) {
var display_index = 3 - ProTag;

View File

@ -0,0 +1,47 @@
<% @nav_dispaly_project_label = 1
@nav_dispaly_forum_label = 1 %>
<!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', 'nyan', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "jquery.leanModal.min" %>
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>
<%= 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">
<%=render :partial => 'layouts/base_header'%>
<div id="main" class="nosidebar">
<div id="content_">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
<%=render :partial => 'layouts/base_footer'%>
</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>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -0,0 +1,50 @@
<% @nav_dispaly_home_path_label = 1
@nav_dispaly_main_course_label = 1
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<!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', 'nyan', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "jquery.leanModal.min" %>
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>
<%= 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">
<%=render :partial => 'layouts/base_header'%>
<div id="main" class="nosidebar">
<div id="content_">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
<%=render :partial => 'layouts/base_footer'%>
</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>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -1,8 +1,4 @@
<% @nav_dispaly_home_path_label = 1
@nav_dispaly_main_course_label = 1
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<!-- modified by huang -->
<script type="text/javascript">
function searchUser(){

View File

@ -1,8 +1,4 @@
<% @nav_dispaly_home_path_label = 1
@nav_dispaly_main_course_label = 1
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<h3><%= link_to l(:label_user_plural), users_path %> &#187; <%=l(:label_user_new)%></h3>
<%= labelled_form_for @user do |f| %>

View File

@ -844,6 +844,19 @@ ActiveRecord::Schema.define(:version => 20140722024513) do
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
create_table "rich_rich_files", :force => true do |t|
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "rich_file_file_name"
t.string "rich_file_content_type"
t.integer "rich_file_file_size"
t.datetime "rich_file_updated_at"
t.string "owner_type"
t.integer "owner_id"
t.text "uri_cache"
t.string "simplified_type", :default => "file"
end
create_table "roles", :force => true do |t|
t.string "name", :limit => 30, :default => "", :null => false
t.integer "position", :default => 1