added svn:eol-style native property on /app files
git-svn-id: http://redmine.rubyforge.org/svn/trunk@333 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
071f8e18d0
commit
027bf93849
180 files changed
+6362
-6362
No files matched your search
+15
-15
@@ -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>
|
||||
+18
-18
@@ -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 %>
|
||||
@@ -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>
|
||||
@@ -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? %>
|
||||
@@ -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 %>
|
||||
@@ -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 %>
|
||||
@@ -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? %>
|
||||
+33
-33
@@ -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>
|
||||
|
||||
+116
-116
@@ -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()" %>
|
||||
Reference in new issue
Block a user