diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 171d34377..05045ab12 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -24,6 +24,7 @@ class AdminController < ApplicationController before_filter :require_admin helper :sort helper :Users + helper :Settings include SortHelper def index diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index bef128e50..b5baf4d71 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -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 diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index 7ad0702e8..1cb3fa197 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -1,4 +1,5 @@ class HomeworkAttachController < ApplicationController + layout "course_base" include CoursesHelper ############################### #判断当前角色权限时需先找到当前操作的project diff --git a/app/controllers/issue_categories_controller.rb b/app/controllers/issue_categories_controller.rb index 9803eb789..3bc0ff245 100644 --- a/app/controllers/issue_categories_controller.rb +++ b/app/controllers/issue_categories_controller.rb @@ -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] diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 9e7ee0229..0ca810cbe 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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 diff --git a/app/views/admin/contest_page_made.html.erb b/app/views/admin/contest_page_made.html.erb index a4407cd6b..ef99abf7d 100644 --- a/app/views/admin/contest_page_made.html.erb +++ b/app/views/admin/contest_page_made.html.erb @@ -1,6 +1,6 @@

<%=l(:label_first_page_made)%>

-<%= form_tag(:controller => 'admin', :action => 'contest_page_made') do %> +<%= form_tag(:controller => 'admin', :action => 'contest_page_made') do%>

<%= 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 @@ <%= text_area_tag 'contest_description',@contest_page.description,:rows => 8, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>

+

+ +

+
+ + <% labelled_form_for %> + <%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %> + +
<%= submit_tag l(:button_save), :class => "small", :name => nil %> <% end %>
diff --git a/app/views/homework_attach/edit.html.erb b/app/views/homework_attach/edit.html.erb index 8400eb805..a0876440c 100644 --- a/app/views/homework_attach/edit.html.erb +++ b/app/views/homework_attach/edit.html.erb @@ -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 %> +