##// END OF EJS Templates
removed underscores in block names (problem with scriptaculous sortables)...
Jean-Philippe Lang -
r239:08ff4dfb216c
parent child
Show More
@@ -19,13 +19,17 class MyController < ApplicationController
19 19 layout 'base'
20 20 before_filter :require_login
21 21
22 BLOCKS = { 'issues_assigned_to_me' => :label_assigned_to_me_issues,
23 'issues_reported_by_me' => :label_reported_issues,
24 'latest_news' => :label_news_latest,
22 BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues,
23 'issuesreportedbyme' => :label_reported_issues,
24 'news' => :label_news_latest,
25 25 'calendar' => :label_calendar,
26 26 'documents' => :label_document_plural
27 27 }.freeze
28 28
29 DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'],
30 'right' => ['issuesreportedbyme']
31 }.freeze
32
29 33 verify :xhr => true,
30 34 :session => :page_layout,
31 35 :only => [:add_block, :remove_block, :order_blocks]
@@ -38,7 +42,7 class MyController < ApplicationController
38 42 # Show user's page
39 43 def page
40 44 @user = self.logged_in_user
41 @blocks = @user.pref[:my_page_layout] || { 'left' => ['issues_assigned_to_me'], 'right' => ['issues_reported_by_me'] }
45 @blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
42 46 end
43 47
44 48 # Edit user's account
@@ -75,7 +79,7 class MyController < ApplicationController
75 79 # User's page layout configuration
76 80 def page_layout
77 81 @user = self.logged_in_user
78 @blocks = @user.pref[:my_page_layout] || { 'left' => ['issues_assigned_to_me'], 'right' => ['issues_reported_by_me'] }
82 @blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
79 83 session[:page_layout] = @blocks
80 84 %w(top left right).each {|f| session[:page_layout][f] ||= [] }
81 85 @block_options = []
1 NO CONTENT: file renamed from app/views/my/blocks/_issues_assigned_to_me.rhtml to app/views/my/blocks/_issuesassignedtome.rhtml
1 NO CONTENT: file renamed from app/views/my/blocks/_issues_reported_by_me.rhtml to app/views/my/blocks/_issuesreportedbyme.rhtml
1 NO CONTENT: file renamed from app/views/my/blocks/_latest_news.rhtml to app/views/my/blocks/_news.rhtml
General Comments 0
You need to be logged in to leave comments. Login now