Replace splitcontent* classes with Foundation grid

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/2294/head
Alex Coles 10 years ago
parent 15c270b1f6
commit 322c14d334
  1. 8
      app/assets/stylesheets/legacy/_01_tables.sass
  2. 9
      app/assets/stylesheets/legacy/_02_tabular_forms.sass
  3. 3
      app/assets/stylesheets/rtl.css
  4. 9
      app/views/groups/_memberships.html.erb
  5. 93
      app/views/groups/_users.html.erb
  6. 6
      app/views/members/_autocomplete_for_member.html.erb
  7. 6
      app/views/my/account.html.erb
  8. 48
      app/views/my/page.html.erb
  9. 36
      app/views/my/page_layout.html.erb
  10. 102
      app/views/projects/show.html.erb
  11. 78
      app/views/types/_form.html.erb
  12. 9
      app/views/users/_memberships.html.erb
  13. 120
      app/views/users/show.html.erb
  14. 64
      app/views/welcome/index.html.erb
  15. 6
      app/views/work_packages/_time_entry.html.erb
  16. 30
      app/views/work_packages/_two_column_attributes.html.erb
  17. 128
      app/views/work_packages/bulk/edit.html.erb
  18. 100
      app/views/work_packages/moves/new.html.erb
  19. 37
      app/views/work_packages/reports/report.html.erb

@ -65,14 +65,6 @@ div.square
.message .contextual
margin-top: 0
.splitcontentleft
float: left
width: 49%
.splitcontentright
float: right
width: 49%
form
display: inline

@ -60,10 +60,6 @@ p.other-formats
/* Project members tab
div
&#tab-content-members .splitcontentleft, &#tab-content-memberships .splitcontentleft, &#tab-content-users .splitcontentleft
margin-right: 1em
&#tab-content-members .splitcontentleft, &#tab-content-memberships .splitcontentleft, &#tab-content-users .splitcontentleft, &#tab-content-members .splitcontentright, &#tab-content-memberships .splitcontentright, &#tab-content-users .splitcontentright
margin-bottom: 1em
&#tab-content-members fieldset, &#tab-content-memberships fieldset, &#tab-content-users fieldset
padding: 1em
&#tab-content-members fieldset, &#tab-content-memberships fieldset, &#tab-content-users fieldset, &#tab-content-members fieldset p
@ -85,11 +81,6 @@ div#tab-content-members fieldset div
display: inline-block
width: 350px
/* max-width of select2boxes
&#principal_results div
&.roles, &.principals
display: inline-block
width: 350px
/* max-width of select2boxes
&.select-boxes .select2-container
float: left
font-weight: normal

@ -76,8 +76,7 @@ tr.time-entry td.subject, tr.time-entry td.comments { text-align: right; }
#sidebar { float: left; }
#main.nosidebar #content { border-width: 1px; border-style: solid; border-color: #D7D7D7 #BBBBBB #BBBBBB #D7D7D7;}
.tabular.settings label { margin-left: auto; }
.splitcontentleft { float: right; }
.splitcontentright { float: left; }
p.progress-info { clear: right; }
table.list td.buttons a { padding-right: 20px; }
.filecontent { direction: ltr; }

@ -28,7 +28,9 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<% roles = Role.find_all_givable %>
<% projects = Project.active.find(:all, :order => 'lft') %>
<div class="splitcontentleft">
<div class="grid-block">
<div class="grid-content">
<% if @group.memberships.any? %>
<table class="list memberships">
<thead>
@ -73,7 +75,7 @@ See doc/COPYRIGHT.rdoc for more details.
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
<div class="splitcontentright">
<div class="grid-content">
<% if projects.any? %>
<fieldset>
<legend><%=l(:label_project_new)%></legend>
@ -84,10 +86,11 @@ See doc/COPYRIGHT.rdoc for more details.
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@group, projects) %>
<p>
<%= l(:label_role_plural) %>:
<%= labeled_check_box_tags 'membership[role_ids][]', roles %>
<%= labeled_check_box_tags 'membership[role_ids][]', roles %>
<p>
<%= submit_tag l(:button_add), class: 'button -highlight' %></p>
<% end %>
</fieldset>
<% end %>
</div>
</div>

@ -26,51 +26,54 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<div class="splitcontentleft">
<% if @group.users.any? %>
<table class="list users">
<thead>
<tr>
<th><%= User.model_name.human %></th>
<th style="width:15%"></th>
</tr>
</thead>
<tbody>
<% @group.users.sort.each do |user| %>
<tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
<td class="user"><%= link_to_user user %></td>
<td class="buttons">
<%= link_to l(:button_delete), member_of_group_path(@group, user),
:method => :delete,
:remote => :true,
:class => 'icon icon-delete' %>
</td>
<div class="grid-block">
<div class="grid-content">
<% if @group.users.any? %>
<table class="list users">
<thead>
<tr>
<th><%= User.model_name.human %></th>
<th style="width:15%"></th>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
<div class="splitcontentright">
<% users = User.active.not_in_group(@group).all(:limit => 100) %>
<% if users.any? %>
<%= form_tag(members_of_group_path(@group), :method => :post, :remote => true) do |f| %>
<fieldset><legend><%=l(:label_user_new)%></legend>
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
<%= observe_field(:user_search,
:frequency => 0.5,
:update => :users,
:url => { :controller => '/groups', :action => 'autocomplete_for_user', :id => @group },
:with => 'q',
:method => :get)
%>
<div id="users">
<%= principals_check_box_tags 'user_ids[]', users %>
</div>
<p><%= submit_tag l(:button_add), class: 'button -highlight' %></p>
</fieldset>
</thead>
<tbody>
<% @group.users.sort.each do |user| %>
<tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
<td class="user"><%= link_to_user user %></td>
<td class="buttons">
<%= link_to l(:button_delete), member_of_group_path(@group, user),
:method => :delete,
:remote => :true,
:class => 'icon icon-delete' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
<div class="grid-content">
<% users = User.active.not_in_group(@group).all(:limit => 100) %>
<% if users.any? %>
<%= form_tag(members_of_group_path(@group), :method => :post, :remote => true) do |f| %>
<fieldset><legend><%=l(:label_user_new)%></legend>
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
<%= observe_field(:user_search,
:frequency => 0.5,
:update => :users,
:url => { :controller => '/groups', :action => 'autocomplete_for_user', :id => @group },
:with => 'q',
:method => :get)
%>
<div id="users">
<%= principals_check_box_tags 'user_ids[]', users %>
</div>
<p><%= submit_tag l(:button_add), class: 'button -highlight' %></p>
</fieldset>
<% end %>
<% end %>
<% end %>
</div>
</div>

@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<div style="display:inline-block;">
<div class="principals splitcontentleft">
<div class="grid-block">
<div class="principals grid-content">
<% if principals.size > 20 %>
<p><%= simple_format(l('notice_to_many_principals_to_display'))%></p>
</div>
@ -43,7 +43,7 @@ See doc/COPYRIGHT.rdoc for more details.
</fieldset>
</div>
<div class="roles splitcontentright">
<div class="roles grid-content">
<fieldset>
<legend><%= l(:label_role_plural) %></legend>
<% roles.each do |role| %>

@ -41,8 +41,8 @@ See doc/COPYRIGHT.rdoc for more details.
:builder => TabularFormBuilder,
:lang => current_language,
:html => { :id => 'my_account_form' } do |f| %>
<div>
<div class="splitcontentleft">
<div class="grid-block">
<div class="grid-content">
<h3><%=l(:label_information_plural)%></h3>
<div class="box tabular">
<p><%= f.text_field :firstname, :required => true %></p>
@ -57,7 +57,7 @@ See doc/COPYRIGHT.rdoc for more details.
</div>
</div>
<div class="splitcontentright">
<div class="grid-content">
<h3><%= User.human_attribute_name(:mail_notification) %></h3>
<div class="box">
<%= render :partial => 'users/mail_notifications' %>

@ -32,28 +32,32 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
<h2><%=l(:label_my_page)%></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<div id="list-top">
<% @blocks['top'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<div class="mypage-box">
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
</div>
<% end if @blocks['top'] %>
<div class="grid-block">
<div id="list-top" class="grid-content">
<% @blocks['top'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<div class="mypage-box">
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
</div>
<% end if @blocks['top'] %>
</div>
</div>
<div id="list-left" class="splitcontentleft">
<% @blocks['left'].each do |b|
next unless MyController.available_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.available_blocks.keys.include? b %>
<div class="mypage-box">
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
</div>
<% end if @blocks['right'] %>
<div class="grid-block">
<div id="list-left" class="grid-content">
<% @blocks['left'].each do |b|
next unless MyController.available_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="grid-content">
<% @blocks['right'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<div class="mypage-box">
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
</div>
<% end if @blocks['right'] %>
</div>
</div>
<% html_title(l(:label_my_page)) -%>

@ -92,23 +92,27 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => 'layouts/action_menu_specific' %>
<div id="list-top" class="block-receiver">
<% @blocks['top'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['top'] %>
<div class="grid-block">
<div id="list-top" class="grid-content block-receiver">
<% @blocks['top'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['top'] %>
</div>
</div>
<div id="list-left" class="splitcontentleft block-receiver">
<% @blocks['left'].each do |b|
next unless MyController.available_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.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['right'] %>
<div class="grid-block">
<div id="list-left" class="grid-content block-receiver">
<% @blocks['left'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['left'] %>
</div>
<div id="list-right" class="grid-content block-receiver">
<% @blocks['right'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['right'] %>
</div>
</div>
<%= sortable_element 'list-top',
:tag => 'div',

@ -37,60 +37,62 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => 'layouts/action_menu_specific' %>
<% breadcrumb_paths(l(:label_overview)) %>
<div class="splitcontentleft">
<div class="wiki" ng-non-bindable>
<%= format_text @project.description %>
</div>
<ul>
<% if @project.homepage.present? %>
<li><%= Project.human_attribute_name(:homepage) %>: <%=raw auto_link(@project.homepage) %></li>
<% end %>
<% if @subprojects.any? %>
<li>
<%= l(:label_subproject_plural) %>:
<%=raw @subprojects.map { |project| link_to(project.name, project) }.to_sentence %>
</li>
<% end %>
<% @project.visible_custom_field_values.each do |custom_value| %>
<% if custom_value.value.present? %>
<li><%= custom_value.custom_field.name %>: <%= show_value(custom_value) %></li>
<div class="grid-block">
<div class="grid-content">
<div class="wiki" ng-non-bindable>
<%= format_text @project.description %>
</div>
<ul>
<% if @project.homepage.present? %>
<li><%= Project.human_attribute_name(:homepage) %>: <%=raw auto_link(@project.homepage) %></li>
<% end %>
<% end %>
</ul>
<% if User.current.allowed_to?(:view_work_packages, @project) %>
<div class="issues content-box">
<h3><%=l(:label_work_package_tracking)%></h3>
<ul>
<% for type in @types %>
<li><%= link_to (type.is_standard) ? l(:default_type) : h(type.name),
project_property_path(@project, "type_id", type.id) %>:
<%= l(:label_x_open_work_packages_abbr_on_total, :count => @open_issues_by_type[type].to_i,
:total => @total_issues_by_type[type].to_i) %>
</li>
<% end %>
</ul>
<p>
<%= link_to l(:label_work_package_view_all), {controller: :work_packages, action: :index, project_id: @project}, :class => 'button -highlight' %>
<% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
<%= link_to(l(:label_calendar), {:controller => '/work_packages/calendars', :action => 'index', :project_id => @project}, :class => 'button -highlight') %>
<% if @subprojects.any? %>
<li>
<%= l(:label_subproject_plural) %>:
<%=raw @subprojects.map { |project| link_to(project.name, project) }.to_sentence %>
</li>
<% end %>
<% @project.visible_custom_field_values.each do |custom_value| %>
<% if custom_value.value.present? %>
<li><%= custom_value.custom_field.name %>: <%= show_value(custom_value) %></li>
<% end %>
</p>
</div>
<% end %>
<%= call_hook(:view_projects_show_left, :project => @project) %>
</div>
<% end %>
</ul>
<% if User.current.allowed_to?(:view_work_packages, @project) %>
<div class="issues content-box">
<h3><%=l(:label_work_package_tracking)%></h3>
<ul>
<% for type in @types %>
<li><%= link_to (type.is_standard) ? l(:default_type) : h(type.name),
project_property_path(@project, "type_id", type.id) %>:
<%= l(:label_x_open_work_packages_abbr_on_total, :count => @open_issues_by_type[type].to_i,
:total => @total_issues_by_type[type].to_i) %>
</li>
<% end %>
</ul>
<p>
<%= link_to l(:label_work_package_view_all), {controller: :work_packages, action: :index, project_id: @project}, :class => 'button -highlight' %>
<% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
<%= link_to(l(:label_calendar), {:controller => '/work_packages/calendars', :action => 'index', :project_id => @project}, :class => 'button -highlight') %>
<% end %>
</p>
</div>
<% end %>
<%= call_hook(:view_projects_show_left, :project => @project) %>
</div>
<div class="splitcontentright">
<%= render :partial => 'members_box' %>
<div class="grid-content">
<%= render :partial => 'members_box' %>
<% if @news.any? && authorize_for('news', 'index') %>
<div class="news content-box">
<h3><%=l(:label_news_latest)%></h3>
<%= render :partial => 'news/news', :collection => @news %>
<p><%= link_to l(:label_news_view_all), {:controller => '/news', :action => 'index', :project_id => @project}, :class => 'button -highlight' %></p>
</div>
<% end %>
<%= call_hook(:view_projects_show_right, :project => @project) %>
<% if @news.any? && authorize_for('news', 'index') %>
<div class="news content-box">
<h3><%=l(:label_news_latest)%></h3>
<%= render :partial => 'news/news', :collection => @news %>
<p><%= link_to l(:label_news_view_all), {:controller => '/news', :action => 'index', :project_id => @project}, :class => 'button -highlight' %></p>
</div>
<% end %>
<%= call_hook(:view_projects_show_right, :project => @project) %>
</div>
</div>
<% content_for :sidebar do %>

@ -27,44 +27,46 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= error_messages_for 'type' %>
<div class="splitcontentleft">
<div class="box tabular">
<!--[form:type]-->
<p><%= f.text_field :name, :required => true, :disabled => @type.is_standard? %></p>
<p><%= f.check_box :is_in_roadmap %></p>
<p><%= f.select :color_id, options_for_colors(controller.type) %></p>
<p><%= f.check_box :in_aggregation %></p>
<p><%= f.check_box :is_default %></p>
<p><%= f.check_box :is_milestone %></p>
<% if WorkPackageCustomField.all.any? %>
<p>
<label><%= l(:label_custom_field_plural) %></label>
<% WorkPackageCustomField.all.each do |field| %>
<label class="block">
<%= check_box_tag 'type[custom_field_ids][]',field.id, @type.custom_fields.include?(field) %>
<%= field.name %>
</label>
<% end %>
</p>
<%= hidden_field_tag 'type[custom_field_ids][]', '' %>
<% end %>
<% if controller.type.new_record? && @types.any? %>
<p><label for="copy_workflow_from"><%= l(:label_copy_workflow_from) %></label>
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@types, :id, :name)) %></p>
<div class="grid-block">
<div class="grid-content">
<div class="box tabular">
<!--[form:type]-->
<p><%= f.text_field :name, :required => true, :disabled => @type.is_standard? %></p>
<p><%= f.check_box :is_in_roadmap %></p>
<p><%= f.select :color_id, options_for_colors(controller.type) %></p>
<p><%= f.check_box :in_aggregation %></p>
<p><%= f.check_box :is_default %></p>
<p><%= f.check_box :is_milestone %></p>
<% if WorkPackageCustomField.all.any? %>
<p>
<label><%= l(:label_custom_field_plural) %></label>
<% WorkPackageCustomField.all.each do |field| %>
<label class="block">
<%= check_box_tag 'type[custom_field_ids][]',field.id, @type.custom_fields.include?(field) %>
<%= field.name %>
</label>
<% end %>
</p>
<%= hidden_field_tag 'type[custom_field_ids][]', '' %>
<% end %>
<% if controller.type.new_record? && @types.any? %>
<p><label for="copy_workflow_from"><%= l(:label_copy_workflow_from) %></label>
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@types, :id, :name)) %></p>
<% end %>
<!--[eoform:type]-->
</div>
<%= submit_tag l(controller.type.new_record? ? :button_create : :button_save),
class: 'button -highlight' %>
</div>
<div class="grid-content">
<% if @projects.any? %>
<fieldset class="box" id="type_project_ids"><legend><%= l(:label_project_plural) %></legend>
<%= project_nested_ul(@projects) do |p|
content_tag('label', check_box_tag('type[project_ids][]', p.id, controller.type.projects.include?(p), :id => nil) + ' ' + h(p))
end %>
<%= hidden_field_tag('type[project_ids][]', '', :id => nil) %>
<p><%= check_all_links 'type_project_ids' %></p>
</fieldset>
<% end %>
<!--[eoform:type]-->
</div>
<%= submit_tag l(controller.type.new_record? ? :button_create : :button_save),
class: 'button -highlight' %>
</div>
<div class="splitcontentright">
<% if @projects.any? %>
<fieldset class="box" id="type_project_ids"><legend><%= l(:label_project_plural) %></legend>
<%= project_nested_ul(@projects) do |p|
content_tag('label', check_box_tag('type[project_ids][]', p.id, controller.type.projects.include?(p), :id => nil) + ' ' + h(p))
end %>
<%= hidden_field_tag('type[project_ids][]', '', :id => nil) %>
<p><%= check_all_links 'type_project_ids' %></p>
</fieldset>
<% end %>
</div>

@ -28,7 +28,9 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<% roles = Role.find_all_givable %>
<% projects = Project.active.find(:all, :order => 'lft') %>
<div class="splitcontentleft">
<div class="grid-block">
<div class="grid-content">
<% if @user.memberships.any? %>
<table class="list memberships">
<thead>
@ -80,7 +82,7 @@ See doc/COPYRIGHT.rdoc for more details.
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
<div class="splitcontentright">
<div class="grid-content">
<% if projects.any? %>
<fieldset><legend><%=l(:label_project_new)%></legend>
<%= form_for(:membership, :url => {:controller => 'users',
@ -91,10 +93,11 @@ See doc/COPYRIGHT.rdoc for more details.
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects) %>
<div>
<%= l(:label_role_plural) %>:
<%= labeled_check_box_tags 'membership[role_ids][]', roles %>
<%= labeled_check_box_tags 'membership[role_ids][]', roles %>
</div>
<p><%= submit_tag l(:button_add), class: 'button -highlight' %></p>
<% end %>
</fieldset>
<% end %>
</div>
</div>

@ -42,72 +42,74 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => 'layouts/action_menu_specific' %>
<div class="splitcontentleft">
<%= call_hook :view_account_left_top, :user => @user %>
<ul>
<% unless @user.pref.hide_mail %>
<li><%= User.human_attribute_name(:mail) %>: <%= mail_to(h(escape_javascript(@user.mail)), nil, :encode => 'javascript') %></li>
<% end %>
<% @user.visible_custom_field_values.each do |custom_value| %>
<% if !custom_value.value.blank? %>
<li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
<% end %>
<% end %>
<% unless @user.last_login_on.nil? %>
<li><%= User.human_attribute_name(:last_login_on) %>: <%= format_date(@user.last_login_on) %></li>
<% end %>
</ul>
<%= call_hook :view_account_left_middle, :user => @user %>
<% unless @memberships.empty? %>
<h3><%=l(:label_project_plural)%></h3>
<div class="grid-block">
<div class="grid-content">
<%= call_hook :view_account_left_top, :user => @user %>
<ul>
<% for membership in @memberships %>
<li>
<%= link_to_project(membership.project) %>
(<%=h membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)
</li>
<% unless @user.pref.hide_mail %>
<li><%= User.human_attribute_name(:mail) %>: <%= mail_to(h(escape_javascript(@user.mail)), nil, :encode => 'javascript') %></li>
<% end %>
<% @user.visible_custom_field_values.each do |custom_value| %>
<% if !custom_value.value.blank? %>
<li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
<% end %>
<% end %>
<% unless @user.last_login_on.nil? %>
<li><%= User.human_attribute_name(:last_login_on) %>: <%= format_date(@user.last_login_on) %></li>
<% end %>
</ul>
<% end %>
<%= call_hook :view_account_left_bottom, :user => @user %>
</div>
<div class="splitcontentright">
<% unless @events_by_day.empty? %>
<h3>
<%= link_to l(:label_activity), :controller => '/activities', :action => 'index', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %>
</h3>
<p>
<%=l(:label_reported_work_packages)%>: <%= @user.reported_work_package_count %>
</p>
<div id="activity">
<% @events_by_day.keys.sort.reverse.each do |day| %>
<h4><%= format_activity_day(day) %></h4>
<dl>
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
<dt class="<%= e.event_type %>">
<%= icon_wrapper("icon-context icon-#{e.event_type}", e.event_name) %>
<span class="time"><%= format_time(e.event_datetime, false) %></span>
<%= content_tag('span', h(e.project), :class => 'project') %>
<%= link_to format_activity_title(e.event_title), e.event_url %>
</dt>
<dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
<% end -%>
</dl>
<% end -%>
</div>
<%= other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:controller => '/activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %>
<%= call_hook :view_account_left_middle, :user => @user %>
<% unless @memberships.empty? %>
<h3><%=l(:label_project_plural)%></h3>
<ul>
<% for membership in @memberships %>
<li>
<%= link_to_project(membership.project) %>
(<%=h membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)
</li>
<% end %>
</ul>
<% end %>
<%= call_hook :view_account_left_bottom, :user => @user %>
</div>
<div class="grid-content">
<% unless @events_by_day.empty? %>
<h3>
<%= link_to l(:label_activity), :controller => '/activities', :action => 'index', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %>
</h3>
<p>
<%=l(:label_reported_work_packages)%>: <%= @user.reported_work_package_count %>
</p>
<div id="activity">
<% @events_by_day.keys.sort.reverse.each do |day| %>
<h4><%= format_activity_day(day) %></h4>
<dl>
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
<dt class="<%= e.event_type %>">
<%= icon_wrapper("icon-context icon-#{e.event_type}", e.event_name) %>
<span class="time"><%= format_time(e.event_datetime, false) %></span>
<%= content_tag('span', h(e.project), :class => 'project') %>
<%= link_to format_activity_title(e.event_title), e.event_url %>
</dt>
<dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
<% end -%>
</dl>
<% end -%>
</div>
<%= other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:controller => '/activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, :controller => '/activities', :action => 'index', :user_id => @user, :format => :atom, :key => User.current.rss_key) %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, :controller => '/activities', :action => 'index', :user_id => @user, :format => :atom, :key => User.current.rss_key) %>
<% end %>
<% end %>
<% end %>
<%= call_hook :view_account_right_bottom, :user => @user %>
<%= call_hook :view_account_right_bottom, :user => @user %>
</div>
</div>
<% html_title h(@user.name) %>

@ -28,39 +28,41 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<% breadcrumb_paths(nil) %>
<div class="splitcontentleft">
<div class="wiki"><%= format_text Setting.welcome_text %></div>
<% if @news.any? %>
<div class="news mypage-box">
<i class="icon-context icon-news"></i>
<h3><%=l(:label_news_latest)%></h3>
<div class="overview">
<%= render :partial => 'news/news', :collection => @news %>
<%= link_to l(:label_news_view_all), :controller => '/news' %>
<div class="grid-block">
<div class="grid-content">
<div class="wiki"><%= format_text Setting.welcome_text %></div>
<% if @news.any? %>
<div class="news mypage-box">
<i class="icon-context icon-news"></i>
<h3><%=l(:label_news_latest)%></h3>
<div class="overview">
<%= render :partial => 'news/news', :collection => @news %>
<%= link_to l(:label_news_view_all), :controller => '/news' %>
</div>
</div>
</div>
<% end %>
<%= call_hook(:view_welcome_index_left, :projects => @projects) %>
</div>
<% end %>
<%= call_hook(:view_welcome_index_left, :projects => @projects) %>
</div>
<div class="splitcontentright">
<% if @projects.any? %>
<div class="projects mypage-box overview">
<i class="icon-context icon-projects"></i>
<h3><%=l(:label_project_latest)%></h3>
<ul>
<% for project in @projects %>
<% @project = project %>
<li>
<%= link_to_project project %> (<%= format_time(project.created_on) %>)
<%= format_text project.short_description, :project => project %>
</li>
<% end %>
<% @project = nil %>
</ul>
</div>
<% end %>
<%= call_hook(:view_welcome_index_right, :projects => @projects) %>
<div class="grid-content">
<% if @projects.any? %>
<div class="projects mypage-box overview">
<i class="icon-context icon-projects"></i>
<h3><%=l(:label_project_latest)%></h3>
<ul>
<% for project in @projects %>
<% @project = project %>
<li>
<%= link_to_project project %> (<%= format_time(project.created_on) %>)
<%= format_text project.short_description, :project => project %>
</li>
<% end %>
<% @project = nil %>
</ul>
</div>
<% end %>
<%= call_hook(:view_welcome_index_right, :projects => @projects) %>
</div>
</div>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:controller => '/news', :action => 'index', :key => User.current.rss_key, :format => 'atom'},

@ -32,8 +32,8 @@ See doc/COPYRIGHT.rdoc for more details.
{ :builder => TabularFormBuilder,
:lang => current_language} do |fields| %>
<div class="clear">
<div class="splitcontentleft">
<div class="grid-block">
<div class="grid-content">
<div class="attribute_wrapper">
<%= fields.text_field :hours,
:value => number_with_delimiter(time_entry.hours, locale: I18n.locale),
@ -43,7 +43,7 @@ See doc/COPYRIGHT.rdoc for more details.
</div>
</div>
<div class="splitcontentright">
<div class="grid-content">
<div class="attribute_wrapper">
<%= fields.select :activity_id, activity_collection_for_select_options %>
</div>

@ -27,18 +27,20 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<% left_attributes, right_attributes = attributes.in_groups(2, false) %>
<div class="splitcontentleft">
<% left_attributes.each do |attribute| %>
<div class="attribute_wrapper">
<%= attribute.field %>
</div>
<% end %>
</div>
<div class="splitcontentright">
<% right_attributes.each do |attribute| %>
<div class="attribute_wrapper">
<%= attribute.field %>
</div>
<% end %>
<div class="grid-block">
<div class="grid-content">
<% left_attributes.each do |attribute| %>
<div class="attribute_wrapper">
<%= attribute.field %>
</div>
<% end %>
</div>
<div class="grid-content">
<% right_attributes.each do |attribute| %>
<div class="attribute_wrapper">
<%= attribute.field %>
</div>
<% end %>
</div>
</div>

@ -34,81 +34,83 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="box tabular">
<fieldset class="attributes">
<legend><%= l(:label_change_properties) %></legend>
<div class="splitcontentleft">
<p>
<label for="work_package_type_id"><%= WorkPackage.human_attribute_name(:type) %></label>
<%= select_tag('work_package[type_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>".html_safe + options_from_collection_for_select(@types, :id, :name)) %>
</p>
<% if @available_statuses.any? %>
<div class="grid-block">
<div class="grid-content">
<p>
<label for='status_id'><%= WorkPackage.human_attribute_name(:status) %></label>
<%= select_tag('work_package[status_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>".html_safe + options_from_collection_for_select(@available_statuses, :id, :name)) %>
<label for="work_package_type_id"><%= WorkPackage.human_attribute_name(:type) %></label>
<%= select_tag('work_package[type_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>".html_safe + options_from_collection_for_select(@types, :id, :name)) %>
</p>
<% end %>
<p>
<label for='work_package_priority_id'><%= WorkPackage.human_attribute_name(:priority) %></label>
<%= select_tag('work_package[priority_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>".html_safe + options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
</p>
<p>
<label for='work_package_assigned_to_id'><%= WorkPackage.human_attribute_name(:assigned_to) %></label>
<%= select_tag('work_package[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@assignables, :id, :name)) %>
</p>
<p>
<label for='work_package_responsible_id'><%= WorkPackage.human_attribute_name(:responsible) %></label>
<%= select_tag('work_package[responsible_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@responsibles, :id, :name)) %>
</p>
<% if @project %>
<% if @available_statuses.any? %>
<p>
<label for='status_id'><%= WorkPackage.human_attribute_name(:status) %></label>
<%= select_tag('work_package[status_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>".html_safe + options_from_collection_for_select(@available_statuses, :id, :name)) %>
</p>
<% end %>
<p>
<label for='category_id'><%= WorkPackage.human_attribute_name(:category) %></label>
<%= select_tag('work_package[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_none), :value => 'none') +
options_from_collection_for_select(@project.categories, :id, :name)) %>
<label for='work_package_priority_id'><%= WorkPackage.human_attribute_name(:priority) %></label>
<%= select_tag('work_package[priority_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>".html_safe + options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
</p>
<% end %>
<% #TODO: allow editing versions when multiple projects %>
<% if @project %>
<p>
<label for='work_package_fixed_version_id'><%= WorkPackage.human_attribute_name(:fixed_version) %></label>
<%= select_tag('work_package[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_none), :value => 'none') +
version_options_for_select(@project.shared_versions.open.sort)) %>
<label for='work_package_assigned_to_id'><%= WorkPackage.human_attribute_name(:assigned_to) %></label>
<%= select_tag('work_package[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@assignables, :id, :name)) %>
</p>
<% end %>
<% @custom_fields.each do |custom_field| %>
<p>
<%= blank_custom_field_label_tag('work_package', custom_field) %>
<%= custom_field_tag_for_bulk_edit('work_package', custom_field) %>
<label for='work_package_responsible_id'><%= WorkPackage.human_attribute_name(:responsible) %></label>
<%= select_tag('work_package[responsible_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@responsibles, :id, :name)) %>
</p>
<% end %>
<%= call_hook(:view_work_packages_bulk_edit_details_bottom, { work_packages: @work_packages }) %>
</div>
<div class="splitcontentright">
<% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
<% if @project %>
<p>
<label for='category_id'><%= WorkPackage.human_attribute_name(:category) %></label>
<%= select_tag('work_package[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_none), :value => 'none') +
options_from_collection_for_select(@project.categories, :id, :name)) %>
</p>
<% end %>
<% #TODO: allow editing versions when multiple projects %>
<% if @project %>
<p>
<label for='work_package_fixed_version_id'><%= WorkPackage.human_attribute_name(:fixed_version) %></label>
<%= select_tag('work_package[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_none), :value => 'none') +
version_options_for_select(@project.shared_versions.open.sort)) %>
</p>
<% end %>
<% @custom_fields.each do |custom_field| %>
<p>
<%= blank_custom_field_label_tag('work_package', custom_field) %>
<%= custom_field_tag_for_bulk_edit('work_package', custom_field) %>
</p>
<% end %>
<%= call_hook(:view_work_packages_bulk_edit_details_bottom, { work_packages: @work_packages }) %>
</div>
<div class="grid-content">
<% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
<p>
<label for='work_package_parent_id'><%= WorkPackage.human_attribute_name(:parent) %></label>
<%= text_field_tag 'work_package[parent_id]', '', :size => 10 %>
</p>
<div id="parent_work_package_candidates" class="autocomplete"></div>
<%= javascript_tag "observeParentIssueField('#{work_packages_auto_complete_path(project_id: @project.id)}')" %>
<% end %>
<p>
<label for='work_package_parent_id'><%= WorkPackage.human_attribute_name(:parent) %></label>
<%= text_field_tag 'work_package[parent_id]', '', :size => 10 %>
<label for='work_package_start_date'><%= WorkPackage.human_attribute_name(:start_date) %></label>
<%= text_field_tag 'work_package[start_date]', '', :size => 10 %><%= calendar_for('work_package_start_date') %>
</p>
<div id="parent_work_package_candidates" class="autocomplete"></div>
<%= javascript_tag "observeParentIssueField('#{work_packages_auto_complete_path(project_id: @project.id)}')" %>
<% end %>
<p>
<label for='work_package_start_date'><%= WorkPackage.human_attribute_name(:start_date) %></label>
<%= text_field_tag 'work_package[start_date]', '', :size => 10 %><%= calendar_for('work_package_start_date') %>
</p>
<p>
<label for='work_package_due_date'><%= WorkPackage.human_attribute_name(:due_date) %></label>
<%= text_field_tag 'work_package[due_date]', '', :size => 10 %><%= calendar_for('work_package_due_date') %>
</p>
<% if WorkPackage.use_field_for_done_ratio? %>
<p>
<label for='work_package_done_ratio'><%= WorkPackage.human_attribute_name(:done_ratio) %></label>
<%= select_tag 'work_package[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
<label for='work_package_due_date'><%= WorkPackage.human_attribute_name(:due_date) %></label>
<%= text_field_tag 'work_package[due_date]', '', :size => 10 %><%= calendar_for('work_package_due_date') %>
</p>
<% end %>
<% if WorkPackage.use_field_for_done_ratio? %>
<p>
<label for='work_package_done_ratio'><%= WorkPackage.human_attribute_name(:done_ratio) %></label>
<%= select_tag 'work_package[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
</p>
<% end %>
</div>
</div>
</fieldset>
<fieldset><legend><%= Journal.human_attribute_name(:notes) %></legend>

@ -38,55 +38,57 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="box tabular">
<fieldset class="attributes">
<legend><%= l(:label_change_properties) %></legend>
<div class="splitcontentleft">
<p><label for="new_project_id"><%= WorkPackage.human_attribute_name(:project) %>:</label>
<%= select_tag "new_project_id",
project_tree_options_for_select(@allowed_projects, :selected => @target_project),
:onchange => remote_function(:url => { :action => 'new' },
:method => :get,
:update => 'content',
:with => "Form.serialize('move_form')") %></p>
<p><label for="new_type_id"><%= WorkPackage.human_attribute_name(:type) %>:</label>
<%= select_tag("new_type_id",
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(@types, "id", "name")) %>
</p>
<p>
<label for='status_id'><%= WorkPackage.human_attribute_name(:status) %></label>
<%= select_tag('status_id',
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(@available_statuses, :id, :name)) %>
</p>
<p>
<label for='priority_id'><%= WorkPackage.human_attribute_name(:priority) %></label>
<%= select_tag('priority_id',
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
</p>
<p>
<label for='assigned_to_id'><%= WorkPackage.human_attribute_name(:assigned_to) %></label>
<%= select_tag('assigned_to_id',
content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@target_project.possible_assignees, :id, :name)) %>
</p>
<p>
<label for='responsible_id'><%= WorkPackage.human_attribute_name(:responsible) %></label>
<%= select_tag('responsible_id',
content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@target_project.possible_responsibles, :id, :name)) %>
</p>
</div>
<div class="splitcontentright">
<p>
<label for='start_date'><%= WorkPackage.human_attribute_name(:start_date) %></label>
<%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %>
</p>
<p>
<label for='due_date'><%= WorkPackage.human_attribute_name(:due_date) %></label>
<%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
</p>
<div class="grid-block">
<div class="grid-content">
<p><label for="new_project_id"><%= WorkPackage.human_attribute_name(:project) %>:</label>
<%= select_tag "new_project_id",
project_tree_options_for_select(@allowed_projects, :selected => @target_project),
:onchange => remote_function(:url => { :action => 'new' },
:method => :get,
:update => 'content',
:with => "Form.serialize('move_form')") %></p>
<p><label for="new_type_id"><%= WorkPackage.human_attribute_name(:type) %>:</label>
<%= select_tag("new_type_id",
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(@types, "id", "name")) %>
</p>
<p>
<label for='status_id'><%= WorkPackage.human_attribute_name(:status) %></label>
<%= select_tag('status_id',
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(@available_statuses, :id, :name)) %>
</p>
<p>
<label for='priority_id'><%= WorkPackage.human_attribute_name(:priority) %></label>
<%= select_tag('priority_id',
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
</p>
<p>
<label for='assigned_to_id'><%= WorkPackage.human_attribute_name(:assigned_to) %></label>
<%= select_tag('assigned_to_id',
content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@target_project.possible_assignees, :id, :name)) %>
</p>
<p>
<label for='responsible_id'><%= WorkPackage.human_attribute_name(:responsible) %></label>
<%= select_tag('responsible_id',
content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@target_project.possible_responsibles, :id, :name)) %>
</p>
</div>
<div class="grid-content">
<p>
<label for='start_date'><%= WorkPackage.human_attribute_name(:start_date) %></label>
<%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %>
</p>
<p>
<label for='due_date'><%= WorkPackage.human_attribute_name(:due_date) %></label>
<%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
</p>
</div>
</div>
</fieldset>
<fieldset><legend><%= Journal.human_attribute_name(:notes) %></legend>

@ -28,22 +28,23 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<% html_title l(:label_summary) %>
<h2><%=l(:label_summary)%></h2>
<div class="splitcontentleft">
<%
[@type_report, @priority_report, @assignee_report, @responsible_report, @author_report].each do |report| %>
<%= render :partial => 'report_category', :locals => { report: report} %>
<% end %>
<%= call_hook(:view_reports_issue_report_split_content_left, :project => @project) %>
</div>
<div class="splitcontentright">
<%
additional_reports = [@version_report]
additional_reports << @subproject_report if @project.children.any?
additional_reports << @category_report
%>
<% additional_reports.each do |report| %>
<%= render :partial => 'report_category', :locals => { report: report } %>
<br />
<% end %>
<%= call_hook(:view_reports_issue_report_split_content_right, :project => @project) %>
<div class="grid-block">
<div class="grid-content">
<% [@type_report, @priority_report, @assignee_report, @responsible_report, @author_report].each do |report| %>
<%= render :partial => 'report_category', :locals => { report: report} %>
<% end %>
<%= call_hook(:view_reports_issue_report_split_content_left, :project => @project) %>
</div>
<div class="grid-content">
<%
additional_reports = [@version_report]
additional_reports << @subproject_report if @project.children.any?
additional_reports << @category_report
%>
<% additional_reports.each do |report| %>
<%= render :partial => 'report_category', :locals => { report: report } %>
<br />
<% end %>
<%= call_hook(:view_reports_issue_report_split_content_right, :project => @project) %>
</div>
</div>

Loading…
Cancel
Save