diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-12 17:59:02 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-12 17:59:02 +0000 |
commit | 027bf93849e82ef3c60e4a3024db49d65f0fb3c9 (patch) | |
tree | c6bc438fcd50370944b94f605b3f34fe54b73248 /app/views/my | |
parent | 071f8e18d02f789149071abb8e052bae7ad01003 (diff) | |
download | redmine-027bf93849e82ef3c60e4a3024db49d65f0fb3c9.tar.gz redmine-027bf93849e82ef3c60e4a3024db49d65f0fb3c9.zip |
added svn:eol-style native property on /app files
git-svn-id: http://redmine.rubyforge.org/svn/trunk@333 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/my')
-rw-r--r-- | app/views/my/_block.rhtml | 30 | ||||
-rw-r--r-- | app/views/my/account.rhtml | 36 | ||||
-rw-r--r-- | app/views/my/blocks/_calendar.rhtml | 92 | ||||
-rw-r--r-- | app/views/my/blocks/_documents.rhtml | 14 | ||||
-rw-r--r-- | app/views/my/blocks/_issuesassignedtome.rhtml | 20 | ||||
-rw-r--r-- | app/views/my/blocks/_issuesreportedbyme.rhtml | 18 | ||||
-rw-r--r-- | app/views/my/blocks/_news.rhtml | 14 | ||||
-rw-r--r-- | app/views/my/page.rhtml | 66 | ||||
-rw-r--r-- | app/views/my/page_layout.rhtml | 232 |
9 files changed, 261 insertions, 261 deletions
diff --git a/app/views/my/_block.rhtml b/app/views/my/_block.rhtml index 3f72bdaf1..39e6c3bd7 100644 --- a/app/views/my/_block.rhtml +++ b/app/views/my/_block.rhtml @@ -1,16 +1,16 @@ -<div id="block_<%= block_name %>" class="mypage-box">
-
- <div style="float:right;margin-right:16px;z-index:500;">
- <%= link_to_remote "", {
- :url => { :action => "remove_block", :block => block_name },
- :complete => "removeBlock('block_#{block_name}')",
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')" },
- :class => "close-icon"
- %>
- </div>
-
- <div class="handle">
- <%= render :partial => "my/blocks/#{block_name}", :locals => { :user => user } %>
- </div>
+<div id="block_<%= block_name %>" class="mypage-box"> + + <div style="float:right;margin-right:16px;z-index:500;"> + <%= link_to_remote "", { + :url => { :action => "remove_block", :block => block_name }, + :complete => "removeBlock('block_#{block_name}')", + :loading => "Element.show('indicator')", + :loaded => "Element.hide('indicator')" }, + :class => "close-icon" + %> + </div> + + <div class="handle"> + <%= render :partial => "my/blocks/#{block_name}", :locals => { :user => user } %> + </div> </div>
\ No newline at end of file diff --git a/app/views/my/account.rhtml b/app/views/my/account.rhtml index 09a43b468..8a1468cd5 100644 --- a/app/views/my/account.rhtml +++ b/app/views/my/account.rhtml @@ -1,11 +1,11 @@ <h2><%=l(:label_my_account)%></h2> -
-<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
-<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
+ +<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br /> +<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p> <%= error_messages_for 'user' %> -
-<div class="box">
+ +<div class="box"> <h3><%=l(:label_information_plural)%></h3> <% labelled_tabular_form_for :user, @user, :url => { :action => "account" } do |f| %> @@ -21,26 +21,26 @@ <% end %> <center><%= submit_tag l(:button_save) %></center> -<% end %>
-</div>
-
+<% end %> +</div> + -<% unless @user.auth_source_id %>
- <div class="box">
- <h3><%=l(:field_password)%></h3>
+<% unless @user.auth_source_id %> + <div class="box"> + <h3><%=l(:field_password)%></h3> <% form_tag({:action => 'change_password'}, :class => "tabular") do %> -
+ <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label> <%= password_field_tag 'password', nil, :size => 25 %></p> -
+ <p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label> - <%= password_field_tag 'new_password', nil, :size => 25 %></p>
-
+ <%= password_field_tag 'new_password', nil, :size => 25 %></p> + <p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label> - <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
+ <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p> <center><%= submit_tag l(:button_save) %></center> - <% end %>
+ <% end %> </div> -<% end %>
+<% end %> diff --git a/app/views/my/blocks/_calendar.rhtml b/app/views/my/blocks/_calendar.rhtml index dfff5b78a..4c583e496 100644 --- a/app/views/my/blocks/_calendar.rhtml +++ b/app/views/my/blocks/_calendar.rhtml @@ -1,47 +1,47 @@ -<h3><%= l(:label_calendar) %></h3>
-
-<%
-@date_from = Date.today - (Date.today.cwday-1)
-@date_to = Date.today + (7-Date.today.cwday)
-@issues = Issue.find :all,
- :conditions => ["issues.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to],
- :include => [:project, :tracker] unless @user.projects.empty?
-@issues ||= []
-%>
-
-<table class="list with-cells">
-<thead><tr>
-<th></th>
-<% 1.upto(7) do |d| %>
- <th align="center" width="14%"><%= day_name(d) %></th>
-<% end %>
-</tr></thead>
-<tbdoy>
-<tr height="100">
-<% day = @date_from
-while day <= @date_to
- if day.cwday == 1 %>
- <th valign="middle"><%= day.cweek %></th>
- <% end %>
- <td valign="top" width="14%" class="<%= day.month==@month ? "even" : "odd" %>">
- <p align="right"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p>
- <% day_issues = []
- @issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day }
- day_issues.each do |i| %>
- <%= if day == i.start_date and day == i.due_date
- image_tag('arrow_bw.png')
- elsif day == i.start_date
- image_tag('arrow_from.png')
- elsif day == i.due_date
- image_tag('arrow_to.png')
- end %>
- <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
- <% end %>
- </td>
- <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %>
- <%
- day = day + 1
-end %>
-</tr>
-</tbody>
+<h3><%= l(:label_calendar) %></h3> + +<% +@date_from = Date.today - (Date.today.cwday-1) +@date_to = Date.today + (7-Date.today.cwday) +@issues = Issue.find :all, + :conditions => ["issues.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to], + :include => [:project, :tracker] unless @user.projects.empty? +@issues ||= [] +%> + +<table class="list with-cells"> +<thead><tr> +<th></th> +<% 1.upto(7) do |d| %> + <th align="center" width="14%"><%= day_name(d) %></th> +<% end %> +</tr></thead> +<tbdoy> +<tr height="100"> +<% day = @date_from +while day <= @date_to + if day.cwday == 1 %> + <th valign="middle"><%= day.cweek %></th> + <% end %> + <td valign="top" width="14%" class="<%= day.month==@month ? "even" : "odd" %>"> + <p align="right"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p> + <% day_issues = [] + @issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day } + day_issues.each do |i| %> + <%= if day == i.start_date and day == i.due_date + image_tag('arrow_bw.png') + elsif day == i.start_date + image_tag('arrow_from.png') + elsif day == i.due_date + image_tag('arrow_to.png') + end %> + <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br /> + <% end %> + </td> + <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %> + <% + day = day + 1 +end %> +</tr> +</tbody> </table>
\ No newline at end of file diff --git a/app/views/my/blocks/_documents.rhtml b/app/views/my/blocks/_documents.rhtml index eb8c16a58..a1bb0b36c 100644 --- a/app/views/my/blocks/_documents.rhtml +++ b/app/views/my/blocks/_documents.rhtml @@ -1,8 +1,8 @@ -<h3><%=l(:label_document_plural)%></h3>
-
-<%= render(:partial => 'documents/document',
- :collection => Document.find(:all,
- :limit => 10,
- :order => 'documents.created_on DESC',
- :conditions => "documents.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
+<h3><%=l(:label_document_plural)%></h3> + +<%= render(:partial => 'documents/document', + :collection => Document.find(:all, + :limit => 10, + :order => 'documents.created_on DESC', + :conditions => "documents.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})", :include => [:project])) unless @user.projects.empty? %>
\ No newline at end of file diff --git a/app/views/my/blocks/_issuesassignedtome.rhtml b/app/views/my/blocks/_issuesassignedtome.rhtml index 2a4e2a05d..e52e0fad1 100644 --- a/app/views/my/blocks/_issuesassignedtome.rhtml +++ b/app/views/my/blocks/_issuesassignedtome.rhtml @@ -1,10 +1,10 @@ -<h3><%=l(:label_assigned_to_me_issues)%></h3>
-<% assigned_issues = Issue.find(:all,
- :conditions => ["assigned_to_id=?", user.id],
- :limit => 10,
- :include => [ :status, :project, :tracker ],
- :order => 'issues.updated_on DESC') %>
-<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
-<% if assigned_issues.length > 0 %>
-<p><%=lwr(:label_last_updates, assigned_issues.length)%></p>
-<% end %>
+<h3><%=l(:label_assigned_to_me_issues)%></h3> +<% assigned_issues = Issue.find(:all, + :conditions => ["assigned_to_id=?", user.id], + :limit => 10, + :include => [ :status, :project, :tracker ], + :order => 'issues.updated_on DESC') %> +<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %> +<% if assigned_issues.length > 0 %> +<p><%=lwr(:label_last_updates, assigned_issues.length)%></p> +<% end %> diff --git a/app/views/my/blocks/_issuesreportedbyme.rhtml b/app/views/my/blocks/_issuesreportedbyme.rhtml index 9b40b3606..4e173d3c5 100644 --- a/app/views/my/blocks/_issuesreportedbyme.rhtml +++ b/app/views/my/blocks/_issuesreportedbyme.rhtml @@ -1,10 +1,10 @@ -<h3><%=l(:label_reported_issues)%></h3>
-<% reported_issues = Issue.find(:all,
- :conditions => ["author_id=?", user.id],
- :limit => 10,
- :include => [ :status, :project, :tracker ],
- :order => 'issues.updated_on DESC') %>
-<%= render :partial => 'issues/list_simple', :locals => { :issues => reported_issues } %>
-<% if reported_issues.length > 0 %>
-<p><%=lwr(:label_last_updates, reported_issues.length)%></p>
+<h3><%=l(:label_reported_issues)%></h3> +<% reported_issues = Issue.find(:all, + :conditions => ["author_id=?", user.id], + :limit => 10, + :include => [ :status, :project, :tracker ], + :order => 'issues.updated_on DESC') %> +<%= render :partial => 'issues/list_simple', :locals => { :issues => reported_issues } %> +<% if reported_issues.length > 0 %> +<p><%=lwr(:label_last_updates, reported_issues.length)%></p> <% end %>
\ No newline at end of file diff --git a/app/views/my/blocks/_news.rhtml b/app/views/my/blocks/_news.rhtml index 4bad9a542..30085cf45 100644 --- a/app/views/my/blocks/_news.rhtml +++ b/app/views/my/blocks/_news.rhtml @@ -1,8 +1,8 @@ -<h3><%=l(:label_news_latest)%></h3>
-
-<%= render (:partial => 'news/news',
- :collection => News.find(:all,
- :limit => 10,
- :order => 'news.created_on DESC',
- :conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
+<h3><%=l(:label_news_latest)%></h3> + +<%= render (:partial => 'news/news', + :collection => News.find(:all, + :limit => 10, + :order => 'news.created_on DESC', + :conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})", :include => [:project, :author])) unless @user.projects.empty? %>
\ No newline at end of file diff --git a/app/views/my/page.rhtml b/app/views/my/page.rhtml index 0c7920d69..5c6c906db 100644 --- a/app/views/my/page.rhtml +++ b/app/views/my/page.rhtml @@ -1,33 +1,33 @@ -<div class="contextual">
- <%= link_to l(:label_personalize_page), :action => 'page_layout' %>
-</div>
-
-<h2><%=l(:label_my_page)%></h2>
-
-<div id="list-top">
- <% @blocks['top'].each do |b|
- next unless MyController::BLOCKS.keys.include? b %>
- <div class="mypage-box">
- <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
- </div>
- <% end if @blocks['top'] %>
-</div>
-
-<div id="list-left" class="splitcontentleft">
- <% @blocks['left'].each do |b|
- next unless MyController::BLOCKS.keys.include? b %>
- <div class="mypage-box">
- <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
- </div>
- <% end if @blocks['left'] %>
-</div>
-
-<div id="list-right" class="splitcontentright">
- <% @blocks['right'].each do |b|
- next unless MyController::BLOCKS.keys.include? b %>
- <div class="mypage-box">
- <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
- </div>
- <% end if @blocks['right'] %>
-</div>
-
+<div class="contextual"> + <%= link_to l(:label_personalize_page), :action => 'page_layout' %> +</div> + +<h2><%=l(:label_my_page)%></h2> + +<div id="list-top"> + <% @blocks['top'].each do |b| + next unless MyController::BLOCKS.keys.include? b %> + <div class="mypage-box"> + <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %> + </div> + <% end if @blocks['top'] %> +</div> + +<div id="list-left" class="splitcontentleft"> + <% @blocks['left'].each do |b| + next unless MyController::BLOCKS.keys.include? b %> + <div class="mypage-box"> + <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %> + </div> + <% end if @blocks['left'] %> +</div> + +<div id="list-right" class="splitcontentright"> + <% @blocks['right'].each do |b| + next unless MyController::BLOCKS.keys.include? b %> + <div class="mypage-box"> + <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %> + </div> + <% end if @blocks['right'] %> +</div> + diff --git a/app/views/my/page_layout.rhtml b/app/views/my/page_layout.rhtml index 2fe944748..8cb09a554 100644 --- a/app/views/my/page_layout.rhtml +++ b/app/views/my/page_layout.rhtml @@ -1,117 +1,117 @@ -<script language="JavaScript">
-//<![CDATA[
-function recreateSortables() {
- Sortable.destroy('list-top');
- Sortable.destroy('list-left');
- Sortable.destroy('list-right');
-
- Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=top', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-top",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'})
- Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=left', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-left",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'})
- Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=right', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-right",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})
-}
-
-function updateSelect() {
- s = $('block-select')
- for (var i = 0; i < s.options.length; i++) {
- if ($('block_' + s.options[i].value)) {
- s.options[i].disabled = true;
- } else {
- s.options[i].disabled = false;
- }
- }
- s.options[0].selected = true;
-}
-
-function afterAddBlock() {
- recreateSortables();
- updateSelect();
-}
-
-function removeBlock(block) {
- $(block).parentNode.removeChild($(block));
- updateSelect();
-}
-//]]>
-</script>
-
-<div class="contextual">
-<span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span>
-<% form_tag({:action => "add_block"}, :id => "block-form") do %>
-<%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %>
-<%= link_to_remote l(:button_add),
- {:url => { :action => "add_block" },
- :with => "Form.serialize('block-form')",
- :update => "list-top",
- :position => :top,
- :complete => "afterAddBlock();",
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')"
- }, :class => 'icon icon-add'
- %>
-<% end %>
-<%= link_to l(:button_save), {:action => 'page_layout_save'}, :class => 'icon icon-save' %>
-<%= link_to l(:button_cancel), {:action => 'page'}, :class => 'icon icon-cancel' %>
-</div>
-
-<h2><%=l(:label_my_page)%></h2>
-
-<div id="list-top" class="block-receiver">
- <% @blocks['top'].each do |b|
- next unless MyController::BLOCKS.keys.include? b %>
- <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
- <% end if @blocks['top'] %>
-</div>
-
-<div id="list-left" class="splitcontentleft block-receiver">
- <% @blocks['left'].each do |b|
- next unless MyController::BLOCKS.keys.include? b %>
- <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
- <% end if @blocks['left'] %>
-</div>
-
-<div id="list-right" class="splitcontentright block-receiver">
- <% @blocks['right'].each do |b|
- next unless MyController::BLOCKS.keys.include? b %>
- <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
- <% end if @blocks['right'] %>
-</div>
-
-<%= sortable_element 'list-top',
- :tag => 'div',
- :only => 'mypage-box',
- :handle => "handle",
- :dropOnEmpty => true,
- :containment => ['list-top', 'list-left', 'list-right'],
- :constraint => false,
- :complete => visual_effect(:highlight, 'list-top'),
- :url => { :action => "order_blocks", :group => "top" },
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')"
- %>
-
-
-<%= sortable_element 'list-left',
- :tag => 'div',
- :only => 'mypage-box',
- :handle => "handle",
- :dropOnEmpty => true,
- :containment => ['list-top', 'list-left', 'list-right'],
- :constraint => false,
- :complete => visual_effect(:highlight, 'list-left'),
- :url => { :action => "order_blocks", :group => "left" },
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')" %>
-
-<%= sortable_element 'list-right',
- :tag => 'div',
- :only => 'mypage-box',
- :handle => "handle",
- :dropOnEmpty => true,
- :containment => ['list-top', 'list-left', 'list-right'],
- :constraint => false,
- :complete => visual_effect(:highlight, 'list-right'),
- :url => { :action => "order_blocks", :group => "right" },
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')" %>
-
+<script language="JavaScript"> +//<![CDATA[ +function recreateSortables() { + Sortable.destroy('list-top'); + Sortable.destroy('list-left'); + Sortable.destroy('list-right'); + + Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=top', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-top",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'}) + Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=left', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-left",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'}) + Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=right', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-right",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'}) +} + +function updateSelect() { + s = $('block-select') + for (var i = 0; i < s.options.length; i++) { + if ($('block_' + s.options[i].value)) { + s.options[i].disabled = true; + } else { + s.options[i].disabled = false; + } + } + s.options[0].selected = true; +} + +function afterAddBlock() { + recreateSortables(); + updateSelect(); +} + +function removeBlock(block) { + $(block).parentNode.removeChild($(block)); + updateSelect(); +} +//]]> +</script> + +<div class="contextual"> +<span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span> +<% form_tag({:action => "add_block"}, :id => "block-form") do %> +<%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %> +<%= link_to_remote l(:button_add), + {:url => { :action => "add_block" }, + :with => "Form.serialize('block-form')", + :update => "list-top", + :position => :top, + :complete => "afterAddBlock();", + :loading => "Element.show('indicator')", + :loaded => "Element.hide('indicator')" + }, :class => 'icon icon-add' + %> +<% end %> +<%= link_to l(:button_save), {:action => 'page_layout_save'}, :class => 'icon icon-save' %> +<%= link_to l(:button_cancel), {:action => 'page'}, :class => 'icon icon-cancel' %> +</div> + +<h2><%=l(:label_my_page)%></h2> + +<div id="list-top" class="block-receiver"> + <% @blocks['top'].each do |b| + next unless MyController::BLOCKS.keys.include? b %> + <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> + <% end if @blocks['top'] %> +</div> + +<div id="list-left" class="splitcontentleft block-receiver"> + <% @blocks['left'].each do |b| + next unless MyController::BLOCKS.keys.include? b %> + <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> + <% end if @blocks['left'] %> +</div> + +<div id="list-right" class="splitcontentright block-receiver"> + <% @blocks['right'].each do |b| + next unless MyController::BLOCKS.keys.include? b %> + <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> + <% end if @blocks['right'] %> +</div> + +<%= sortable_element 'list-top', + :tag => 'div', + :only => 'mypage-box', + :handle => "handle", + :dropOnEmpty => true, + :containment => ['list-top', 'list-left', 'list-right'], + :constraint => false, + :complete => visual_effect(:highlight, 'list-top'), + :url => { :action => "order_blocks", :group => "top" }, + :loading => "Element.show('indicator')", + :loaded => "Element.hide('indicator')" + %> + + +<%= sortable_element 'list-left', + :tag => 'div', + :only => 'mypage-box', + :handle => "handle", + :dropOnEmpty => true, + :containment => ['list-top', 'list-left', 'list-right'], + :constraint => false, + :complete => visual_effect(:highlight, 'list-left'), + :url => { :action => "order_blocks", :group => "left" }, + :loading => "Element.show('indicator')", + :loaded => "Element.hide('indicator')" %> + +<%= sortable_element 'list-right', + :tag => 'div', + :only => 'mypage-box', + :handle => "handle", + :dropOnEmpty => true, + :containment => ['list-top', 'list-left', 'list-right'], + :constraint => false, + :complete => visual_effect(:highlight, 'list-right'), + :url => { :action => "order_blocks", :group => "right" }, + :loading => "Element.show('indicator')", + :loaded => "Element.hide('indicator')" %> + <%= javascript_tag "updateSelect()" %>
\ No newline at end of file |