Normalise indentation in Rails ERB views

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/2419/head
Alex Coles 10 years ago
parent e827bc5d5b
commit 15c270b1f6
  1. 4
      app/views/account/_auth_providers.html.erb
  2. 4
      app/views/account/_password_login_form.html.erb
  3. 15
      app/views/account/lost_password.html.erb
  4. 21
      app/views/account/password_recovery.html.erb
  5. 7
      app/views/admin/_no_data.html.erb
  6. 17
      app/views/admin/plugins.html.erb
  7. 83
      app/views/admin/projects.html.erb
  8. 11
      app/views/attachments/diff.html.erb
  9. 45
      app/views/auth_sources/index.html.erb
  10. 6
      app/views/boards/_form.html.erb
  11. 53
      app/views/boards/index.html.erb
  12. 44
      app/views/boards/show.html.erb
  13. 10
      app/views/categories/_form.html.erb
  14. 25
      app/views/categories/destroy.html.erb
  15. 6
      app/views/categories/edit.html.erb
  16. 6
      app/views/categories/new.html.erb
  17. 80
      app/views/common/_calendar.html.erb
  18. 113
      app/views/common/_diff.html.erb
  19. 27
      app/views/common/_file.html.erb
  20. 8
      app/views/common/_tabs.html.erb
  21. 250
      app/views/custom_fields/_form.html.erb
  22. 52
      app/views/custom_fields/_index.html.erb
  23. 4
      app/views/custom_fields/edit.html.erb
  24. 17
      app/views/enumerations/destroy.html.erb
  25. 59
      app/views/enumerations/index.html.erb
  26. 101
      app/views/groups/_memberships.html.erb
  27. 73
      app/views/groups/_users.html.erb
  28. 42
      app/views/groups/index.html.erb
  29. 6
      app/views/groups/show.html.erb
  30. 32
      app/views/help/wiki_syntax.html.erb
  31. 368
      app/views/help/wiki_syntax_detailed.html.erb
  32. 214
      app/views/layouts/angular.html.erb
  33. 215
      app/views/layouts/base.html.erb
  34. 19
      app/views/layouts/help.html.erb
  35. 4
      app/views/layouts/my.html.erb
  36. 79
      app/views/layouts/user_mailer.html.erb
  37. 4
      app/views/members/_common_error.html.erb
  38. 24
      app/views/members/_member_form_non_impaired.html.erb
  39. 8
      app/views/members/autocomplete_for_member.json.erb
  40. 52
      app/views/messages/_form.html.erb
  41. 72
      app/views/messages/show.html.erb
  42. 36
      app/views/my/_sidebar.html.erb
  43. 8
      app/views/my/account.html.erb
  44. 3
      app/views/my/blocks/_issuesassignedtome.html.erb
  45. 3
      app/views/my/blocks/_issuesreportedbyme.html.erb
  46. 3
      app/views/my/blocks/_workpackagesresponsiblefor.html.erb
  47. 27
      app/views/my/page.html.erb
  48. 83
      app/views/my/page_layout.html.erb
  49. 12
      app/views/news/_form.html.erb
  50. 3
      app/views/news/_news.html.erb
  51. 2
      app/views/news/edit.html.erb
  52. 14
      app/views/news/index.html.erb
  53. 72
      app/views/news/show.html.erb
  54. 144
      app/views/project_associations/index.html.erb
  55. 2
      app/views/project_types/index.html.erb
  56. 5
      app/views/projects/_edit.html.erb
  57. 8
      app/views/projects/_form.html.erb
  58. 23
      app/views/projects/destroy_info.html.erb
  59. 20
      app/views/projects/form/_modules.html.erb
  60. 20
      app/views/projects/form/attributes/_responsible_id.html.erb
  61. 4
      app/views/projects/index.html.erb
  62. 19
      app/views/projects/list_members.html.erb
  63. 9
      app/views/projects/new.html.erb
  64. 73
      app/views/projects/settings/_activities.html.erb
  65. 56
      app/views/projects/settings/_boards.html.erb
  66. 46
      app/views/projects/settings/_categories.html.erb
  67. 88
      app/views/projects/settings/_members.html.erb
  68. 26
      app/views/projects/settings/_modules.html.erb
  69. 28
      app/views/projects/settings/_repository.html.erb
  70. 73
      app/views/projects/settings/_versions.html.erb
  71. 35
      app/views/projects/show.html.erb
  72. 237
      app/views/queries/_filters.html.erb
  73. 2
      app/views/reportings/edit.html.erb
  74. 4
      app/views/reportings/index.html.erb
  75. 27
      app/views/repositories/_dir_list.html.erb
  76. 35
      app/views/repositories/_dir_list_content.html.erb
  77. 25
      app/views/repositories/_link_to_functions.html.erb
  78. 23
      app/views/repositories/_navigation.html.erb
  79. 42
      app/views/repositories/_revisions.html.erb
  80. 42
      app/views/repositories/annotate.html.erb
  81. 55
      app/views/repositories/committers.html.erb
  82. 6
      app/views/repositories/diff.html.erb
  83. 52
      app/views/repositories/revision.html.erb
  84. 13
      app/views/repositories/revisions.html.erb
  85. 38
      app/views/roles/_form.html.erb
  86. 8
      app/views/roles/autocomplete_for_role.json.erb
  87. 45
      app/views/roles/index.html.erb
  88. 90
      app/views/roles/report.html.erb
  89. 71
      app/views/search/index.html.erb
  90. 4
      app/views/settings/_authentication.html.erb
  91. 99
      app/views/settings/_general.html.erb
  92. 33
      app/views/settings/_mail_handler.html.erb
  93. 85
      app/views/settings/_notifications.html.erb
  94. 20
      app/views/settings/_projects.html.erb
  95. 72
      app/views/settings/_repositories.html.erb
  96. 3
      app/views/settings/_users.html.erb
  97. 33
      app/views/settings/_work_packages.html.erb
  98. 14
      app/views/settings/plugin.html.erb
  99. 55
      app/views/statuses/index.html.erb
  100. 28
      app/views/time_entries/reports/_report_criteria.html.erb
  101. Some files were not shown because too many files have changed in this diff Show More

@ -15,8 +15,8 @@ pclass = no_pwd ? 'no-pwd' : ''
<div class="login-auth-providers <%= pclass %>">
<% unless no_pwd %>
<h3 class="login-auth-providers-title"><span>
<%= I18n.t('account.login_with_auth_provider')%>
</span></h3>
<%= I18n.t('account.login_with_auth_provider')%>
</span></h3>
<% end %>
<div class="login-auth-provider-list">
<%= auth_provider_html %>

@ -43,8 +43,8 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="login-options-container">
<div class="login-links">
<% if Setting.lost_password? %>
<%= link_to l(:label_password_lost), :controller => '/account', :action => 'lost_password' %>
<br>
<%= link_to l(:label_password_lost), :controller => '/account', :action => 'lost_password' %>
<br>
<% end %>
<% if Setting.self_registration? %>
<%= link_to l(:label_register), { :controller => '/account', :action => 'register' } %>

@ -26,17 +26,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% disable_accessibility_css! %>
<h2><%=l(:label_password_lost)%></h2>
<div class="box">
<%= form_tag({:action=> "lost_password"}, :class => "tabular") do %>
<p><label for="mail"><%= required_field_name(User.human_attribute_name(:mail)) %></label>
<%= text_field_tag 'mail', nil, :size => 40 %>
<%= submit_tag l(:button_submit), class: 'button -highlight' %></p>
<% end %>
<%= form_tag({:action=> "lost_password"}, :class => "tabular") do %>
<p><label for="mail"><%= required_field_name(User.human_attribute_name(:mail)) %></label>
<%= text_field_tag 'mail', nil, :size => 40 %>
<%= submit_tag l(:button_submit), class: 'button -highlight' %></p>
<% end %>
</div>

@ -26,21 +26,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% disable_accessibility_css! %>
<h2><%=l(:label_password_lost)%></h2>
<%= error_messages_for 'user' %>
<%= form_tag({:token => @token.value}, :autocomplete => 'off') do %>
<div class="box tabular">
<p><label for="new_password"><%= required_field_name(User.human_attribute_name(:new_password)) %></label>
<%= password_field_tag 'new_password', nil, :size => 25 %>
<%= password_complexity_requirements %></p>
<p><label for="new_password_confirmation"><%= required_field_name(User.human_attribute_name(:password_confirmation)) %></label>
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
</div>
<p><%= submit_tag l(:button_save), class: 'button -highlight' %></p>
<div class="box tabular">
<p><label for="new_password"><%= required_field_name(User.human_attribute_name(:new_password)) %></label>
<%= password_field_tag 'new_password', nil, :size => 25 %>
<%= password_complexity_requirements %></p>
<p><label for="new_password_confirmation"><%= required_field_name(User.human_attribute_name(:password_confirmation)) %></label>
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
</div>
<p><%= submit_tag l(:button_save), class: 'button -highlight' %></p>
<% end %>

@ -26,12 +26,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<div class="nodata">
<%= form_tag({:action => 'default_configuration'}) do %>
<%= form_tag({:action => 'default_configuration'}) do %>
<%= simple_format(l(:text_no_configuration_data)) %>
<p><%= User.human_attribute_name(:language) %>:
<%= select_tag 'lang', options_for_select(lang_options_for_select(false), current_language.to_s) %>
<%= submit_tag l(:text_load_default_configuration), class: 'button -highlight' %></p>
<% end %>
<%= submit_tag l(:text_load_default_configuration), class: 'button -highlight' %></p>
<% end %>
</div>

@ -26,25 +26,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% html_title l(:label_administration), l(:label_plugins) %>
<h2><%= l(:label_plugins) %></h2>
<% if @plugins.any? %>
<table class="list plugins">
<table class="list plugins">
<% @plugins.each do |plugin| %>
<tr class="<%= cycle('odd', 'even') %>">
<tr class="<%= cycle('odd', 'even') %>">
<td><span class="name"><%=h plugin.name %></span>
<%= content_tag('span', h(plugin.description), :class => 'description') unless plugin.description.blank? %>
<%= content_tag('span', link_to(h(plugin.url), plugin.url), :class => 'url') unless plugin.url.blank? %>
<%= content_tag('span', h(plugin.description), :class => 'description') unless plugin.description.blank? %>
<%= content_tag('span', link_to(h(plugin.url), plugin.url), :class => 'url') unless plugin.url.blank? %>
</td>
<td class="author"><%= plugin.author_url.blank? ? h(plugin.author) : link_to(h(plugin.author), plugin.author_url) %></td>
<td class="version"><%=h plugin.version %></td>
<td class="configure"><%= link_to(l(:button_configure), :controller => '/settings', :action => 'plugin', :id => plugin.id) if plugin.configurable? %></td>
</tr>
</tr>
<% end %>
</table>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>

@ -34,71 +34,66 @@ See doc/COPYRIGHT.rdoc for more details.
<% content_for :action_menu_specific do %>
<%= link_to l(:label_project_new), {:controller => '/projects', :action => 'new'}, :class => 'icon icon-add' %>
<% end %>
<% html_title(l(:label_administration), l(:label_project_plural)) -%>
<h2><%=l(:label_project_plural)%></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<%= form_tag({}, :method => :get) do %>
<fieldset><legend><%= l(:label_filter_plural) %></legend>
<div class="vertical grid-block">
<div class="grid-block">
<div class="grid-content">
<label for='status'><%= Project.human_attribute_name(:status) %> :</label>
<%= select_tag 'status', project_status_options_for_select(@status), :class => "form--select -small", :onchange => "this.form.submit(); return false;" %>
<fieldset><legend><%= l(:label_filter_plural) %></legend>
<div class="vertical grid-block">
<div class="grid-block">
<div class="grid-content">
<label for='status'><%= Project.human_attribute_name(:status) %> :</label>
<%= select_tag 'status', project_status_options_for_select(@status), :class => "form--select -small", :onchange => "this.form.submit(); return false;" %>
</div>
<div class="grid-content">
<label for='name'><%= Project.model_name.human %>:</label>
<%= text_field_tag 'name', params[:name], :size => 30, class: 'form--select -small' %>
</div>
</div>
<div class="grid-content">
<label for='name'><%= Project.model_name.human %>:</label>
<%= text_field_tag 'name', params[:name], :size => 30, class: 'form--select -small' %>
<%= submit_tag l(:button_apply), :class => 'button -highlight -small', :name => nil %>
<%= link_to l(:button_clear), {:controller => '/admin', :action => 'projects'}, :class => 'button -small icon icon-undo' %>
</div>
</div>
<div class="grid-content">
<%= submit_tag l(:button_apply), :class => 'button -highlight -small', :name => nil %>
<%= link_to l(:button_clear), {:controller => '/admin', :action => 'projects'}, :class => 'button -small icon icon-undo' %>
</div>
</div>
</fieldset>
</fieldset>
<% end %>
&nbsp;
<div class="autoscroll">
<table class="list">
<thead><tr>
<th><%= Project.model_name.human %></th>
<th><%= Project.human_attribute_name(:is_public) %></th>
<th><%= Project.human_attribute_name(:created_on) %></th>
<th></th>
</tr></thead>
<tbody>
<% project_tree(@projects) do |project, level| %>
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="name"><span><%= link_to project, settings_project_path(project), :title => project.short_description %></span></td>
<td align="center"><%= checked_image project.is_public? %></td>
<td align="center"><%= format_date(project.created_on) %></td>
<td class="buttons">
<%= link_to(l(:button_archive),
<table class="list">
<thead>
<tr>
<th><%= Project.model_name.human %></th>
<th><%= Project.human_attribute_name(:is_public) %></th>
<th><%= Project.human_attribute_name(:created_on) %></th>
<th></th>
</tr>
</thead>
<tbody>
<% project_tree(@projects) do |project, level| %>
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="name"><span><%= link_to project, settings_project_path(project), :title => project.short_description %></span></td>
<td align="center"><%= checked_image project.is_public? %></td>
<td align="center"><%= format_date(project.created_on) %></td>
<td class="buttons">
<%= link_to(l(:button_archive),
archive_project_path(project, :status => params[:status]),
:confirm => l(:text_are_you_sure),
:method => :put,
:class => 'icon icon-locked') if project.active? %>
<%= link_to(l(:button_unarchive),
<%= link_to(l(:button_unarchive),
unarchive_project_path(project, :status => params[:status]),
:method => :put,
:class => 'icon icon-unlocked') if !project.active? && (project.parent.nil? || project.parent.active?) %>
<%= link_to(l(:button_copy),
<%= link_to(l(:button_copy),
copy_from_project_path(project, :admin),
:class => 'icon icon-copy') %>
<%= link_to(l(:button_delete),
<%= link_to(l(:button_delete),
confirm_destroy_project_path(project),
:class => 'icon icon-delete') %>
</td>
</tr>
<% end %>
</tbody>
</table>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>

@ -26,15 +26,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%=h @attachment.filename %></h2>
<div class="attachments">
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
<span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p>
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p>
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
<span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p>
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p>
</div>
&nbsp;
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>

@ -30,39 +30,36 @@ See doc/COPYRIGHT.rdoc for more details.
<% content_for :action_menu_specific do %>
<%= link_to l(:label_auth_source_new), { :action => 'new' }, :class => 'icon icon-add' %>
<% end %>
<% html_title l(:label_administration), l(:label_auth_source_plural) %>
<h2><%=l(:label_auth_source_plural)%></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<table class="list">
<thead><tr>
<th><%= AuthSource.human_attribute_name(:name) %></th>
<th><%= AuthSource.human_attribute_name(:type) %></th>
<th><%= AuthSource.human_attribute_name(:host) %></th>
<th><%= l(:label_user_plural)%></th>
<th></th>
</tr></thead>
<thead>
<tr>
<th><%= AuthSource.human_attribute_name(:name) %></th>
<th><%= AuthSource.human_attribute_name(:type) %></th>
<th><%= AuthSource.human_attribute_name(:host) %></th>
<th><%= l(:label_user_plural)%></th>
<th></th>
</tr>
</thead>
<tbody>
<% for source in @auth_sources %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to source.name, :action => 'edit', :id => source %></td>
<td align="center"><%= source.auth_method_name %></td>
<td align="center"><%= source.host %></td>
<td align="center"><%= source.users.count %></td>
<td class="buttons">
<%= link_to l(:button_test), { :action => 'test_connection', :id => source } %>
<%= link_to l(:button_delete), { :action => 'destroy', :id => source },
<% for source in @auth_sources %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to source.name, :action => 'edit', :id => source %></td>
<td align="center"><%= source.auth_method_name %></td>
<td align="center"><%= source.host %></td>
<td align="center"><%= source.users.count %></td>
<td class="buttons">
<%= link_to l(:button_test), { :action => 'test_connection', :id => source } %>
<%= link_to l(:button_delete), { :action => 'destroy', :id => source },
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-delete',
:disabled => source.users.any? %>
</td>
</tr>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= pagination_links_full @auth_sources %>

@ -26,12 +26,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= error_messages_for 'board' %>
<!--[form:board]-->
<div class="box">
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.text_field :description, :required => true, :size => 80 %></p>
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.text_field :description, :required => true, :size => 80 %></p>
</div>
<!--[eoform:board]-->

@ -26,38 +26,37 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= l(:label_board_plural) %></h2>
<table class="list boards">
<thead><tr>
<th><%= Board.name.humanize %></th>
<th><%= l(:label_topic_plural) %></th>
<th><%= l(:label_message_plural) %></th>
<th><%= l(:label_message_last) %></th>
</tr></thead>
<thead>
<tr>
<th><%= Board.name.humanize %></th>
<th><%= l(:label_topic_plural) %></th>
<th><%= l(:label_message_plural) %></th>
<th><%= l(:label_message_last) %></th>
</tr>
</thead>
<tbody>
<% for board in @boards %>
<tr class="<%= cycle 'odd', 'even' %>">
<td>
<%= link_to h(board.name), {:action => 'show', :id => board}, :class => "board" %><br />
<%=h board.description %>
</td>
<td align="center"><%= board.topics_count %></td>
<td align="center"><%= board.messages_count %></td>
<td>
<small>
<% if board.last_message %>
<%= authoring board.last_message.created_on, board.last_message.author %><br />
<%= link_to_message board.last_message %>
<% end %>
</small>
</td>
</tr>
<% end %>
<% for board in @boards %>
<tr class="<%= cycle 'odd', 'even' %>">
<td>
<%= link_to h(board.name), {:action => 'show', :id => board}, :class => "board" %><br />
<%=h board.description %>
</td>
<td align="center"><%= board.topics_count %></td>
<td align="center"><%= board.messages_count %></td>
<td>
<small>
<% if board.last_message %>
<%= authoring board.last_message.created_on, board.last_message.author %><br />
<%= link_to_message board.last_message %>
<% end %>
</small>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:controller => '/activities', :action => 'index', :id => @project, :show_messages => 1, :key => User.current.rss_key} %>
<% end %>

@ -34,25 +34,23 @@ See doc/COPYRIGHT.rdoc for more details.
{:controller => '/messages', :action => 'new', :board_id => @board},
:class => 'icon icon-add',
:onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
<%= watcher_link(@board, User.current) %>
<%= watcher_link(@board, User.current) %>
<% end %>
<div id="add-message" style="display:none;">
<% if authorize_for('messages', 'new') %>
<h2><%= link_to h(@board.name), project_board_path(@project, @board) %> &#187; <%= l(:label_message_new) %></h2>
<%= form_for Message.new,
<% if authorize_for('messages', 'new') %>
<h2><%= link_to h(@board.name), project_board_path(@project, @board) %> &#187; <%= l(:label_message_new) %></h2>
<%= form_for Message.new,
:url => board_topics_path(@board),
:html => { :multipart => true,
:id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<p><%= submit_tag l(:button_create), class: 'button -highlight' %>
<%= preview_link preview_board_topics_path(@board), 'message-form-preview', class: 'button' %>
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")', class: 'button' %></p>
<% end %>
<div id="preview" class="wiki"></div>
<% end %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<p><%= submit_tag l(:button_create), class: 'button -highlight' %>
<%= preview_link preview_board_topics_path(@board), 'message-form-preview', class: 'button' %>
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")', class: 'button' %></p>
<% end %>
<div id="preview" class="wiki"></div>
<% end %>
</div>
<h2><%=h @board.name %></h2>
<p class="subtitle"><%=h @board.description %></p>
<%= render :partial => 'layouts/action_menu_specific' %>
@ -61,13 +59,15 @@ See doc/COPYRIGHT.rdoc for more details.
<div ng-controller="MessagesController">
<% if @topics.any? %>
<table class="list messages">
<thead><tr>
<th><%= Message.human_attribute_name(:subject) %></th>
<th><%= Message.human_attribute_name(:author) %></th>
<th><sort-link sort-attr="created_on" sort-func="loadMessages()"><%= Message.human_attribute_name(:created_on) %></sort-link></th>
<th><sort-link sort-attr="replies" sort-func="loadMessages()"><%= l(:label_reply_plural) %></sort-link></th>
<th><sort-link sort-attr="updated_on" sort-func="loadMessages()"><%= l(:label_message_last) %></sort-link></th>
</tr></thead>
<thead>
<tr>
<th><%= Message.human_attribute_name(:subject) %></th>
<th><%= Message.human_attribute_name(:author) %></th>
<th><sort-link sort-attr="created_on" sort-func="loadMessages()"><%= Message.human_attribute_name(:created_on) %></sort-link></th>
<th><sort-link sort-attr="replies" sort-func="loadMessages()"><%= l(:label_reply_plural) %></sort-link></th>
<th><sort-link sort-attr="updated_on" sort-func="loadMessages()"><%= l(:label_message_last) %></sort-link></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="message in messages">
<td class="subject">
@ -98,9 +98,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<% end %>
<% html_title h(@board.name) %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
<% end %>

@ -26,12 +26,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= error_messages_for 'category' %>
<div class="box">
<p><%= f.text_field :name, :size => 30, :required => true %></p>
<p>
<%= f.select :assigned_to_id, @project.possible_assignees.sort.collect{|u| [u.name, u.id]}, :include_blank => true %>
</p>
<p><%= f.text_field :name, :size => 30, :required => true %></p>
<p>
<%= f.select :assigned_to_id, @project.possible_assignees.sort.collect{|u| [u.name, u.id]}, :include_blank => true %>
</p>
</div>

@ -26,21 +26,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= Category.model_name.human %>: <%=h @category.name %></h2>
<%= form_tag({}, {:method => :delete}) do %>
<div class="box">
<p><strong><%= l(:text_work_package_category_destroy_question, @issue_count) %></strong></p>
<p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_work_package_category_destroy_assignments) %></label>
<% if @categories.size > 0 %>
<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_work_package_category_reassign_to) %></label>
<%= label_tag "reassign_to_id", l(:description_work_package_category_reassign), :class => "hidden-for-sighted" %>
<%= select_tag 'reassign_to_id', options_from_collection_for_select(@categories, 'id', 'name') %></p>
<% end %>
</div>
<%= submit_tag l(:button_apply), class: 'button -highlight' %>
<%= link_to l(:button_cancel), { :controller => '/projects', :action => 'settings', :id => @project, :tab => 'categories' },
<div class="box">
<p><strong><%= l(:text_work_package_category_destroy_question, @issue_count) %></strong></p>
<p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_work_package_category_destroy_assignments) %></label>
<% if @categories.size > 0 %>
<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_work_package_category_reassign_to) %></label>
<%= label_tag "reassign_to_id", l(:description_work_package_category_reassign), :class => "hidden-for-sighted" %>
<%= select_tag 'reassign_to_id', options_from_collection_for_select(@categories, 'id', 'name') %></p>
<% end %>
</div>
<%= submit_tag l(:button_apply), class: 'button -highlight' %>
<%= link_to l(:button_cancel), { :controller => '/projects', :action => 'settings', :id => @project, :tab => 'categories' },
class: 'button' %>
<% end %>

@ -26,10 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= Category.model_name.human %></h2>
<%= labelled_tabular_form_for @category, :as => :category do |f| %>
<%= render :partial => 'categories/form', :locals => { :f => f } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= render :partial => 'categories/form', :locals => { :f => f } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,10 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%=l(:label_work_package_category_new)%></h2>
<%= labelled_tabular_form_for [@project, @category], :as => :category do |f| %>
<%= render :partial => 'categories/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create), class: 'button -highlight' %>
<%= render :partial => 'categories/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create), class: 'button -highlight' %>
<% end %>

@ -26,48 +26,50 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<table class="cal">
<thead>
<tr><th scope="col" title="<%= l(:label_week) %>" class="week-number"></th><% 7.times do |i| %><th scope="col"><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
</thead>
<tbody>
<tr>
<% day = calendar.startdt
<thead>
<tr>
<th scope="col" title="<%= l(:label_week) %>" class="week-number"></th>
<% 7.times do |i| %>
<th scope="col"><%= day_name( (calendar.first_wday+i)%7 ) %></th>
<% end %></tr>
</thead>
<tbody>
<tr>
<% day = calendar.startdt
while day <= calendar.enddt %>
<%= "<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>".html_safe if day.cwday == calendar.first_wday %>
<td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
<p class="day-num"><%= day.day %></p>
<% calendar.events_on(day).each do |i| %>
<% if i.is_a? WorkPackage %>
<div class="<%= work_package_css_classes(i) %> tooltip">
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%# date_img = '' %>
<% if day == i.start_date and day == i.due_date %>
<% date_img = image_tag("bullet_diamond.png", :title => l(:text_tip_work_package_begin_end_day), :alt => l(:text_tip_work_package_begin_end_day),
<%= "<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>".html_safe if day.cwday == calendar.first_wday %>
<td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
<p class="day-num"><%= day.day %></p>
<% calendar.events_on(day).each do |i| %>
<% if i.is_a? WorkPackage %>
<div class="<%= work_package_css_classes(i) %> tooltip">
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%# date_img = '' %>
<% if day == i.start_date and day == i.due_date %>
<% date_img = image_tag("bullet_diamond.png", :title => l(:text_tip_work_package_begin_end_day), :alt => l(:text_tip_work_package_begin_end_day),
:class => "imgtag-icon") %>
<% elsif day == i.start_date %>
<% date_img = image_tag("bullet_go.png", :title => l(:text_tip_work_package_begin_day), :alt => l(:text_tip_work_package_begin_day),
<% elsif day == i.start_date %>
<% date_img = image_tag("bullet_go.png", :title => l(:text_tip_work_package_begin_day), :alt => l(:text_tip_work_package_begin_day),
:class => "imgtag-icon") %>
<% elsif day == i.due_date %>
<% date_img = image_tag("bullet_end.png", :title => l(:text_tip_work_package_end_day), :alt => l(:text_tip_work_package_end_day),
<% elsif day == i.due_date %>
<% date_img = image_tag("bullet_end.png", :title => l(:text_tip_work_package_end_day), :alt => l(:text_tip_work_package_end_day),
:class => "imgtag-icon") %>
<% end %>
<%= link_to_work_package i, :truncate => 30, :before_text => date_img %>
<span class="tip"><%= render_issue_tooltip i %></span>
</div>
<% else %>
<div>
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_version i, {}, {:before_text => icon_wrapper('icon-context icon-version', Version.model_name.human) }%>
</div>
<% end %>
<% end %>
</td>
<%= '</tr><tr>'.html_safe if day.cwday==calendar.last_wday and day!=calendar.enddt %>
<% day = day + 1
<% end %>
<%= link_to_work_package i, :truncate => 30, :before_text => date_img %>
<span class="tip"><%= render_issue_tooltip i %></span>
</div>
<% else %>
<div>
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_version i, {}, {:before_text => icon_wrapper('icon-context icon-version', Version.model_name.human) }%>
</div>
<% end %>
<% end %>
</td>
<%= '</tr><tr>'.html_safe if day.cwday==calendar.last_wday and day!=calendar.enddt %>
<% day = day + 1
end %>
</tr>
</tbody>
</table>
</tr>
</tbody>
</table>

@ -26,61 +26,66 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% diff = Redmine::UnifiedDiff.new(diff, :type => diff_type, :max_lines => Setting.diff_max_lines_displayed.to_i) -%>
<% diff.each do |table_file| -%>
<div class="autoscroll">
<% if diff.diff_type == 'sbs' -%>
<table class="filecontent">
<thead>
<tr><th colspan="4" class="filename"><%= h(to_utf8_for_attachments(table_file.file_name)) %></th></tr>
</thead>
<tbody>
<% table_file.each_line do |spacing, line| -%>
<% if spacing -%>
<tr class="spacing">
<th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
</tr>
<% end -%>
<tr>
<th class="line-num"><%= line.nb_line_left %></th>
<td class="line-code <%= line.type_diff_left %>">
<pre><%=to_utf8_for_attachments line.html_line_left %></pre>
</td>
<th class="line-num"><%= line.nb_line_right %></th>
<td class="line-code <%= line.type_diff_right %>">
<pre><%=to_utf8_for_attachments line.html_line_right %></pre>
</td>
</tr>
<% end -%>
</tbody>
</table>
<% else -%>
<table class="filecontent">
<thead>
<tr><th colspan="3" class="filename"><%= to_utf8_for_attachments(table_file.file_name) %></th></tr>
</thead>
<tbody>
<% table_file.each_line do |spacing, line| %>
<% if spacing -%>
<tr class="spacing">
<th class="line-num">...</th><th class="line-num">...</th><td></td>
</tr>
<div class="autoscroll">
<% if diff.diff_type == 'sbs' -%>
<table class="filecontent">
<thead>
<tr>
<th colspan="4" class="filename"><%= h(to_utf8_for_attachments(table_file.file_name)) %></th>
</tr>
</thead>
<tbody>
<% table_file.each_line do |spacing, line| -%>
<% if spacing -%>
<tr class="spacing">
<th class="line-num">...</th>
<td></td>
<th class="line-num">...</th>
<td></td>
</tr>
<% end -%>
<tr>
<th class="line-num"><%= line.nb_line_left %></th>
<td class="line-code <%= line.type_diff_left %>">
<pre><%=to_utf8_for_attachments line.html_line_left %></pre>
</td>
<th class="line-num"><%= line.nb_line_right %></th>
<td class="line-code <%= line.type_diff_right %>">
<pre><%=to_utf8_for_attachments line.html_line_right %></pre>
</td>
</tr>
<% end -%>
</tbody>
</table>
<% else -%>
<table class="filecontent">
<thead>
<tr>
<th colspan="3" class="filename"><%= to_utf8_for_attachments(table_file.file_name) %></th>
</tr>
</thead>
<tbody>
<% table_file.each_line do |spacing, line| %>
<% if spacing -%>
<tr class="spacing">
<th class="line-num">...</th>
<th class="line-num">...</th>
<td></td>
</tr>
<% end -%>
<tr>
<th class="line-num"><%= line.nb_line_left %></th>
<th class="line-num"><%= line.nb_line_right %></th>
<td class="line-code <%= line.type_diff %>">
<pre><%=to_utf8_for_attachments line.html_line %></pre>
</td>
</tr>
<% end -%>
</tbody>
</table>
<% end -%>
</div>
<% end -%>
<tr>
<th class="line-num"><%= line.nb_line_left %></th>
<th class="line-num"><%= line.nb_line_right %></th>
<td class="line-code <%= line.type_diff %>">
<pre><%=to_utf8_for_attachments line.html_line %></pre>
</td>
</tr>
<% end -%>
</tbody>
</table>
<% end -%>
</div>
<% end -%>
<%= l(:text_diff_truncated) if diff.truncated? %>

@ -26,18 +26,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<div class="autoscroll">
<table class="filecontent CodeRay">
<tbody>
<% line_num = 1 %>
<% syntax_highlight(filename, to_utf8_for_attachments(content)).each_line do |line| %>
<tr>
<th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th>
<td class="line-code"><pre><%=raw line %></pre></td>
</tr>
<% line_num += 1 %>
<% end %>
</tbody>
</table>
<table class="filecontent CodeRay">
<tbody>
<% line_num = 1 %>
<% syntax_highlight(filename, to_utf8_for_attachments(content)).each_line do |line| %>
<tr>
<th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th>
<td class="line-code">
<pre><%=raw line %></pre>
</td>
</tr>
<% line_num += 1 %>
<% end %>
</tbody>
</table>
</div>

@ -26,13 +26,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% selected_tab = params[:tab] ? params[:tab].to_s : tabs.first[:name] %>
<div class="tabs">
<ul>
<% tabs.each do |tab| %>
<li><%=
<% tabs.each do |tab| %>
<li><%=
position_span = you_are_here_info(tab[:name] == selected_tab)
caption = case tab[:label]
when Proc
@ -44,7 +42,7 @@ See doc/COPYRIGHT.rdoc for more details.
id: "tab-#{tab[:name]}",
class: (tab[:name] != selected_tab ? nil : 'selected'),
onclick: "showTab('#{tab[:name]}', this.href); this.blur(); return false;") %></li>
<% end %>
<% end %>
</ul>
<div class="tabs-buttons" style="display:none;">
<button class="tab-left" onclick="moveTabLeft(this);"></button>

@ -26,115 +26,112 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= error_messages_for 'custom_field' %>
<script type="text/javascript">
//<![CDATA[
function toggle_custom_field_format() {
var format = $("custom_field_field_format");
var p_length = $("custom_field_min_length");
var p_regexp = $("custom_field_regexp");
var p_values = $("custom_field_possible_values_attributes");
var p_searchable = $("custom_field_searchable");
var p_default_value = $("custom_field_default_value_attributes");
var span_default_text_multi = $("default_value_text_multi");
var span_default_text_single = $("default_value_text_single");
var span_default_bool = $("default_value_bool");
var hide_and_disable = function(element) {
element.hide().
select('input, textbox').each(function (element) {
if(!element.match('.destroy_flag')) {
element.writeAttribute('disabled', 'disabled');
}
});
}
var show_and_enable = function(element) {
element.show().
select('input, textbox').each(function (element) {
if(!element.match('.destroy_flag')) {
element.removeAttribute('disabled');
}
});
//<![CDATA[
function toggle_custom_field_format() {
var format = $("custom_field_field_format");
var p_length = $("custom_field_min_length");
var p_regexp = $("custom_field_regexp");
var p_values = $("custom_field_possible_values_attributes");
var p_searchable = $("custom_field_searchable");
var p_default_value = $("custom_field_default_value_attributes");
var span_default_text_multi = $("default_value_text_multi");
var span_default_text_single = $("default_value_text_single");
var span_default_bool = $("default_value_bool");
var hide_and_disable = function(element) {
element.hide().
select('input, textbox').each(function (element) {
if(!element.match('.destroy_flag')) {
element.writeAttribute('disabled', 'disabled');
}
});
}
var show_and_enable = function(element) {
element.show().
select('input, textbox').each(function (element) {
if(!element.match('.destroy_flag')) {
element.removeAttribute('disabled');
}
});
}
hide_and_disable(span_default_bool);
hide_and_disable(span_default_text_single);
show_and_enable(span_default_text_multi);
Element.show(p_default_value);
switch (format.value) {
case "list":
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.show(p_searchable.parentNode);
show_and_enable(p_values);
break;
case "bool":
show_and_enable(span_default_bool);
hide_and_disable(span_default_text_multi);
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
break;
case "date":
hide_and_disable(span_default_text_multi);
show_and_enable(span_default_text_single);
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
break;
case "float":
case "int":
hide_and_disable(span_default_text_multi);
show_and_enable(span_default_text_single);
Element.show(p_length.parentNode);
Element.show(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
break;
case "user":
case "version":
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
Element.hide(p_default_value);
break;
default:
Element.show(p_length.parentNode);
Element.show(p_regexp.parentNode);
if (p_searchable) Element.show(p_searchable.parentNode);
hide_and_disable(p_values);
break;
}
}
hide_and_disable(span_default_bool);
hide_and_disable(span_default_text_single);
show_and_enable(span_default_text_multi);
Element.show(p_default_value);
switch (format.value) {
case "list":
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.show(p_searchable.parentNode);
show_and_enable(p_values);
break;
case "bool":
show_and_enable(span_default_bool);
hide_and_disable(span_default_text_multi);
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
break;
case "date":
hide_and_disable(span_default_text_multi);
show_and_enable(span_default_text_single);
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
break;
case "float":
case "int":
hide_and_disable(span_default_text_multi);
show_and_enable(span_default_text_single);
Element.show(p_length.parentNode);
Element.show(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
break;
case "user":
case "version":
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
Element.hide(p_default_value);
break;
default:
Element.show(p_length.parentNode);
Element.show(p_regexp.parentNode);
if (p_searchable) Element.show(p_searchable.parentNode);
hide_and_disable(p_values);
break;
}
}
function initLocaleChangeListener() {
jQuery(".locale_selector").each(function (index) {
var localeSelector = jQuery(this);
function initLocaleChangeListener() {
jQuery(".locale_selector").each(function (index) {
var localeSelector = jQuery(this);
localeSelector.change(function () {
localeSelector.children("option:selected").each(function () {
//alert(jQuery(this).attr('value'));
var span = jQuery(jQuery(this).parents("span.translation")[0])
localeSelector.change(function () {
localeSelector.children("option:selected").each(function () {
//alert(jQuery(this).attr('value'));
var span = jQuery(jQuery(this).parents("span.translation")[0])
if (typeof span.attr('lang') !== 'undefined') {
span.removeAttr('lang');
}
if (typeof span.attr('lang') !== 'undefined') {
span.removeAttr('lang');
}
span.attr('lang', jQuery(this).attr('value'));
span.attr('lang', jQuery(this).attr('value'));
});
});
});
localeSelector.change();
});
}
//]]>
localeSelector.change();
});
}
//]]>
</script>
<div class="box">
<p id="custom_field_name_attributes">
<%= f.text_field :name,
@ -194,44 +191,39 @@ jQuery(".locale_selector").each(function (index) {
<% end %>
</span>
</p>
<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
</div>
<div class="box">
<% case @custom_field.class.name
when "WorkPackageCustomField" %>
<fieldset>
<legend><%=l(:label_type_plural)%></legend>
<% for type in @types %>
<%= check_box_tag "custom_field[type_ids][]", type.id, (@custom_field.types.include? type), :id => "custom_field_type_ids_#{type.id}" %>
<%= content_tag :label, (type.is_standard) ? l(:label_custom_field_default_type) : h(type), :class => "no-css", :for => "custom_field_type_ids_#{type.id}" %>
<% end %>
<fieldset>
<legend><%=l(:label_type_plural)%></legend>
<% for type in @types %>
<%= check_box_tag "custom_field[type_ids][]", type.id, (@custom_field.types.include? type), :id => "custom_field_type_ids_#{type.id}" %>
<%= content_tag :label, (type.is_standard) ? l(:label_custom_field_default_type) : h(type), :class => "no-css", :for => "custom_field_type_ids_#{type.id}" %>
<% end %>
<%= hidden_field_tag "custom_field[type_ids][]", '' %>
</fieldset>
&nbsp;
<p><%= f.check_box :is_required %></p>
<p><%= f.check_box :is_for_all %></p>
<p><%= f.check_box :is_filter %></p>
<p><%= f.check_box :searchable %></p>
<% when "UserCustomField" %>
<p><%= f.check_box :is_required %></p>
<p><%= f.check_box :visible %></p>
<p><%= f.check_box :editable %></p>
<% when "ProjectCustomField" %>
<p><%= f.check_box :is_required %></p>
<p><%= f.check_box :visible %></p>
<p><%= f.check_box :searchable %></p>
<% when "TimeEntryCustomField" %>
<p><%= f.check_box :is_required %></p>
<% else %>
<p><%= f.check_box :is_required %></p>
<% end %>
<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
</div>
<%= javascript_tag "toggle_custom_field_format();" %>
<%= javascript_tag "initLocaleChangeListener();" %>
<% when "UserCustomField" %>
<p><%= f.check_box :is_required %></p>
<p><%= f.check_box :visible %></p>
<p><%= f.check_box :editable %></p>
<% when "ProjectCustomField" %>
<p><%= f.check_box :is_required %></p>
<p><%= f.check_box :visible %></p>
<p><%= f.check_box :searchable %></p>
<% when "TimeEntryCustomField" %>
<p><%= f.check_box :is_required %></p>
<% else %>
<p><%= f.check_box :is_required %></p>
<% end %>
<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
</div>
<%= javascript_tag "toggle_custom_field_format();" %>
<%= javascript_tag "initLocaleChangeListener();" %>

@ -26,36 +26,36 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<table class="list">
<thead><tr>
<th width="30%"><%= CustomField.human_attribute_name(:name) %></th>
<th><%= CustomField.human_attribute_name(:field_format) %></th>
<th><%= CustomField.human_attribute_name(:is_required) %></th>
<% if tab[:name] == 'WorkPackageCustomField' %>
<th><%= CustomField.human_attribute_name(:is_for_all) %></th>
<th><%=l(:label_used_by)%></th>
<% end %>
<th><%=l(:button_sort)%></th>
<th width="10%"></th>
</tr></thead>
<tbody>
<% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to h(custom_field.name), edit_custom_field_path(custom_field), lang: custom_field.name_locale %></td>
<td align="center"><%= Redmine::CustomFieldFormat.label_for(custom_field.field_format) %></td>
<td align="center"><%= checked_image custom_field.is_required? %></td>
<thead>
<tr>
<th width="30%"><%= CustomField.human_attribute_name(:name) %></th>
<th><%= CustomField.human_attribute_name(:field_format) %></th>
<th><%= CustomField.human_attribute_name(:is_required) %></th>
<% if tab[:name] == 'WorkPackageCustomField' %>
<td align="center"><%= checked_image custom_field.is_for_all? %></td>
<td align="center"><%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? WorkPackageCustomField and !custom_field.is_for_all? %></td>
<th><%= CustomField.human_attribute_name(:is_for_all) %></th>
<th><%=l(:label_used_by)%></th>
<% end %>
<td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'update', :id => custom_field}, method: :put) %></td>
<td class="buttons">
<%= delete_link custom_field_path(custom_field) %>
</td>
<th><%=l(:button_sort)%></th>
<th width="10%"></th>
</tr>
<% end; reset_cycle %>
</thead>
<tbody>
<% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to h(custom_field.name), edit_custom_field_path(custom_field), lang: custom_field.name_locale %></td>
<td align="center"><%= Redmine::CustomFieldFormat.label_for(custom_field.field_format) %></td>
<td align="center"><%= checked_image custom_field.is_required? %></td>
<% if tab[:name] == 'WorkPackageCustomField' %>
<td align="center"><%= checked_image custom_field.is_for_all? %></td>
<td align="center"><%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? WorkPackageCustomField and !custom_field.is_for_all? %></td>
<% end %>
<td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'update', :id => custom_field}, method: :put) %></td>
<td class="buttons">
<%= delete_link custom_field_path(custom_field) %>
</td>
</tr>
<% end; reset_cycle %>
</tbody>
</table>
<p><%= link_to l(:label_custom_field_new), new_custom_field_path(:type => tab[:name]), :class => 'icon icon-add' %></p>

@ -36,6 +36,6 @@ See doc/COPYRIGHT.rdoc for more details.
<%= labelled_tabular_form_for @custom_field, :as => :custom_field,
:url => custom_field_path(@custom_field),
:html => {:method => :put, :id => 'custom_field_form'} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,17 +26,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= l(@enumeration.option_name) %>: <%=h @enumeration %></h2>
<%= form_tag({}, :method => :delete) do %>
<div class="box">
<p><strong><%= l(:text_enumeration_destroy_question, @enumeration.objects_count) %></strong></p>
<p><label for='reassign_to_id'><%= l(:text_enumeration_category_reassign_to) %></label>
<%= select_tag 'reassign_to_id', options_from_collection_for_select(@enumerations, 'id', 'name') %></p>
</div>
<%= submit_tag l(:button_apply), class: 'button -highlight' %>
<%= link_to l(:button_cancel), { :controller => '/enumerations', :action => 'index' },
<div class="box">
<p><strong><%= l(:text_enumeration_destroy_question, @enumeration.objects_count) %></strong></p>
<p><label for='reassign_to_id'><%= l(:text_enumeration_category_reassign_to) %></label>
<%= select_tag 'reassign_to_id', options_from_collection_for_select(@enumerations, 'id', 'name') %></p>
</div>
<%= submit_tag l(:button_apply), class: 'button -highlight' %>
<%= link_to l(:button_cancel), { :controller => '/enumerations', :action => 'index' },
class: 'button' %>
<% end %>

@ -26,41 +26,38 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% html_title l(:label_administration), l(:label_enumerations) %>
<h2><%=l(:label_enumerations)%></h2>
<% Enumeration.descendants.each do |klass| %>
<h3><%= l(klass::OptionName) %></h3>
<% enumerations = klass.shared %>
<% if enumerations.any? %>
<table class="list"><thead>
<tr>
<th><%= Enumeration.human_attribute_name(:name) %></th>
<th style="width:15%;"><%= Enumeration.human_attribute_name(:is_default) %></th>
<th style="width:15%;"><%= Enumeration.human_attribute_name(:active) %></th>
<th style="width:15%;"></th>
<th align="center" style="width:10%;"> </th>
</tr></thead>
<% enumerations.each do |enumeration| %>
<tr class="<%= cycle('odd', 'even') %>">
<td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
<td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td>
<td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :method => :put) %></td>
<td class="buttons">
<%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
<h3><%= l(klass::OptionName) %></h3>
<% enumerations = klass.shared %>
<% if enumerations.any? %>
<table class="list">
<thead>
<tr>
<th><%= Enumeration.human_attribute_name(:name) %></th>
<th style="width:15%;"><%= Enumeration.human_attribute_name(:is_default) %></th>
<th style="width:15%;"><%= Enumeration.human_attribute_name(:active) %></th>
<th style="width:15%;"></th>
<th align="center" style="width:10%;"> </th>
</tr>
</thead>
<% enumerations.each do |enumeration| %>
<tr class="<%= cycle('odd', 'even') %>">
<td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
<td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td>
<td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :method => :put) %></td>
<td class="buttons">
<%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-delete' %>
</td>
</tr>
<% end %>
</table>
<% reset_cycle %>
<% end %>
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p>
</td>
</tr>
<% end %>
</table>
<% reset_cycle %>
<% end %>
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p>
<% end %>

@ -26,69 +26,68 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% roles = Role.find_all_givable %>
<% projects = Project.active.find(:all, :order => 'lft') %>
<div class="splitcontentleft">
<% if @group.memberships.any? %>
<table class="list memberships">
<thead><tr>
<th><%= Project.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
</tr></thead>
<tbody>
<% @group.memberships.each do |membership| %>
<% next if membership.new_record? %>
<tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
<td class="project"><%=h membership.project %></td>
<td class="roles">
<span id="member-<%= membership.id %>-roles"><%=h membership.roles.sort.collect(&:to_s).join(', ') %></span>
<%= form_tag(membership_of_group_path(@group, membership),
<% if @group.memberships.any? %>
<table class="list memberships">
<thead>
<tr>
<th><%= Project.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
</tr>
</thead>
<tbody>
<% @group.memberships.each do |membership| %>
<% next if membership.new_record? %>
<tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
<td class="project"><%=h membership.project %></td>
<td class="roles">
<span id="member-<%= membership.id %>-roles"><%=h membership.roles.sort.collect(&:to_s).join(', ') %></span>
<%= form_tag(membership_of_group_path(@group, membership),
:method => :put,
:remote => true,
:id => "member-#{membership.id}-roles-form",
:style => 'display:none;') do %>
<p><% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role) %> <%=h role %></label>
<% end %></p>
<p><%= submit_tag l(:button_change), class: 'button -highlight -small' %>
<%= link_to_function l(:button_cancel), "$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;",
<p><% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role) %> <%=h role %></label>
<% end %></p>
<p><%= submit_tag l(:button_change), class: 'button -highlight -small' %>
<%= link_to_function l(:button_cancel), "$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;",
class: 'button -small' %></p>
<% end %>
</td>
<td class="buttons">
<%= link_to_function l(:button_edit), "$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
<%= link_to l(:button_delete), membership_of_group_path(@group, membership),
<% end %>
</td>
<td class="buttons">
<%= link_to_function l(:button_edit), "$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
<%= link_to l(:button_delete), membership_of_group_path(@group, membership),
:method => :delete,
:remote => true,
:class => 'icon icon-delete' %>
</td>
</tr>
</tbody>
<% end; reset_cycle %>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
<div class="splitcontentright">
<% if projects.any? %>
<fieldset>
<legend><%=l(:label_project_new)%></legend>
<%= form_tag(memberships_of_group_path(@group),
</td>
</tr>
</tbody>
<% end; reset_cycle %>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
<div class="splitcontentright">
<% if projects.any? %>
<fieldset>
<legend><%=l(:label_project_new)%></legend>
<%= form_tag(memberships_of_group_path(@group),
:method => :post,
:remote => true) do %>
<%= label_tag "membership_project_id", l(:description_choose_project), :class => "hidden-for-sighted" %>
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@group, projects) %>
<p>
<%= l(:label_role_plural) %>:
<%= label_tag "membership_project_id", l(:description_choose_project), :class => "hidden-for-sighted" %>
<%= 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 %>
<p>
<%= submit_tag l(:button_add), class: 'button -highlight' %></p>
<p>
<%= submit_tag l(:button_add), class: 'button -highlight' %></p>
<% end %>
</fieldset>
<% end %>
</fieldset>
<% end %>
</div>
</div>

@ -26,56 +26,51 @@ 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),
<% 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>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</td>
</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,
<% 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>
<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>

@ -30,29 +30,27 @@ See doc/COPYRIGHT.rdoc for more details.
<% content_for :action_menu_specific do %>
<%= link_to l(:label_group_new), new_group_path, :class => 'icon icon-add' %>
<% end %>
<% html_title l(:label_administration), l("label_group_plural") %>
<h2><%= l(:label_group_plural) %></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<% if @groups.any? %>
<table class="list groups">
<thead><tr>
<th><%= Group.model_name.human %></th>
<th><%=l(:label_user_plural)%></th>
<th></th>
</tr></thead>
<tbody>
<% @groups.each do |group| %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%= link_to h(group), :action => 'edit', :id => group %></td>
<td align="center"><%= group.users.size %></td>
<td class="buttons"><%= link_to l(:button_delete), group, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %></td>
</tr>
<% end %>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<table class="list groups">
<thead>
<tr>
<th><%= Group.model_name.human %></th>
<th><%=l(:label_user_plural)%></th>
<th></th>
</tr>
</thead>
<tbody>
<% @groups.each do |group| %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%= link_to h(group), :action => 'edit', :id => group %></td>
<td align="center"><%= group.users.size %></td>
<td class="buttons"><%= link_to l(:button_delete), group, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %></td>
</tr>
<% end %>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>

@ -26,11 +26,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= link_to l(:label_group_plural), groups_path %> &#187; <%=h @group %></h2>
<ul>
<% @group.users.each do |user| %>
<% @group.users.each do |user| %>
<li><%=h user %></li>
<% end %>
<% end %>
</ul>

@ -26,9 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% content_for :styles do %>
h1 { font-family: Verdana, sans-serif; font-size: 14px; text-align: center; color: #444; }
h1 { font-family: Verdana, sans-serif; font-size: 14px; text-align: center; color: #444; }
body { font-family: Verdana, sans-serif; font-size: 12px; color: #444; }
table th { padding-top: 1em; }
table td { vertical-align: top; background-color: #f5f5f5; height: 2em; vertical-align: middle;}
@ -77,9 +76,12 @@ See doc/COPYRIGHT.rdoc for more details.
</tr>
<tr>
<th><%= image_tag 'jstoolbar/bt_pre.png', :style => 'border: 1px solid #bbb', :alt => 'Preformatted text' %></th>
<td>&lt;pre><br />&nbsp;lines<br />&nbsp;of code<br />&lt;/pre></td>
<td>&lt;pre><br />
&nbsp;lines<br />
&nbsp;of code<br />
&lt;/pre></td>
<td>
<pre>
<pre>
lines
of code
</pre>
@ -91,7 +93,8 @@ See doc/COPYRIGHT.rdoc for more details.
</tr>
<tr>
<th><%= image_tag 'jstoolbar/bt_ul.png', :style => 'border: 1px solid #bbb', :alt => 'Unordered list' %></th>
<td>* Item 1<br />* Item 2</td>
<td>* Item 1<br />
* Item 2</td>
<td>
<ul>
<li>Item 1</li>
@ -101,7 +104,8 @@ See doc/COPYRIGHT.rdoc for more details.
</tr>
<tr>
<th><%= image_tag 'jstoolbar/bt_ol.png', :style => 'border: 1px solid #bbb', :alt => 'Ordered list' %></th>
<td># Item 1<br /># Item 2</td>
<td># Item 1<br />
# Item 2</td>
<td>
<ol>
<li>Item 1</li>
@ -116,19 +120,24 @@ See doc/COPYRIGHT.rdoc for more details.
<tr>
<th><%= image_tag 'jstoolbar/bt_h1.png', :style => 'border: 1px solid #bbb', :alt => 'Heading 1' %></th>
<td>h1. Title 1</td>
<td><h1>Title 1</h1></td>
<td>
<h1>Title 1</h1>
</td>
</tr>
<tr>
<th><%= image_tag 'jstoolbar/bt_h2.png', :style => 'border: 1px solid #bbb', :alt => 'Heading 2' %></th>
<td>h2. Title 2</td>
<td><h2>Title 2</h2></td>
<td>
<h2>Title 2</h2>
</td>
</tr>
<tr>
<th><%= image_tag 'jstoolbar/bt_h3.png', :style => 'border: 1px solid #bbb', :alt => 'Heading 3' %></th>
<td>h3. Title 3</td>
<td><h3>Title 3</h3></td>
<td>
<h3>Title 3</h3>
</td>
</tr>
<tr>
<th colspan="3">Links</th>
</tr>
@ -170,6 +179,7 @@ See doc/COPYRIGHT.rdoc for more details.
<th></th>
<td>WorkPackage ###12</td>
<td>WorkPackage <a href="#">Bug #12: WorkPackage Subject</a> 2012-06-06 – 2013-06-06
<div style="padding-left: 10px; padding-top: 0.5em; padding-bottom: 0.5em; line-height: 1.5em;">
<strong>Responsible:</strong> John Doe<br>
<strong>Assigned to:</strong> John Doe
@ -177,7 +187,7 @@ See doc/COPYRIGHT.rdoc for more details.
<div style="padding-left: 10px;">
I am the description of this work package.
</div>
</td>
</td>
</tr>
<tr>
<th></th>

@ -26,9 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% content_for :styles do %>
body { font:80% Verdana,Tahoma,Arial,sans-serif; }
body { font:80% Verdana,Tahoma,Arial,sans-serif; }
h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; }
pre, code { font-size:120%; }
pre code { font-size:100%; }
@ -57,125 +56,103 @@ See doc/COPYRIGHT.rdoc for more details.
.CodeRay .s { background-color:#fff0f0 }
.CodeRay .s .dl { color:#710 }
<% end %>
<% html_title "Wiki Formatting" %>
<h1><a name="1" class="wiki-page"></a>Wiki Formatting</h1>
<h2><a name="2" class="wiki-page"></a>Links</h2>
<h3><a name="3" class="wiki-page"></a>OpenProject links</h3>
<p>OpenProject allows hyperlinking between work packages, changesets and wiki pages from anywhere wiki formatting is used.</p>
<ul>
<li><strong>#124</strong> displays a link to a work package: <del><a href="#" class="work package" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del> (link is striked-through if the work package is closed)</li>
<li><strong>##124</strong> displays a link to a work package with context information: <a href="#" class="work package status-1 priority-2 overdue created-by-me" title="Work package subject (New)">Bug #12: Work package subject</a> 2012-05-14 - 2012-05-23</li>
<li><strong>###124</strong> displays a link to a work package with context information and an excerpt (first 3 lines) of the description</li>
<li><strong>r758</strong> displays a link to a changeset: <a href="#" class="changeset" title="Search engine now only searches objects the user is allowed to view.">r758</a></li>
<li><strong>commit:c6f4d0fd</strong> displays a link to a changeset with a non-numeric hash: <a href="#" class="changeset">c6f4d0fd</a></li>
<li><strong>sandbox:r758</strong> displays a link to a changeset of another project: <a href="#" class="changeset" title="Search engine now only searches objects the user is allowed to view.">sandbox:r758</a></li>
<li><strong>sandbox:c6f4d0fd</strong> displays a link to a changeset with a non-numeric hash: <a href="#" class="changeset">sandbox:c6f4d0fd</a></li>
</ul>
<p>Wiki links:</p>
<ul>
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
</ul>
<p>You can also link to pages of an other project wiki:</p>
<ul>
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
</ul>
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
<p>Links to other resources:</p>
<ul>
<li>Versions:
<ul>
<li><strong>version#3</strong> (link to version with id 3)</li>
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
<li><strong>version:"1.0 beta 2"</strong></li>
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
</ul></li>
</ul>
<ul>
<li>Attachments:
<ul>
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
<li>For now, attachments of the current object can be referenced only (if you're on a work package, it's possible to reference attachments of this work package only)</li>
</ul></li>
</ul>
<ul>
<li>Repository files:
<ul>
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
<li><strong>export:some/file</strong> (force the download of the file)</li>
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
</ul></li>
</ul>
<ul>
<li>Forum messages:
<ul>
<li><strong>message#1218</strong> (link to message with id 1218)</li>
</ul></li>
</ul>
<ul>
<li>Projects:
<ul>
<li><strong>project#3</strong> (link to project with id 3)</li>
<li><strong>project:someproject</strong> (link to project named "someproject")</li>
</ul></li>
</ul>
<p>Escaping:</p>
<ul>
<li>You can prevent OpenProject links from being parsed by preceding them with an exclamation mark: !</li>
</ul>
<h3><a name="4" class="wiki-page"></a>External links</h3>
<p>HTTP URLs and email addresses are automatically turned into clickable links:</p>
<h2><a name="2" class="wiki-page"></a>Links</h2>
<h3><a name="3" class="wiki-page"></a>OpenProject links</h3>
<p>OpenProject allows hyperlinking between work packages, changesets and wiki pages from anywhere wiki formatting is used.</p>
<ul>
<li><strong>#124</strong> displays a link to a work package: <del><a href="#" class="work package" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del> (link is striked-through if the work package is closed)</li>
<li><strong>##124</strong> displays a link to a work package with context information: <a href="#" class="work package status-1 priority-2 overdue created-by-me" title="Work package subject (New)">Bug #12: Work package subject</a> 2012-05-14 - 2012-05-23</li>
<li><strong>###124</strong> displays a link to a work package with context information and an excerpt (first 3 lines) of the description</li>
<li><strong>r758</strong> displays a link to a changeset: <a href="#" class="changeset" title="Search engine now only searches objects the user is allowed to view.">r758</a></li>
<li><strong>commit:c6f4d0fd</strong> displays a link to a changeset with a non-numeric hash: <a href="#" class="changeset">c6f4d0fd</a></li>
<li><strong>sandbox:r758</strong> displays a link to a changeset of another project: <a href="#" class="changeset" title="Search engine now only searches objects the user is allowed to view.">sandbox:r758</a></li>
<li><strong>sandbox:c6f4d0fd</strong> displays a link to a changeset with a non-numeric hash: <a href="#" class="changeset">sandbox:c6f4d0fd</a></li>
</ul>
<p>Wiki links:</p>
<ul>
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
</ul>
<p>You can also link to pages of an other project wiki:</p>
<ul>
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
</ul>
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
<p>Links to other resources:</p>
<ul>
<li>Versions:
<ul>
<li><strong>version#3</strong> (link to version with id 3)</li>
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
<li><strong>version:"1.0 beta 2"</strong></li>
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
</ul>
</li>
</ul>
<ul>
<li>Attachments:
<ul>
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
<li>For now, attachments of the current object can be referenced only (if you're on a work package, it's possible to reference attachments of this work package only)</li>
</ul>
</li>
</ul>
<ul>
<li>Repository files:
<ul>
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
<li><strong>export:some/file</strong> (force the download of the file)</li>
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
</ul>
</li>
</ul>
<ul>
<li>Forum messages:
<ul>
<li><strong>message#1218</strong> (link to message with id 1218)</li>
</ul>
</li>
</ul>
<ul>
<li>Projects:
<ul>
<li><strong>project#3</strong> (link to project with id 3)</li>
<li><strong>project:someproject</strong> (link to project named "someproject")</li>
</ul>
</li>
</ul>
<p>Escaping:</p>
<ul>
<li>You can prevent OpenProject links from being parsed by preceding them with an exclamation mark: !</li>
</ul>
<h3><a name="4" class="wiki-page"></a>External links</h3>
<p>HTTP URLs and email addresses are automatically turned into clickable links:</p>
<pre>
https://www.openproject.org, someone@foo.bar
</pre>
<p>displays: <a class="external" href="https://www.openproject.org">https://www.openproject.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
<p>If you want to display a specific text instead of the URL, you can use the standard textile syntax:</p>
<p>displays: <a class="external" href="https://www.openproject.org">https://www.openproject.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
<p>If you want to display a specific text instead of the URL, you can use the standard textile syntax:</p>
<pre>
"OpenProject web site":https://www.openproject.org
</pre>
<p>displays: <a href="https://www.openproject.org" class="external">OpenProject web site</a></p>
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
<p>For things such as headlines, bold, tables, lists, OpenProject supports Textile syntax. See <a class="external" href="http://www.textism.com/tools/textile/">http://www.textism.com/tools/textile/</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
<h3><a name="6" class="wiki-page"></a>Font style</h3>
<p>displays: <a href="https://www.openproject.org" class="external">OpenProject web site</a></p>
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
<p>For things such as headlines, bold, tables, lists, OpenProject supports Textile syntax. See <a class="external" href="http://www.textism.com/tools/textile/">http://www.textism.com/tools/textile/</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
<h3><a name="6" class="wiki-page"></a>Font style</h3>
<pre>
* *bold*
* _italic_
@ -183,125 +160,110 @@ https://www.openproject.org, someone@foo.bar
* +underline+
* -strike-through-
</pre>
<p>Display:</p>
<ul>
<li><strong>bold</strong></li>
<li><em>italic</em></li>
<li><em>*bold italic*</em></li>
<li><ins>underline</ins></li>
<li><del>strike-through</del></li>
</ul>
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
<ul>
<li><strong>!image_url!</strong> displays an image located at image_url (textile syntax)</li>
<li><strong>!>image_url!</strong> right floating image</li>
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong>!attached_image.png!</strong></li>
</ul>
<h3><a name="8" class="wiki-page"></a>Headings</h3>
<p>Prefixing a line with <code>h1.</code>, <code>h2.</code> etc. will create a heading:</p>
<p>Display:</p>
<ul>
<li><strong>bold</strong></li>
<li><em>italic</em></li>
<li><em>*bold italic*</em></li>
<li><ins>underline</ins></li>
<li><del>strike-through</del></li>
</ul>
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
<ul>
<li><strong>!image_url!</strong> displays an image located at image_url (textile syntax)</li>
<li><strong>!>image_url!</strong> right floating image</li>
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong>!attached_image.png!</strong></li>
</ul>
<h3><a name="8" class="wiki-page"></a>Headings</h3>
<p>Prefixing a line with <code>h1.</code>, <code>h2.</code> etc. will create a heading:</p>
<pre>
h1. Heading
h2. Subheading
h3. Subsubheading
</pre>
<p>OpenProject assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
<h3>Numbered Headings</h3>
<p>
You may also define numbered headings by prefixing lines with <code>h1#.</code>, <code>h2#.</code> etc. The heading numbers are then automatically managed by OpenProject for you.
<p>OpenProject assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
<h3>Numbered Headings</h3>
<p>
You may also define numbered headings by prefixing lines with <code>h1#.</code>, <code>h2#.</code> etc. The heading numbers are then automatically managed by OpenProject for you.
</p>
<table>
<thead>
<tr>
<th>
Wiki format
<table>
<thead>
<tr>
<th>
Wiki format
</th>
<th style='padding-left: 3em'>
Resulting Text
<th style='padding-left: 3em'>
Resulting Text
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre>
h1#. Topic Foo
h2#. Sub-Topic Foo Bar
h1#. Topic Baz
</pre>
</td>
<td style='padding-left: 3em'>
<strong>1. Topic A</strong><br/>
1.2. Sub-Topic 1<br/>
<strong>2. Topic B</strong>
</td>
</tr>
</tbody>
</table>
<h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
</td>
<td style='padding-left: 3em'>
<strong>1. Topic A</strong><br/>
1.2. Sub-Topic 1<br/>
<strong>2. Topic B</strong>
</td>
</tr>
</tbody>
</table>
<h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
<pre>
p>. right aligned
p=. centered
</pre>
<p style="text-align:center;">This is a centered paragraph.</p>
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
<p>Start the paragraph with <strong>bq.</strong></p>
<p style="text-align:center;">This is a centered paragraph.</p>
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
<p>Start the paragraph with <strong>bq.</strong></p>
<pre>
bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
To go live, all you need to add is a database and a web server.
</pre>
<p>Display:</p>
<blockquote>
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
</blockquote>
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
<p>Display:</p>
<blockquote>
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />
To go live, all you need to add is a database and a web server.</p>
</blockquote>
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
<pre>
{{toc}} => left aligned toc
{{>toc}} => right aligned toc
</pre>
<h2><a name="12" class="wiki-page"></a>Macros</h2>
<p>OpenProject has the following builtin macros:</p>
<p><dl><dt><code>hello_world</code></dt><dd><p>Sample macro.</p></dd><dt><code>include</code></dt><dd><p>Include a wiki page. Example:</p>
<pre><code>{{include(Foo)}}</code></pre></dd><dt><code>macro_list</code></dt><dd><p>Displays a list of all available macros, including description if available.</p></dd></dl></p>
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
<p>Code highlighting relies on <a href="http://coderay.rubychan.de/" class="external">CodeRay</a>, a fast syntax highlighting library written completely in Ruby. It currently supports c, cpp, css, delphi, groovy, html, java, javascript, json, php, python, rhtml, ruby, scheme, sql, xml and yaml languages.</p>
<p>You can highlight code in your wiki page using this syntax:</p>
<h2><a name="12" class="wiki-page"></a>Macros</h2>
<p>OpenProject has the following builtin macros:</p>
<p>
<dl>
<dt><code>hello_world</code></dt>
<dd>
<p>Sample macro.</p>
</dd>
<dt><code>include</code></dt>
<dd>
<p>Include a wiki page. Example:</p>
<pre><code>{{include(Foo)}}</code></pre>
</dd>
<dt><code>macro_list</code></dt>
<dd>
<p>Displays a list of all available macros, including description if available.</p>
</dd>
</dl>
</p>
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
<p>Code highlighting relies on <a href="http://coderay.rubychan.de/" class="external">CodeRay</a>, a fast syntax highlighting library written completely in Ruby. It currently supports c, cpp, css, delphi, groovy, html, java, javascript, json, php, python, rhtml, ruby, scheme, sql, xml and yaml languages.</p>
<p>You can highlight code in your wiki page using this syntax:</p>
<pre>
&lt;pre&gt;&lt;code class="ruby"&gt;
Place you code here.
&lt;/code&gt;&lt;/pre&gt;
</pre>
<p>Example:</p>
<p>Example:</p>
<pre><code class="ruby CodeRay"><span class="no"> 1</span> <span class="c"># The Greeter class</span>
<span class="no"> 2</span> <span class="r">class</span> <span class="cl">Greeter</span>
<span class="no"> 3</span> <span class="r">def</span> <span class="fu">initialize</span>(name)

@ -28,128 +28,116 @@ See doc/COPYRIGHT.rdoc for more details.
++#%><!DOCTYPE html>
<% show_decoration = params["layout"].nil? %>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<%= I18n.locale.to_s %>" xml:lang="<%= I18n.locale.to_s %>" class="<%= 'in_modal' unless show_decoration %>">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><%= html_title %></title>
<meta name="description" content="<%= OpenProject::Info.app_name %>" />
<meta name="keywords" content="issue,bug,type" />
<meta name="app_base_path" content="<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" />
<base href="/<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" />
<meta name="current_menu_item" content="<%= current_menu_item %>" />
<meta name="accessibility-mode" content="<%= current_user.impaired? %>" />
<%= csrf_meta_tags %>
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => "all" %>
<% if User.current.impaired? && accessibility_css_enabled? %>
<%= stylesheet_link_tag 'accessibility' %>
<% end %>
<%= include_gon %>
<%= javascript_include_tag 'application' %>
<!-- plug-in specific tags -->
<%= call_hook :view_work_package_overview_attributes %>
<!-- user specific tags -->
<%= user_specific_javascript_includes %>
<!-- project specific tags -->
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= content_for(:header_tags) if content_for?(:header_tags) %>
</head>
<body class="<%= body_css_classes %>" ng-app="openproject" data-relative_url_root="<%= root_path %>">
<noscript>
<div class="top-shelf icon icon-warning">
<h1><%=l(:noscript_heading)%></h1>
<p>
<%=l(:noscript_description)%>
</p>
<h2>
<a href="http://www.enable-javascript.com/" target="_blank"><%=l(:noscript_learn_more) %></a>
</h2>
</div>
</noscript>
<% main_menu = render_main_menu(@project) %>
<% side_displayed = content_for?(:sidebar) || content_for?(:main_menu) || !main_menu.blank? %>
<div id="wrapper" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><%= html_title %></title>
<meta name="description" content="<%= OpenProject::Info.app_name %>" />
<meta name="keywords" content="issue,bug,type" />
<meta name="app_base_path" content="<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" />
<base href="/<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" />
<meta name="current_menu_item" content="<%= current_menu_item %>" />
<meta name="accessibility-mode" content="<%= current_user.impaired? %>" />
<%= csrf_meta_tags %>
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => "all" %>
<% if User.current.impaired? && accessibility_css_enabled? %>
<%= stylesheet_link_tag 'accessibility' %>
<% end %>
<%= include_gon %>
<%= javascript_include_tag 'application' %>
<!-- plug-in specific tags -->
<%= call_hook :view_work_package_overview_attributes %>
<!-- user specific tags -->
<%= user_specific_javascript_includes %>
<!-- project specific tags -->
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= content_for(:header_tags) if content_for?(:header_tags) %>
</head>
<body class="<%= body_css_classes %>" ng-app="openproject" data-relative_url_root="<%= root_path %>">
<noscript>
<div class="top-shelf icon icon-warning">
<h1><%=l(:noscript_heading)%></h1>
<p>
<%=l(:noscript_description)%>
</p>
<h2>
<a href="http://www.enable-javascript.com/" target="_blank"><%=l(:noscript_learn_more) %></a>
</h2>
</div>
</noscript>
<% main_menu = render_main_menu(@project) %>
<% side_displayed = content_for?(:sidebar) || content_for?(:main_menu) || !main_menu.blank? %>
<div id="wrapper" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"
ng-class="{ 'hidden-navigation': !showNavigation }">
<% if show_decoration %>
<div id="top-menu">
<div id="header">
<div id="logo">
<%= link_to(I18n.t('label_home'), home_url, :class => 'home-link') %>
</div>
<div id="top-menu-items">
<%= render_top_menu_left %>
<div class="top-menu-items-right">
<%= render :partial => 'search/mini_form' %>
<h1 class="hidden-for-sighted">
<%= l(:label_top_menu) %>
</h1>
<%= render_top_menu_right %>
<% if show_decoration %>
<div id="top-menu">
<div id="header">
<div id="logo">
<%= link_to(I18n.t('label_home'), home_url, :class => 'home-link') %>
</div>
<div id="top-menu-items">
<%= render_top_menu_left %>
<div class="top-menu-items-right">
<%= render :partial => 'search/mini_form' %>
<h1 class="hidden-for-sighted">
<%= l(:label_top_menu) %>
</h1>
<%= render_top_menu_right %>
</div>
</div>
</div>
</div>
</div>
</div>
<% end %>
<div id="main" class="<%= side_displayed ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>">
<% if (side_displayed && show_decoration) %>
<div id="main-menu" ng-controller="MainMenuController as mainMenu">
<h1 class="hidden-for-sighted"><%= l(:label_main_menu) %></h1>
<div id="toggle-project-menu"
<% end %>
<div id="main" class="<%= side_displayed ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>">
<% if (side_displayed && show_decoration) %>
<div id="main-menu" ng-controller="MainMenuController as mainMenu">
<h1 class="hidden-for-sighted"><%= l(:label_main_menu) %></h1>
<div id="toggle-project-menu"
ng-class="{ 'show': !showNavigation }">
<a href="javascript:;" title="<%= l(:show_hide_project_menu) %>"
<a href="javascript:;" title="<%= l(:show_hide_project_menu) %>"
ng-click="mainMenu.toggleNavigation()"
class="navigation-toggler icon4 icon-double-arrow-left"></a>
</div>
<div id="menu-sidebar">
<%= main_menu %>
<%= content_for :main_menu %>
<!-- Sidebar -->
<div id="sidebar">
<%= content_for :sidebar %>
<%= call_hook :view_layouts_base_sidebar %>
</div>
<div id="menu-sidebar">
<%= main_menu %>
<%= content_for :main_menu %>
<!-- Sidebar -->
<div id="sidebar">
<%= content_for :sidebar %>
<%= call_hook :view_layouts_base_sidebar %>
</div>
</div>
</div>
</div>
</div>
<% end %>
<% if show_decoration %>
<div id="breadcrumb" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"
<% end %>
<% if show_decoration %>
<div id="breadcrumb" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"
ng-class="{ 'hidden-navigation': !showNavigation }">
<h1>
<%= you_are_here_info %>
<%= full_breadcrumb %>
</h1>
</div>
<% end %>
<div class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>" id="content"
<h1>
<%= you_are_here_info %>
<%= full_breadcrumb %>
</h1>
</div>
<% end %>
<div class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>" id="content"
ng-class="{ 'hidden-navigation': !showNavigation }">
<h1 class="hidden-for-sighted"><%= l(:label_content) %></h1>
<%= render_flash_messages %>
<flash-message></flash-message>
<div ui-view></div>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;">&nbsp;</div>
</div>
</div>
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
</div>
<% if (show_decoration) %>
<div id="footer">
<div class="footer-content">
<%= footer_content %>
<h1 class="hidden-for-sighted"><%= l(:label_content) %></h1>
<%= render_flash_messages %>
<flash-message></flash-message>
<div ui-view></div>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;">&nbsp;</div>
</div>
</div>
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
</div>
<% end %>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
<% if (show_decoration) %>
<div id="footer">
<div class="footer-content">
<%= footer_content %>
</div>
</div>
<% end %>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

@ -28,129 +28,116 @@ See doc/COPYRIGHT.rdoc for more details.
++#%><!DOCTYPE html>
<% show_decoration = params["layout"].nil? %>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<%= I18n.locale.to_s %>" xml:lang="<%= I18n.locale.to_s %>" class="<%= 'in_modal' unless show_decoration %>">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><%= html_title %></title>
<meta name="description" content="<%= OpenProject::Info.app_name %>" />
<meta name="keywords" content="issue,bug,type" />
<meta name="app_base_path" content="<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" />
<base href="/<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" />
<meta name="current_menu_item" content="<%= current_menu_item %>" />
<meta name="accessibility-mode" content="<%= current_user.impaired? %>" />
<%= csrf_meta_tags %>
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => "all" %>
<% if User.current.impaired? && accessibility_css_enabled? %>
<%= stylesheet_link_tag 'accessibility' %>
<% end %>
<%= javascript_include_tag 'application' %>
<!-- user specific tags -->
<%= user_specific_javascript_includes %>
<!-- project specific tags -->
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= content_for(:header_tags) if content_for?(:header_tags) %>
</head>
<body class="<%= body_css_classes %>" ng-app="openproject" data-relative_url_root="<%= root_path %>">
<noscript>
<div class="top-shelf icon icon-warning">
<h1><%=l(:noscript_heading)%></h1>
<p>
<%=l(:noscript_description)%>
</p>
<h2>
<a href="http://www.enable-javascript.com/" target="_blank"><%=l(:noscript_learn_more) %></a>
</h2>
</div>
</noscript>
<% main_menu = render_main_menu(@project) %>
<% side_displayed = content_for?(:sidebar) || content_for?(:main_menu) || !main_menu.blank? %>
<div id="wrapper" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><%= html_title %></title>
<meta name="description" content="<%= OpenProject::Info.app_name %>" />
<meta name="keywords" content="issue,bug,type" />
<meta name="app_base_path" content="<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" />
<base href="/<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" />
<meta name="current_menu_item" content="<%= current_menu_item %>" />
<meta name="accessibility-mode" content="<%= current_user.impaired? %>" />
<%= csrf_meta_tags %>
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => "all" %>
<% if User.current.impaired? && accessibility_css_enabled? %>
<%= stylesheet_link_tag 'accessibility' %>
<% end %>
<%= javascript_include_tag 'application' %>
<!-- user specific tags -->
<%= user_specific_javascript_includes %>
<!-- project specific tags -->
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= content_for(:header_tags) if content_for?(:header_tags) %>
</head>
<body class="<%= body_css_classes %>" ng-app="openproject" data-relative_url_root="<%= root_path %>">
<noscript>
<div class="top-shelf icon icon-warning">
<h1><%=l(:noscript_heading)%></h1>
<p>
<%=l(:noscript_description)%>
</p>
<h2>
<a href="http://www.enable-javascript.com/" target="_blank"><%=l(:noscript_learn_more) %></a>
</h2>
</div>
</noscript>
<% main_menu = render_main_menu(@project) %>
<% side_displayed = content_for?(:sidebar) || content_for?(:main_menu) || !main_menu.blank? %>
<div id="wrapper" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"
ng-class="{ 'hidden-navigation': !showNavigation }">
<% if show_decoration %>
<div id="top-menu">
<div id="header">
<div id="logo">
<%= link_to(I18n.t('label_home'), home_url, :class => 'home-link') %>
</div>
<div id="top-menu-items">
<%= render_top_menu_left %>
<div class="top-menu-items-right">
<%= render :partial => 'search/mini_form' %>
<h1 class="hidden-for-sighted">
<%= l(:label_top_menu) %>
</h1>
<%= render_top_menu_right %>
<% if show_decoration %>
<div id="top-menu">
<div id="header">
<div id="logo">
<%= link_to(I18n.t('label_home'), home_url, :class => 'home-link') %>
</div>
<div id="top-menu-items">
<%= render_top_menu_left %>
<div class="top-menu-items-right">
<%= render :partial => 'search/mini_form' %>
<h1 class="hidden-for-sighted">
<%= l(:label_top_menu) %>
</h1>
<%= render_top_menu_right %>
</div>
</div>
</div>
</div>
</div>
</div>
<% end %>
<div id="main" class="<%= side_displayed ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>">
<% if (side_displayed && show_decoration) %>
<div id="main-menu" ng-controller="MainMenuController as mainMenu">
<h1 class="hidden-for-sighted"><%= l(:label_main_menu) %></h1>
<div id="toggle-project-menu"
<% end %>
<div id="main" class="<%= side_displayed ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>">
<% if (side_displayed && show_decoration) %>
<div id="main-menu" ng-controller="MainMenuController as mainMenu">
<h1 class="hidden-for-sighted"><%= l(:label_main_menu) %></h1>
<div id="toggle-project-menu"
ng-class="{ 'show': !showNavigation }">
<a href="javascript:;" title="<%= l(:show_hide_project_menu) %>"
<a href="javascript:;" title="<%= l(:show_hide_project_menu) %>"
ng-click="mainMenu.toggleNavigation()"
class="navigation-toggler icon4 icon-double-arrow-left"></a>
</div>
<div id="menu-sidebar">
<%= main_menu %>
<%= content_for :main_menu %>
<!-- Sidebar -->
<div id="sidebar">
<%= content_for :sidebar %>
<%= call_hook :view_layouts_base_sidebar %>
</div>
<div id="menu-sidebar">
<%= main_menu %>
<%= content_for :main_menu %>
<!-- Sidebar -->
<div id="sidebar">
<%= content_for :sidebar %>
<%= call_hook :view_layouts_base_sidebar %>
</div>
</div>
</div>
</div>
</div>
<% end %>
<% if show_decoration %>
<div id="breadcrumb" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"
<% end %>
<% if show_decoration %>
<div id="breadcrumb" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"
ng-class="{ 'hidden-navigation': !showNavigation }">
<h1>
<%= you_are_here_info %>
<%= full_breadcrumb %>
</h1>
</div>
<% end %>
<div class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>" id="content"
<h1>
<%= you_are_here_info %>
<%= full_breadcrumb %>
</h1>
</div>
<% end %>
<div class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>" id="content"
ng-class="{ 'hidden-navigation': !showNavigation }">
<h1 class="hidden-for-sighted"><%= l(:label_content) %></h1>
<%= render_flash_messages %>
<flash-message></flash-message>
<!-- Action menu -->
<%= render :partial => 'layouts/action_menu' %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;">&nbsp;</div>
</div>
<div style="clear:both;">&nbsp;</div>
</div>
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
</div>
<% if (show_decoration) %>
<div id="footer">
<div class="footer-content">
<%= footer_content %>
<h1 class="hidden-for-sighted"><%= l(:label_content) %></h1>
<%= render_flash_messages %>
<flash-message></flash-message>
<!-- Action menu -->
<%= render :partial => 'layouts/action_menu' %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;">&nbsp;</div>
</div>
<div style="clear:both;">&nbsp;</div>
</div>
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
</div>
<% end %>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
<% if (show_decoration) %>
<div id="footer">
<div class="footer-content">
<%= footer_content %>
</div>
</div>
<% end %>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

@ -26,17 +26,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title><%= h html_title %></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
<%= yield(:styles) %>
</style>
<head>
<title><%= h html_title %></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
<%= yield(:styles) %>
</style>
</head>
<body>
<%= yield %>
</body>
<body>
<%= yield %>
</body>
</html>

@ -26,9 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% content_for :sidebar do %>
<%= render :partial => 'my/sidebar' %>
<%= render :partial => 'my/sidebar' %>
<% end %>
<%= render :file => "layouts/base" %>

@ -26,45 +26,44 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<html>
<head>
<style>
body {
font-family: Verdana, sans-serif;
font-size: 0.8em;
color:#484848;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; }
h1 { font-size: 1.2em; }
h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
hr {
width: 100%;
height: 1px;
background: #ccc;
border: 0;
}
blockquote {
border-left: 3px solid #E0E0E0;
font-style: italic;
margin-left: 2.4em;
padding-left: 0.6em;
}
.footer {
font-size: 0.8em;
font-style: italic;
}
</style>
</head>
<body>
<span class="header"><%=raw Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.localized_emails_header) %></span>
<%= call_hook(:view_layouts_mailer_html_before_content, self.assigns) %>
<%= yield %>
<%= call_hook(:view_layouts_mailer_html_after_content, self.assigns) %>
<hr />
<span class="footer"><%=raw Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.localized_emails_footer) %></span>
</body>
<head>
<style>
body {
font-family: Verdana, sans-serif;
font-size: 0.8em;
color:#484848;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; }
h1 { font-size: 1.2em; }
h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
hr {
width: 100%;
height: 1px;
background: #ccc;
border: 0;
}
blockquote {
border-left: 3px solid #E0E0E0;
font-style: italic;
margin-left: 2.4em;
padding-left: 0.6em;
}
.footer {
font-size: 0.8em;
font-style: italic;
}
</style>
</head>
<body>
<span class="header"><%=raw Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.localized_emails_header) %></span>
<%= call_hook(:view_layouts_mailer_html_before_content, self.assigns) %>
<%= yield %>
<%= call_hook(:view_layouts_mailer_html_after_content, self.assigns) %>
<hr />
<span class="footer"><%=raw Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.localized_emails_footer) %></span>
</body>
</html>

@ -34,5 +34,5 @@ See doc/COPYRIGHT.rdoc for more details.
<%= h message %>
</a>
</li>
<ul>
</div>
<ul>
</div>

@ -35,27 +35,27 @@ See doc/COPYRIGHT.rdoc for more details.
:html => {:id => "members_add_form"}) do |f| %>
<fieldset>
<legend><%= l(:label_member_new) %></legend>
<div class="select-boxes">
<label>
<%= l(:label_principal_search) %>
<%= select_tag "member[user_ids]", options_for_select([]),
<div class="select-boxes">
<label>
<%= l(:label_principal_search) %>
<%= select_tag "member[user_ids]", options_for_select([]),
:title => l(:label_principal_search),
:multiple => true,
:'data-ajaxURL' => url_for(:controller => "/members", :action => "autocomplete_for_member"),
:'data-projectId' => project.id,
:class => "select2-select remote" %>
</label>
<label>
<%= l(:label_role_search) %>
<% options = roles.collect { |obj| [obj.name, obj.id] } %>
<%= select_tag 'member[role_ids]', options_for_select(options),
</label>
<label>
<%= l(:label_role_search) %>
<% options = roles.collect { |obj| [obj.name, obj.id] } %>
<%= select_tag 'member[role_ids]', options_for_select(options),
:title => l(:label_role_search),
:multiple => true,
:tabIndex => 0,
:class => "select2-select" %>
</label>
</div>
<div style="clear:both">&nbsp;</div>
</label>
</div>
<div style="clear:both">&nbsp;</div>
<div><%= submit_tag l(:button_add), :id => 'member-add-submit', class: 'button -highlight' %></div>
</fieldset>
<% end %>

@ -32,12 +32,12 @@ See doc/COPYRIGHT.rdoc for more details.
{
"items":[
<% @principals.each_with_index do |principal, ix| %>
{
{
"id": <%= principal.id.to_json.html_safe %>,
"name": <%= principal.name.to_json.html_safe %>
} <%= "," unless ix == @principals.length - 1 %>
<% end %> ],
} <%= "," unless ix == @principals.length - 1 %>
<% end %> ],
"total": <%= @total ? @total : @principals.size %>,
"more": <%= @more ? @more : 0 %>
}
}
}

@ -26,39 +26,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= error_messages_for 'message' %>
<% replying ||= false %>
<div class="box">
<!--[form:message]-->
<p><label for="message_subject"><%= Message.human_attribute_name(:subject) %></label><br />
<%= f.text_field :subject, :size => 120, :id => "message_subject" %>
<% if !replying && User.current.allowed_to?(:edit_messages, @project) %>
<%= f.label :sticky do %>
<%= f.check_box :sticky %><%= l(:label_board_sticky) %>
<% end %>
<%= f.label :locked do %>
<%= f.check_box :locked %><%= l(:label_board_locked) %>
<!--[form:message]-->
<p><label for="message_subject"><%= Message.human_attribute_name(:subject) %></label><br />
<%= f.text_field :subject, :size => 120, :id => "message_subject" %>
<% if !replying && User.current.allowed_to?(:edit_messages, @project) %>
<%= f.label :sticky do %>
<%= f.check_box :sticky %><%= l(:label_board_sticky) %>
<% end %>
<%= f.label :locked do %>
<%= f.check_box :locked %><%= l(:label_board_locked) %>
<% end %>
<% end %>
<% end %>
</p>
<% if !replying && !@message.new_record? && User.current.allowed_to?(:edit_messages, @project) %>
<p><label><%= Board.name.humanize %></label><br />
<%= f.select :board_id, @project.boards.collect {|b| [b.name, b.id]} %></p>
<% end %>
<p>
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'message_content',
</p>
<% if !replying && !@message.new_record? && User.current.allowed_to?(:edit_messages, @project) %>
<p><label><%= Board.name.humanize %></label><br />
<%= f.select :board_id, @project.boards.collect {|b| [b.name, b.id]} %></p>
<% end %>
<p>
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'message_content',
:'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json),
:'ng-non-bindable' => '' %>
</p>
<%= wikitoolbar_for 'message_content' %>
<!--[eoform:message]-->
<p><%= l(:label_attachment_plural) %><br />
<%= render :partial => 'attachments/form' %></p>
</p>
<%= wikitoolbar_for 'message_content' %>
<!--[eoform:message]-->
<p><%= l(:label_attachment_plural) %><br />
<%= render :partial => 'attachments/form' %></p>
</div>

@ -54,70 +54,64 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => 'layouts/action_menu_specific' %>
<h2 title="<%= h @topic.subject %>"><%= avatar(@topic.author) %><%=h @topic.subject %></h2>
</div>
<div class="message">
<p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
<div class="wiki" ng-non-bindable>
<%= format_text(@topic.content, :object => @topic, :attachments => @topic.attachments) %>
</div>
<%= link_to_attachments @topic, :author => false %>
<p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
<div class="wiki" ng-non-bindable>
<%= format_text(@topic.content, :object => @topic, :attachments => @topic.attachments) %>
</div>
<%= link_to_attachments @topic, :author => false %>
</div>
<br />
<% unless @replies.empty? %>
<h3 class="icon-context icon-quote"><%= l(:label_reply_plural) %> (<%= @replies.count %>)</h3>
<% @replies.each do |message| %>
<div class="message reply" id="<%= "message-#{message.id}" %>">
<h4>
<%= avatar(message.author) %>
<%= link_to h(message.subject), topic_path(@topic,
<h3 class="icon-context icon-quote"><%= l(:label_reply_plural) %> (<%= @replies.count %>)</h3>
<% @replies.each do |message| %>
<div class="message reply" id="<%= "message-#{message.id}" %>">
<h4>
<%= avatar(message.author) %>
<%= link_to h(message.subject), topic_path(@topic,
:r => message,
:anchor => "message-#{message.id}") %>
-
-
<%= authoring message.created_on, message.author %>
</h4>
<div class="message-reply-menu">
<%= link_to(icon_wrapper('icon-context icon-quote', l(:button_quote)),
</h4>
<div class="message-reply-menu">
<%= link_to(icon_wrapper('icon-context icon-quote', l(:button_quote)),
{ action: 'quote', id: message },
remote: true,
method: 'get',
title: l(:button_quote),
class: 'no-decoration-on-hover',
alt: l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to(icon_wrapper('icon-context icon-edit', l(:button_edit)),
<%= link_to(icon_wrapper('icon-context icon-edit', l(:button_edit)),
{ :action => 'edit', :id => message },
:title => l(:button_edit),
:class => 'no-decoration-on-hover',
:alt => l(:button_edit)) if message.editable_by?(User.current) %>
<%= link_to(icon_wrapper('icon-context icon-delete', l(:button_delete)),
<%= link_to(icon_wrapper('icon-context icon-delete', l(:button_delete)),
{ :action => 'destroy', :id => message},
:method => :delete,
:confirm => l(:text_are_you_sure),
:title => l(:button_delete),
:class => 'no-decoration-on-hover',
:alt => l(:button_delete)) if message.destroyable_by?(User.current) %>
</div>
<div class="wiki" ng-non-bindable>
<%= format_text message, :content, :attachments => message.attachments %>
</div>
<%= link_to_attachments message, :author => false %>
</div>
<div class="wiki" ng-non-bindable>
<%= format_text message, :content, :attachments => message.attachments %>
</div>
<%= link_to_attachments message, :author => false %>
</div>
<% end %>
<%= pagination_links_full @replies, :per_page_links => false %>
<% end %>
<%= pagination_links_full @replies, :per_page_links => false %>
<% end %>
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
<div id="reply" style="display:none;">
<%= form_for @reply, :as => :reply, :url => reply_to_topic_path(@topic), :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
<%= submit_tag l(:button_submit), class: 'button -highlight' %>
<%= preview_link preview_topic_path(@message), 'message-form', class: 'button' %>
<% end %>
<div id="preview" class="wiki"></div>
</div>
<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
<div id="reply" style="display:none;">
<%= form_for @reply, :as => :reply, :url => reply_to_topic_path(@topic), :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
<%= submit_tag l(:button_submit), class: 'button -highlight' %>
<%= preview_link preview_topic_path(@message), 'message-form', class: 'button' %>
<% end %>
<div id="preview" class="wiki"></div>
</div>
<% end %>
<% html_title h(@topic.subject) %>

@ -30,16 +30,11 @@ See doc/COPYRIGHT.rdoc for more details.
<% content_for :main_menu do %>
<%= render_menu :my_menu %>
<% end %>
<h3><%=l(:label_my_account_data)%></h3>
<p><%= User.human_attribute_name(:login) %>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
<%= User.human_attribute_name(:created_on) %>: <%= format_time(@user.created_on) %></p>
<%= User.human_attribute_name(:created_on) %>: <%= format_time(@user.created_on) %></p>
<% if Setting.feeds_enabled? %>
<h3><%= l(:label_feeds_access_key) %></h3>
<p>
<% if @user.rss_token %>
<%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %>
@ -49,20 +44,19 @@ See doc/COPYRIGHT.rdoc for more details.
(<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)
</p>
<% end %>
<% if Setting.rest_api_enabled? %>
<h3><%= l(:label_api_access_key) %></h3>
<div>
<%= link_to_function(l(:button_show), "$('api-access-key').toggle();")%>
<pre id='api-access-key' class='autoscroll'><%= h(@user.api_key) %></pre>
</div>
<%= javascript_tag("$('api-access-key').hide();") %>
<p>
<% if @user.api_token %>
<%= l(:label_api_access_key_created_on, distance_of_time_in_words(Time.now, @user.api_token.created_on)) %>
<% else %>
<%= l(:label_missing_api_access_key) %>
<% end %>
(<%= link_to l(:button_reset), {:action => 'reset_api_key'}, :method => :post %>)
</p>
<h3><%= l(:label_api_access_key) %></h3>
<div>
<%= link_to_function(l(:button_show), "$('api-access-key').toggle();")%>
<pre id='api-access-key' class='autoscroll'><%= h(@user.api_key) %></pre>
</div>
<%= javascript_tag("$('api-access-key').hide();") %>
<p>
<% if @user.api_token %>
<%= l(:label_api_access_key_created_on, distance_of_time_in_words(Time.now, @user.api_token.created_on)) %>
<% else %>
<%= l(:label_missing_api_access_key) %>
<% end %>
(<%= link_to l(:button_reset), {:action => 'reset_api_key'}, :method => :post %>)
</p>
<% end %>

@ -60,17 +60,15 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="splitcontentright">
<h3><%= User.human_attribute_name(:mail_notification) %></h3>
<div class="box">
<%= render :partial => 'users/mail_notifications' %>
<%= render :partial => 'users/mail_notifications' %>
</div>
<h3><%=l(:label_ui, :app_title => Setting.app_title)%></h3>
<div class="box tabular">
<%= render :partial => 'users/impaired_settings' %>
<%= render :partial => 'users/impaired_settings' %>
</div>
<h3><%=l(:label_preferences)%></h3>
<div class="box tabular">
<%= render :partial => 'users/preferences' %>
<%= render :partial => 'users/preferences' %>
</div>
</div>
<br style="clear:both;" />

@ -41,9 +41,8 @@ See doc/COPYRIGHT.rdoc for more details.
:class => 'button -highlight' %>
</p>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom,
<%= auto_discovery_link_tag(:atom,
work_packages_assigned_to_me_path({:format => 'atom', :key => User.current.rss_key}),
{title: l(:label_assigned_to_me_work_packages)}) %>
<% end %>

@ -46,9 +46,8 @@ See doc/COPYRIGHT.rdoc for more details.
:class => 'button -highlight' %>
</p>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom,
<%= auto_discovery_link_tag(:atom,
work_packages_reported_by_me_path({:format => 'atom', :key => User.current.rss_key}),
{title: l(:label_reported_work_packages)}) %>
<% end %>

@ -52,9 +52,8 @@ See doc/COPYRIGHT.rdoc for more details.
:class => 'button -highlight' %>
</p>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom,
<%= auto_discovery_link_tag(:atom,
work_packages_responsible_for_path({:format => 'atom', :key => User.current.rss_key}),
{title: l(:label_responsible_for_work_packages)}) %>
<% end %>

@ -26,41 +26,34 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% breadcrumb_paths(l(:label_my_page)) %>
<% content_for :action_menu_specific do %>
<%= link_to l(:label_personalize_page), action: 'page_layout', accesskey: accesskey(:edit) %>
<%= link_to l(:label_personalize_page), action: 'page_layout', accesskey: accesskey(:edit) %>
<% 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>
<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.available_blocks.keys.include? b %>
<div class="mypage-box">
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
</div>
<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>
<div class="mypage-box">
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
</div>
<% end if @blocks['right'] %>
</div>
<% html_title(l(:label_my_page)) -%>

@ -26,46 +26,44 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<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('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'top') %>', {asynchronous:true, evalScripts:true, 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('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'left') %>', {asynchronous:true, evalScripts:true, 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('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'right') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})
}
function updateSelect() {
s = $('block-select')
for (var i = 0; i < s.options.length; i++) {
var block = $('block_' + s.options[i].value);
if (block && block.visible()) {
s.options[i].disabled = true;
} else {
if (block) { block.remove(); }
s.options[i].disabled = false;
}
}
s.options[0].selected = true;
}
function afterAddBlock() {
recreateSortables();
updateSelect();
}
function removeBlock(block) {
Effect.DropOut(block,{ 'afterFinish':function(){
updateSelect();
}});
}
//]]>
//<![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('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'top') %>', {asynchronous:true, evalScripts:true, 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('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'left') %>', {asynchronous:true, evalScripts:true, 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('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'right') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})
}
function updateSelect() {
s = $('block-select')
for (var i = 0; i < s.options.length; i++) {
var block = $('block_' + s.options[i].value);
if (block && block.visible()) {
s.options[i].disabled = true;
} else {
if (block) { block.remove(); }
s.options[i].disabled = false;
}
}
s.options[0].selected = true;
}
function afterAddBlock() {
recreateSortables();
updateSelect();
}
function removeBlock(block) {
Effect.DropOut(block,{ 'afterFinish':function(){
updateSelect();
}});
}
//]]>
</script>
<% content_for :action_menu_specific do %>
<li>
<%= form_tag({:action => "add_block"}, :id => "block-form") do %>
@ -97,24 +95,21 @@ function removeBlock(block) {
<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} %>
<%= 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.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => 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} %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['right'] %>
</div>
<%= sortable_element 'list-top',
:tag => 'div',
:only => 'mypage-box',

@ -26,16 +26,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= error_messages_for 'news' %>
<div class="box tabular">
<p><%= f.text_field :title, :required => true, :size => 60 %></p>
<p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p>
<p>
<%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit',
<p><%= f.text_field :title, :required => true, :size => 60 %></p>
<p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p>
<p>
<%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit',
:'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json),
:'ng-non-bindable' => '' %>
</p>
</p>
</div>
<%= wikitoolbar_for 'news_description' %>

@ -26,9 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<div class="news">
<%= link_to_project(news.project) + ': ' unless @project %>
<%= link_to_project(news.project) + ': ' unless @project %>
<h4 class='overview'><%= link_to h(news.title), news_path(news) %></h4>
<p class="author additional-information"><%= authoring news.created_on, news.author %></p>
<div>

@ -35,5 +35,5 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= preview_link preview_news_path(@news), 'news-form-preview', class: 'button' %>
<% end %>
<% end %>
<div id="preview" class="wiki"></div>

@ -26,25 +26,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%=l(:label_news_plural)%></h2>
<% if @newss.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<% @newss.each do |news| %>
<% @newss.each do |news| %>
<h3><%= avatar(news.author) %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
<%= link_to h(news.title), news_path(news) %>
<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
<%= link_to h(news.title), news_path(news) %>
<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
<p class="author"><%= authoring news.created_on, news.author %></p>
<div class="wiki">
<%= format_text(news.summary.present? ? news.summary : truncate(news.description), :object => news) %>
</div>
<% end %>
<% end %>
<% end %>
<%= pagination_links_full @newss %>
<%= other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
<% end %>

@ -45,56 +45,52 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => 'layouts/action_menu_specific' %>
<h2 title="<%= h @news.title %>"><%= avatar(@news.author) %><%=h @news.title %></h2>
</div>
<% if authorize_for('news', 'edit') %>
<div id="edit-news" style="display:none;">
<%= labelled_tabular_form_for @news, :html => { :id => 'news-form' } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news"); return false;',
<div id="edit-news" style="display:none;">
<%= labelled_tabular_form_for @news, :html => { :id => 'news-form' } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news"); return false;',
class: 'button'%>
<%= preview_link preview_news_path(@news), 'news-form-preview', class: 'button' %>
<% end %>
<div id="preview" class="wiki"></div>
</div>
<%= preview_link preview_news_path(@news), 'news-form-preview', class: 'button' %>
<% end %>
<div id="preview" class="wiki"></div>
</div>
<% end %>
<p><% unless @news.summary.blank? %><em><%=h @news.summary %></em><br /><% end %>
<span class="author"><%= authoring @news.created_on, @news.author %></span></p>
<p><% unless @news.summary.blank? %><em><%=h @news.summary %></em><br />
<% end %>
<span class="author"><%= authoring @news.created_on, @news.author %></span></p>
<div class="wiki" ng-non-bindable>
<%= format_text(@news.description, :object => @news) %>
<%= format_text(@news.description, :object => @news) %>
</div>
<br />
<div id="comments" style="margin-bottom:16px;">
<h3 class="icon-context icon-quote"><%= l(:label_comment_plural) %></h3>
<% @comments.each do |comment| %>
<% next if comment.new_record? %>
<div class="contextual">
<%= link_to_if_authorized icon_wrapper('icon-context icon-delete', l(:button_delete)),
<h3 class="icon-context icon-quote"><%= l(:label_comment_plural) %></h3>
<% @comments.each do |comment| %>
<% next if comment.new_record? %>
<div class="contextual">
<%= link_to_if_authorized icon_wrapper('icon-context icon-delete', l(:button_delete)),
{:controller => '/news/comments', :action => 'destroy', :id => comment},
:confirm => l(:text_are_you_sure),
:method => :delete,
:class => 'no-decoration-on-hover',
:title => l(:button_delete),
:alt => l(:button_delete) %>
</div>
<h4 class="comment"><%= avatar(comment.author) %><%= authoring comment.created_on, comment.author %></h4>
<%= format_text(comment.comments, :object => comment) %>
<% end %>
</div>
<h4 class="comment"><%= avatar(comment.author) %><%= authoring comment.created_on, comment.author %></h4>
<%= format_text(comment.comments, :object => comment) %>
<% end %>
</div>
<% if authorize_for 'news/comments', 'create' %>
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
<%= form_for([@news, Comment.new], :html => { :id => "add_comment_form", :style => "display:none;" }) do %>
<div class="box">
<%= label_tag 'comment_comments', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %>
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit',
<% if authorize_for 'news/comments', 'create' %>
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
<%= form_for([@news, Comment.new], :html => { :id => "add_comment_form", :style => "display:none;" }) do %>
<div class="box">
<%= label_tag 'comment_comments', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %>
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit',
:'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json) %>
<%= wikitoolbar_for 'comment_comments' %>
</div>
<p><%= submit_tag l(:button_add), class: 'button -highlight' %></p>
<% end %>
<% end %>
<% html_title h(@news.title) -%>
<%= wikitoolbar_for 'comment_comments' %>
</div>
<p><%= submit_tag l(:button_add), class: 'button -highlight' %></p>
<% end %>
<% end %>
<% html_title h(@news.title) -%>

@ -37,92 +37,86 @@ See doc/COPYRIGHT.rdoc for more details.
:class => ("icon icon-add")
}) %>
<% end %>
<h2><%= l('timelines.associations') %></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<% @project_types.each do |project_type| %>
<% project_assocs = @project_associations_by_type[project_type] %>
<% next if project_assocs.blank? %>
<div class="container">
<h3>
<% if project_type.present? %>
<%= h(project_type.name) %>
<% else %>
<em><%= l('timelines.without_project_type') %></em>
<% end %>
</h3>
<table class="list timelines-project_associations">
<thead>
<tr>
<th class="timelines-pa-identifier">
<%= Project.human_attribute_name(:identifier) %>
</th>
<th class="timelines-pa-name">
<%= Project.human_attribute_name(:name) %>
</th>
<th class="timelines-pa-responsible">
<%= Project.human_attribute_name(:responsible) %>
</th>
<th class="timelines-pa-description">
<%= ProjectAssociation.human_attribute_name(:description) %>
</th>
<th class="timelines-pa-actions">
&nbsp;<!-- actions -->
</th>
</tr>
</thead>
<tbody>
<% reset_cycle('rows') %>
<% project_assocs.each do |association| %>
<% other = association.project(@project) %>
<tr class="<%= cycle(:odd, :even, :name => 'rows') %>">
<td class="timelines-pa-identifier">
<%= link_to(h(other.identifier), project_path(other, :jump => 'project_associations')) %>
</td>
<td class="timelines-pa-name">
<%= link_to(h(other.name), project_path(other, :jump => 'project_associations')) %>
</td>
<td class="timelines-pa-responsible">
<% if other.responsible.present? %>
<%= avatar(other.responsible, class: 'avatar-mini') %>
<%= link_to_user(other.responsible) %>
<% else %>
-
<div class="container">
<h3>
<% if project_type.present? %>
<%= h(project_type.name) %>
<% else %>
<em><%= l('timelines.without_project_type') %></em>
<% end %>
</h3>
<table class="list timelines-project_associations">
<thead>
<tr>
<th class="timelines-pa-identifier">
<%= Project.human_attribute_name(:identifier) %>
</th>
<th class="timelines-pa-name">
<%= Project.human_attribute_name(:name) %>
</th>
<th class="timelines-pa-responsible">
<%= Project.human_attribute_name(:responsible) %>
</th>
<th class="timelines-pa-description">
<%= ProjectAssociation.human_attribute_name(:description) %>
</th>
<th class="timelines-pa-actions">
&nbsp;<!-- actions -->
</th>
</tr>
</thead>
<tbody>
<% reset_cycle('rows') %>
<% project_assocs.each do |association| %>
<% other = association.project(@project) %>
<tr class="<%= cycle(:odd, :even, :name => 'rows') %>">
<td class="timelines-pa-identifier">
<%= link_to(h(other.identifier), project_path(other, :jump => 'project_associations')) %>
</td>
<td class="timelines-pa-name">
<%= link_to(h(other.name), project_path(other, :jump => 'project_associations')) %>
</td>
<td class="timelines-pa-responsible">
<% if other.responsible.present? %>
<%= avatar(other.responsible, class: 'avatar-mini') %>
<%= link_to_user(other.responsible) %>
<% else %>
-
<% end %>
</td>
<td class="timelines-pa-description" ng-non-bindable>
<%= format_text association, :description %>
</td>
<td class="timelines-pa-actions">
<%= link_to_if_authorized({:controller => '/project_associations',
</td>
<td class="timelines-pa-description" ng-non-bindable>
<%= format_text association, :description %>
</td>
<td class="timelines-pa-actions">
<%= link_to_if_authorized({:controller => '/project_associations',
:action => 'edit',
:project_id => @project,
:id => association},
{:class => 'icon icon-edit'}) do %>
<%= l('timelines.edit_thing') %>
<span class="hidden-for-sighted">
<%= h(other.name) %>
</span>
<% end %>
<%= link_to_if_authorized({:controller => '/project_associations',
<%= l('timelines.edit_thing') %>
<span class="hidden-for-sighted">
<%= h(other.name) %>
</span>
<% end %>
<%= link_to_if_authorized({:controller => '/project_associations',
:action => 'confirm_destroy',
:project_id => @project,
:id => association},
{:class => 'icon icon-delete'}) do %>
<%= l('timelines.delete_thing') %>
<span class="hidden-for-sighted">
<%= h(other.name) %>
</span>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% end %>
<%= l('timelines.delete_thing') %>
<span class="hidden-for-sighted">
<%= h(other.name) %>
</span>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% end %>

@ -70,7 +70,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td class="timelines-pt-actions buttons">
<%= link_to(confirm_destroy_project_type_path(type),
:class => 'icon icon-delete') do %>
<%= l(:button_delete) %>
<%= l(:button_delete) %>
<span class="hidden-for-sighted"><%=h type.name %></span>
<% end %>
</td>

@ -26,8 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= labelled_tabular_form_for @project do |f| %>
<%= render :partial => 'form', :locals => { :f => f, :project => @project, :renderTypes => false } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= render :partial => 'form', :locals => { :f => f, :project => @project, :renderTypes => false } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -45,15 +45,13 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => "projects/form/modules", :locals => { :project => project } %>
</div>
<% end %>
<% if (project.new_record? || project.module_enabled?('work_package_tracking')) %>
<% if renderTypes %>
<div class="form-space">
<%= render :partial => 'projects/form/types', :locals => { :f => f, :project => project } %>
</div>
<div class="form-space">
<%= render :partial => 'projects/form/types', :locals => { :f => f, :project => project } %>
</div>
<% end %>
<% end %>
<% unless @issue_custom_fields.empty? %>
<%= render :partial => "projects/form/custom_fields", :locals => { :project => project,
:issue_custom_fields => @issue_custom_fields } %>

@ -26,20 +26,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%=l(:label_confirmation)%></h2>
<div class="warning">
<p><strong><%=h @project_to_destroy %></strong><br />
<%=l(:text_project_destroy_confirmation)%>
<% if @project_to_destroy.descendants.any? %>
<br /><%= l(:text_subprojects_destroy_warning, content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
<% end %>
</p>
<p>
<p><strong><%=h @project_to_destroy %></strong><br />
<%=l(:text_project_destroy_confirmation)%>
<% if @project_to_destroy.descendants.any? %>
<br />
<%= l(:text_subprojects_destroy_warning, content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
<% end %>
</p>
<p>
<%= form_tag(project_path(@project_to_destroy), :method => :delete) do %>
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete), class: 'button -highlight' %>
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete), class: 'button -highlight' %>
<% end %>
</p>
</p>
</div>

@ -31,16 +31,16 @@ See doc/COPYRIGHT.rdoc for more details.
<legend><%= l(:label_module_plural) %></legend>
<div class="legend-control">
<span>(<%= check_all_links 'project_modules' %>)<span>
</div>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<label class="floating">
<%= check_box_tag 'project[enabled_module_names][]',
</div>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<label class="floating">
<%= check_box_tag 'project[enabled_module_names][]',
m,
project.module_enabled?(m),
:id => "project_enabled_module_names_#{m}" %>
<%= l_or_humanize(m, :prefix => "project_module_") %>
</label>
<% end %>
<%= hidden_field_tag 'project[enabled_module_names][]', '' %>
<%= javascript_tag 'observeProjectModules();' %>
</fieldset>
<%= l_or_humanize(m, :prefix => "project_module_") %>
</label>
<% end %>
<%= hidden_field_tag 'project[enabled_module_names][]', '' %>
<%= javascript_tag 'observeProjectModules();' %>
</fieldset>

@ -26,26 +26,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<p>
<% if project && project.persisted? %>
<% if User.current.impaired? %>
<%= form.select :responsible_id, project.possible_responsibles.map {|m| [m.name, m.id]}, :include_blank => true %>
<% else %>
<% options = { :'data-ajaxURL' => url_for({:controller => "/members",
<% if project && project.persisted? %>
<% if User.current.impaired? %>
<%= form.select :responsible_id, project.possible_responsibles.map {|m| [m.name, m.id]}, :include_blank => true %>
<% else %>
<% options = { :'data-ajaxURL' => url_for({:controller => "/members",
:action => "paginate_users" }),
:'data-projectId' => project.id
} %>
<%= javascript_include_tag "autocompleter.js" %>
<%= javascript_include_tag "project/responsible_attribute.js" %>
<%= form.select(:responsible_id, options_for_select([]),
<%= javascript_include_tag "autocompleter.js" %>
<%= javascript_include_tag "project/responsible_attribute.js" %>
<%= form.select(:responsible_id, options_for_select([]),
{},
project.responsible.nil? ? options : options.merge({ :'data-selected' =>
[[project.responsible.name, project.
responsible.id]].to_json
}))
%>
<% end %>
<% end %>
<% end %>
</p>

@ -26,11 +26,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
<% end %>
<% content_for :action_menu_specific do %>
<%= link_to(l(:label_project_new), {:controller => '/projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
<%= link_to(l(:label_work_package_view_all), { controller: :work_packages }) + ' |' if User.current.allowed_to?(:view_work_packages, nil, :global => true) %>

@ -26,17 +26,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%=l(:label_member_plural)%></h2>
<% if @members.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
<% if @members.empty? %>
<p><i><%= l(:label_no_data) %></i></p>
<% end %>
<% members = @members.group_by {|m| m.role } %>
<% members.keys.sort{|x,y| x.position <=> y.position}.each do |role| %>
<h3><%= h(role.name) %></h3>
<ul>
<% members[role].each do |m| %>
<li><%= link_to_user m.user %> (<%= format_date m.created_on %>)</li>
<% end %>
</ul>
<h3><%= h(role.name) %></h3>
<ul>
<% members[role].each do |m| %>
<li><%= link_to_user m.user %> (<%= format_date m.created_on %>)</li>
<% end %>
</ul>
<% end %>

@ -26,13 +26,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% html_title l("label_project_new") %>
<h2><%=l(:label_project_new)%></h2>
<%= labelled_tabular_form_for @project do |f| %>
<%= render :partial => 'form', :locals => { :f => f, :project => @project, :renderTypes => true } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= javascript_tag "Form.Element.focus('project_name');" %>
<%= render :partial => 'form', :locals => { :f => f, :project => @project, :renderTypes => true } %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= javascript_tag "Form.Element.focus('project_name');" %>
<% end %>

@ -26,47 +26,44 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= form_tag(project_enumerations_path(@project), :method => :put, :class => "tabular") do %>
<table class="list">
<thead><tr>
<th style="width:90px;" class='center'><%= Enumeration.human_attribute_name(:active) %></th>
<th><%= Enumeration.human_attribute_name(:name) %></th>
<th class='center'><%= l(:enumeration_system_activity) %></th>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<th><%= h value.name %></th>
<% end %>
</tr></thead>
<% @project.activities(true).each do |enumeration| %>
<%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
<tr class="<%= cycle('odd', 'even') %>">
<td align="center">
<%= label_tag "enumerations_#{enumeration.id}_active", "#{h(enumeration.name)} #{l(:description_active)}", :class => "hidden-for-sighted" %>
<%= ff.check_box :active %>
</td>
<td>
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
<%= h(enumeration) %>
</td>
<td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td>
<% enumeration.custom_field_values.each do |value| %>
<td align="center">
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<table class="list">
<thead>
<tr>
<th style="width:90px;" class='center'><%= Enumeration.human_attribute_name(:active) %></th>
<th><%= Enumeration.human_attribute_name(:name) %></th>
<th class='center'><%= l(:enumeration_system_activity) %></th>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<th><%= h value.name %></th>
<% end %>
</tr>
</thead>
<% @project.activities(true).each do |enumeration| %>
<%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
<tr class="<%= cycle('odd', 'even') %>">
<td align="center">
<%= label_tag "enumerations_#{enumeration.id}_active", "#{h(enumeration.name)} #{l(:description_active)}", :class => "hidden-for-sighted" %>
<%= ff.check_box :active %>
</td>
<td>
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
<%= h(enumeration) %>
</td>
<td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td>
<% enumeration.custom_field_values.each do |value| %>
<td align="center">
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<% end %>
</tr>
<% end %>
<% end %>
</tr>
<% end %>
<% end %>
</table>
<div class="contextual">
<%= link_to(l(:button_reset), project_enumerations_path(@project),
</table>
<div class="contextual">
<%= link_to(l(:button_reset), project_enumerations_path(@project),
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-delete') %>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,36 +26,36 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% if @project.boards.any? %>
<table class="list">
<thead><tr>
<th><%= Board.model_name.human %></th>
<th><%= Board.human_attribute_name(:description) %></th>
<th></th>
<th></th>
</tr></thead>
<tbody>
<% @project.boards.each do |board|
<table class="list">
<thead>
<tr>
<th><%= Board.model_name.human %></th>
<th><%= Board.human_attribute_name(:description) %></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @project.boards.each do |board|
next if board.new_record? %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h board.name %></td>
<td><%=h board.description %></td>
<td class="small-icons" align="center">
<% if authorize_for("boards", "edit") %>
<%= reorder_links('board', {:controller => '/boards', :action => 'move', :project_id => @project, :id => board}) %>
<% end %>
</td>
<td class="buttons">
<%= link_to_if_authorized l(:button_edit), {:controller => '/boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete), {:controller => '/boards', :action => 'destroy', :project_id => @project, :id => board}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h board.name %></td>
<td><%=h board.description %></td>
<td class="small-icons" align="center">
<% if authorize_for("boards", "edit") %>
<%= reorder_links('board', {:controller => '/boards', :action => 'move', :project_id => @project, :id => board}) %>
<% end %>
</td>
<td class="buttons">
<%= link_to_if_authorized l(:button_edit), {:controller => '/boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete), {:controller => '/boards', :action => 'destroy', :project_id => @project, :id => board}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<p><%= link_to_if_authorized l(:label_board_new), {:controller => '/boards', :action => 'new', :project_id => @project} %></p>

@ -26,37 +26,37 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% if @project.categories.any? %>
<table class="list">
<thead><tr>
<th><%= Category.model_name.human %></th>
<th><%= Category.human_attribute_name(:assigned_to) %></th>
<th></th>
</tr></thead>
<tbody>
<% for category in @project.categories %>
<% unless category.new_record? %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h(category.name) %></td>
<td><%=h(category.assigned_to.name) if category.assigned_to %></td>
<td class="buttons">
<%= link_to_if_authorized l(:button_edit), { :controller => '/categories', :action => 'edit', :id => category }, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete),
<table class="list">
<thead>
<tr>
<th><%= Category.model_name.human %></th>
<th><%= Category.human_attribute_name(:assigned_to) %></th>
<th></th>
</tr>
</thead>
<tbody>
<% for category in @project.categories %>
<% unless category.new_record? %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h(category.name) %></td>
<td><%=h(category.assigned_to.name) if category.assigned_to %></td>
<td class="buttons">
<%= link_to_if_authorized l(:button_edit), { :controller => '/categories', :action => 'edit', :id => category }, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete),
{ :controller => '/categories',
:action => 'destroy',
:id => category },
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-delete' %>
</td>
</tr>
<% end %>
<% end %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<p><%= link_to_if_authorized l(:label_work_package_category_new), :controller => '/categories', :action => 'new', :project_id => @project %></p>

@ -49,26 +49,26 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
</div>
<div>
<% if @members.any? %>
<% authorized = authorize_for('members', 'update') %>
<table class="list members">
<thead>
<tr>
<th><%= User.model_name.human %> / <%= Group.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
</tr>
</thead>
<tbody>
<% @members.each do |member| %>
<% next if member.new_record? %>
<tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
<td class="<%= member.principal.class.name.downcase %> <%= 'icon-context icon-group' if member.principal.class.name.downcase == 'group' %> <%= user_status_class member.principal%>" title="<%= user_status_i18n member.principal%>"><%= link_to_user member.principal %></td>
<td class="roles">
<span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
<% if authorized %>
<%= form_for(member, :url => {:controller => '/members',
<% if @members.any? %>
<% authorized = authorize_for('members', 'update') %>
<table class="list members">
<thead>
<tr>
<th><%= User.model_name.human %> / <%= Group.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
</tr>
</thead>
<tbody>
<% @members.each do |member| %>
<% next if member.new_record? %>
<tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
<td class="<%= member.principal.class.name.downcase %> <%= 'icon-context icon-group' if member.principal.class.name.downcase == 'group' %> <%= user_status_class member.principal%>" title="<%= user_status_i18n member.principal%>"><%= link_to_user member.principal %></td>
<td class="roles">
<span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
<% if authorized %>
<%= form_for(member, :url => {:controller => '/members',
:action => 'update',
:id => member,
:page => params[:page]},
@ -77,35 +77,33 @@ See doc/COPYRIGHT.rdoc for more details.
:html => { :id => "member-#{member.id}-roles-form",
:class => 'hol',
:style => 'display:none' }) do |f| %>
<p><% roles.each do |role| %>
<label><%= check_box_tag 'member[role_ids][]', role.id, member.roles.include?(role),
<p><% roles.each do |role| %>
<label><%= check_box_tag 'member[role_ids][]', role.id, member.roles.include?(role),
:disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label>
<% end %></p>
<%= hidden_field_tag 'member[role_ids][]', '' %>
<p><%= submit_tag l(:button_change), :class => 'button -highlight -small' %>
<%= link_to_function l(:button_cancel),
<% end %></p>
<%= hidden_field_tag 'member[role_ids][]', '' %>
<p><%= submit_tag l(:button_change), :class => 'button -highlight -small' %>
<%= link_to_function l(:button_cancel),
"$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;",
class: 'button -small' %></p>
<% end %>
<td class="buttons">
<%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
<%= link_to(l(:button_delete), {:controller => '/members', :action => 'destroy', :id => member, :page => params[:page]},
<% end %>
<td class="buttons">
<%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
<%= link_to(l(:button_delete), {:controller => '/members', :action => 'destroy', :id => member, :page => params[:page]},
:method => :delete,
:remote => true,
:confirm => ((!User.current.admin? && member.include?(User.current)) ? l(:text_own_membership_delete_confirmation) : nil),
:title => l(:button_delete), :class => 'icon icon-delete') if member.deletable? %>
</td>
<% end %>
</td>
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
</tr>
<% end; reset_cycle %>
</tbody>
</table>
<%= pagination_links_full @members, params: { tab: 'members' }.merge(@pagination_url_options || {}) %>
<% else %>
<p class="nodata members"><%= l(:label_no_data) %></p>
<% end %>
</div>
</td>
<% end %>
</td>
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
</tr>
<% end; reset_cycle %>
</tbody>
</table>
<%= pagination_links_full @members, params: { tab: 'members' }.merge(@pagination_url_options || {}) %>
<% else %>
<p class="nodata members"><%= l(:label_no_data) %></p>
<% end %>
</div>

@ -31,19 +31,15 @@ See doc/COPYRIGHT.rdoc for more details.
:url => { :action => 'modules', :id => @project },
:method => :put,
:html => {:id => 'modules-form'} do |f| %>
<div class="box">
<fieldset>
<legend><%= l(:text_select_project_modules) %></legend>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<p><label><%= check_box_tag 'enabled_module_names[]', m, @project.module_enabled?(m) -%>
<%= l_or_humanize(m, :prefix => "project_module_") %></label></p>
<% end %>
</fieldset>
</div>
<p><%= check_all_links 'modules-form' %></p>
<p><%= submit_tag l(:button_save), class: 'button -highlight' %></p>
<div class="box">
<fieldset>
<legend><%= l(:text_select_project_modules) %></legend>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<p><label><%= check_box_tag 'enabled_module_names[]', m, @project.module_enabled?(m) -%>
<%= l_or_humanize(m, :prefix => "project_module_") %></label></p>
<% end %>
</fieldset>
</div>
<p><%= check_all_links 'modules-form' %></p>
<p><%= submit_tag l(:button_save), class: 'button -highlight' %></p>
<% end %>

@ -31,25 +31,21 @@ See doc/COPYRIGHT.rdoc for more details.
:url => { :controller => '/repositories', :action => 'edit', :id => @project },
:builder => TabularFormBuilder,
:lang => current_language do |f| %>
<%= error_messages_for 'repository' %>
<div class="box tabular">
<p><%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %></p>
<%= repository_field_tags(f, @repository) if @repository %>
</div>
<div class="contextual">
<% if @repository && !@repository.new_record? %>
<%= link_to(l(:label_user_plural), {:controller => '/repositories', :action => 'committers', :project_id => @project}, :class => 'icon icon-user1') %>
<%= link_to(l(:button_delete), project_repository_path(@project),
<%= error_messages_for 'repository' %>
<div class="box tabular">
<p><%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %></p>
<%= repository_field_tags(f, @repository) if @repository %>
</div>
<div class="contextual">
<% if @repository && !@repository.new_record? %>
<%= link_to(l(:label_user_plural), {:controller => '/repositories', :action => 'committers', :project_id => @project}, :class => 'icon icon-user1') %>
<%= link_to(l(:button_delete), project_repository_path(@project),
:confirm => l(:text_are_you_sure),
:method => :delete,
:class => 'icon icon-delete') %>
<% end %>
</div>
<%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save),
<% end %>
</div>
<%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save),
:disabled => @repository.nil?,
class: 'button -highlight') %>
<% end %>

@ -26,47 +26,46 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% if @project.shared_versions.any? %>
<table class="list versions">
<thead><tr>
<th><%= Version.model_name.human %></th>
<th><%= Version.human_attribute_name(:start_date) %></th>
<th><%= Version.human_attribute_name(:effective_date) %></th>
<th><%= Version.human_attribute_name(:description) %></th>
<th><%= Version.human_attribute_name(:status) %></th>
<th><%= Version.human_attribute_name(:sharing) %></th>
<th><%= WikiPage.model_name.human %></th>
<th style="width:15%"></th>
</tr></thead>
<tbody>
<% for version in @project.shared_versions.sort %>
<tr class="version <%= cycle 'odd', 'even' %> <%= 'shared' if version.project != @project %>">
<td class="name <%=h version.status %><% ' icon-context icon-link' if version.project != @project%>"><%= link_to_version version %></td>
<td class="date"><%= format_date(version.start_date) %></td>
<td class="date"><%= format_date(version.effective_date) %></td>
<td class="description"><%=h version.description %></td>
<td class="status"><%= l("version_status_#{version.status}") %></td>
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
<td><%= link_to_if_authorized(h(version.wiki_page_title), {:controller => '/wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %></td>
<td class="buttons">
<% if version.project == @project %>
<%= link_to_if_authorized l(:button_edit), {:controller => '/versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete), {:controller => '/versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %>
<% end %>
</td>
</tr>
<% end; reset_cycle %>
<table class="list versions">
<thead>
<tr>
<th><%= Version.model_name.human %></th>
<th><%= Version.human_attribute_name(:start_date) %></th>
<th><%= Version.human_attribute_name(:effective_date) %></th>
<th><%= Version.human_attribute_name(:description) %></th>
<th><%= Version.human_attribute_name(:status) %></th>
<th><%= Version.human_attribute_name(:sharing) %></th>
<th><%= WikiPage.model_name.human %></th>
<th style="width:15%"></th>
</tr>
</thead>
<tbody>
<% for version in @project.shared_versions.sort %>
<tr class="version <%= cycle 'odd', 'even' %> <%= 'shared' if version.project != @project %>">
<td class="name <%=h version.status %><% ' icon-context icon-link' if version.project != @project%>"><%= link_to_version version %></td>
<td class="date"><%= format_date(version.start_date) %></td>
<td class="date"><%= format_date(version.effective_date) %></td>
<td class="description"><%=h version.description %></td>
<td class="status"><%= l("version_status_#{version.status}") %></td>
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
<td><%= link_to_if_authorized(h(version.wiki_page_title), {:controller => '/wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %></td>
<td class="buttons">
<% if version.project == @project %>
<%= link_to_if_authorized l(:button_edit), {:controller => '/versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete), {:controller => '/versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %>
<% end %>
</td>
</tr>
<% end; reset_cycle %>
</tbody>
</table>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<div class="contextual">
<% if @project.versions.any? %>
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %>
<% end %>
<% if @project.versions.any? %>
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %>
<% end %>
</div>
<p><%= link_to_if_authorized l(:label_version_new), :controller => '/versions', :action => 'new', :project_id => @project %></p>

@ -57,26 +57,25 @@ See doc/COPYRIGHT.rdoc for more details.
<% 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),
<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>
</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>
@ -108,9 +107,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
<%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:controller => '/activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
<%= auto_discovery_link_tag(:atom, {:controller => '/activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
<% end %>
<% html_title(l(:label_overview)) -%>

@ -26,144 +26,143 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%# TODO Remove when not needed any more %>
<script type="text/javascript">
//<![CDATA[
function add_filter() {
select = $('add_filter_select');
field = select.value
Element.show('tr_' + field);
check_box = $('cb_' + field);
check_box.checked = true;
toggle_filter(field);
select.selectedIndex = 0;
//<![CDATA[
function add_filter() {
select = $('add_filter_select');
field = select.value
Element.show('tr_' + field);
check_box = $('cb_' + field);
check_box.checked = true;
toggle_filter(field);
select.selectedIndex = 0;
for (i=0; i<select.options.length; i++) {
if (select.options[i].value == field) {
select.options[i].disabled = true;
}
}
}
for (i=0; i<select.options.length; i++) {
if (select.options[i].value == field) {
select.options[i].disabled = true;
}
function toggle_filter(field) {
check_box = $('cb_' + field);
if (check_box.checked) {
Element.show("operators_" + field);
Form.Element.enable("operators_" + field);
Form.Element.enable("values_" + field);
toggle_operator(field);
} else {
Element.hide("operators_" + field);
Element.hide("div_values_" + field);
Form.Element.disable("operators_" + field);
Form.Element.disable("values_" + field);
}
}
function toggle_filter(field) {
check_box = $('cb_' + field);
}
if (check_box.checked) {
Element.show("operators_" + field);
Form.Element.enable("operators_" + field);
Form.Element.enable("values_" + field);
toggle_operator(field);
} else {
Element.hide("operators_" + field);
function toggle_operator(field) {
operator = $("operators_" + field);
switch (operator.value) {
case "!*":
case "*":
case "t":
case "w":
case "o":
case "c":
Element.hide("div_values_" + field);
Form.Element.disable("operators_" + field);
Form.Element.disable("values_" + field);
break;
default:
Element.show("div_values_" + field);
break;
}
}
}
function toggle_operator(field) {
operator = $("operators_" + field);
switch (operator.value) {
case "!*":
case "*":
case "t":
case "w":
case "o":
case "c":
Element.hide("div_values_" + field);
break;
default:
Element.show("div_values_" + field);
break;
function toggle_multi_select(field) {
select = $('values_' + field);
if (select.multiple == true) {
select.multiple = false;
} else {
select.multiple = true;
}
}
}
function toggle_multi_select(field) {
select = $('values_' + field);
if (select.multiple == true) {
select.multiple = false;
} else {
select.multiple = true;
}
}
function apply_filters_observer() {
$$("#query_form input[type=text]").invoke("observe", "keypress", function(e){
if(e.keyCode == Event.KEY_RETURN) {
<%= remote_function(:url => { :set_filter => 1},
:update => "content",
:before => 'selectAllOptions("selected_columns");',
:method => :get,
:with => "jQuery('#query_form').serialize()",
:complete => "e.stop(); apply_filters_observer()") %>
}
});
}
Event.observe(document,"dom:loaded", apply_filters_observer);
//]]>
function apply_filters_observer() {
$$("#query_form input[type=text]").invoke("observe", "keypress", function(e){
if(e.keyCode == Event.KEY_RETURN) {
<%= remote_function(:url => { :set_filter => 1},
:update => "content",
:before => 'selectAllOptions("selected_columns");',
:method => :get,
:with => "jQuery('#query_form').serialize()",
:complete => "e.stop(); apply_filters_observer()") %>
}
});
}
Event.observe(document,"dom:loaded", apply_filters_observer);
//]]>
</script>
<table width="100%">
<tr>
<td>
<table>
<% query.available_work_package_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %>
<% field = filter[0]
options = filter[1] %>
<tr <%= 'style="display:none;"'.html_safe unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter">
<td style="width:200px;">
<label>
<%= check_box_tag 'f[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %>
<%= filter[1][:name] || WorkPackage.human_attribute_name(field) %>
</label>
</td>
<td style="width:150px;">
<%= label_tag "op_#{field}", l(:description_filter), :class => "hidden-for-sighted" %>
<%= select_tag "op[#{field}]", options_for_select(operators_for_select(options[:type]), query.filter_for(field).try(:operator)), :id => "operators_#{field}", :onchange => "toggle_operator('#{field}');", :class => "form--select -small", :style => "vertical-align: top;" %>
</td>
<tr>
<td>
<div id="div_values_<%= field %>" style="display:none;">
<% field_values = query.filter_for(field).try(:values) || []
<table>
<% query.available_work_package_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %>
<% field = filter[0]
options = filter[1] %>
<tr <%= 'style="display:none;"'.html_safe unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter">
<td style="width:200px;">
<label>
<%= check_box_tag 'f[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %>
<%= filter[1][:name] || WorkPackage.human_attribute_name(field) %>
</label>
</td>
<td style="width:150px;">
<%= label_tag "op_#{field}", l(:description_filter), :class => "hidden-for-sighted" %>
<%= select_tag "op[#{field}]", options_for_select(operators_for_select(options[:type]), query.filter_for(field).try(:operator)), :id => "operators_#{field}", :onchange => "toggle_operator('#{field}');", :class => "form--select -small", :style => "vertical-align: top;" %>
</td>
<td>
<div id="div_values_<%= field %>" style="display:none;">
<% field_values = query.filter_for(field).try(:values) || []
case options[:type]
when :list, :list_optional, :list_status, :list_subprojects %>
<span class="inline-label">
<select <%= "multiple=true" if field_values and field_values.length > 1 %> name="v[<%= field %>][]" id="values_<%= field %>" class="form--select -small" style="vertical-align: top;">
<%= options_for_select options[:values], field_values %>
</select>
<%= link_to_function icon_wrapper('icon-context icon-plus', l(:label_enable_multi_select)),
<span class="inline-label">
<select <%= "multiple=true" if field_values and field_values.length > 1 %> name="v[<%= field %>][]" id="values_<%= field %>" class="form--select -small" style="vertical-align: top;">
<%= options_for_select options[:values], field_values %>
</select>
<%= link_to_function icon_wrapper('icon-context icon-plus', l(:label_enable_multi_select)),
"toggle_multi_select('#{field}');",
:title => l(:label_enable_multi_select),
:class => 'form-label no-decoration-on-hover' %>
</span>
<% when :date, :date_past %>
<span class="inline-label">
<%= text_field_tag "v[#{field}][]", field_values, :id => "values_#{field}", :size => 3, :class => "form--text-field -small" %>
<label for='<%= "values_#{field}" %>' class="form-label"><%= l(:label_day_plural) %></label>
</span>
<% when :string, :text %>
<%= text_field_tag "v[#{field}][]", field_values, :id => "values_#{field}", :size => 30, :class => "form--text-field -small" %>
<label for='<%= "values_#{field}" %>' class='hidden-for-sighted' ><%= l(:description_enter_text) %></label>
<% when :integer %>
<%= text_field_tag "v[#{field}][]", field_values, :id => "values_#{field}", :size => 3, :class => "form--text-field -small" %>
<label for='<%= "values_#{field}" %>' class='hidden-for-sighted' ><%= l(:description_enter_number) %></label>
<% end %>
</div>
<script type="text/javascript">toggle_filter('<%= field %>');</script>
</td>
</tr>
<% end %>
</table>
</td>
<td class="add-filter">
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
<%= select_tag 'add_filter_select',
</span>
<% when :date, :date_past %>
<span class="inline-label">
<%= text_field_tag "v[#{field}][]", field_values, :id => "values_#{field}", :size => 3, :class => "form--text-field -small" %>
<label for='<%= "values_#{field}" %>' class="form-label"><%= l(:label_day_plural) %></label>
</span>
<% when :string, :text %>
<%= text_field_tag "v[#{field}][]", field_values, :id => "values_#{field}", :size => 30, :class => "form--text-field -small" %>
<label for='<%= "values_#{field}" %>' class='hidden-for-sighted' ><%= l(:description_enter_text) %></label>
<% when :integer %>
<%= text_field_tag "v[#{field}][]", field_values, :id => "values_#{field}", :size => 3, :class => "form--text-field -small" %>
<label for='<%= "values_#{field}" %>' class='hidden-for-sighted' ><%= l(:description_enter_number) %></label>
<% end %>
</div>
<script type="text/javascript">
toggle_filter('<%= field %>');
</script>
</td>
</tr>
<% end %>
</table>
</td>
<td class="add-filter">
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
<%= select_tag 'add_filter_select',
options_for_select(entries_for_filter_select_sorted(query)),
:onchange => "add_filter();",
:class => "form--select -small",
:name => nil %>
</td>
</tr>
</table>
<%= hidden_field_tag 'f[]', '' %>
</td>
</tr>
</table>
<%= hidden_field_tag 'f[]', '' %>

@ -57,7 +57,7 @@ See doc/COPYRIGHT.rdoc for more details.
<label for="reporting_reported_project_status_id">
<%= Reporting.human_attribute_name(:reported_project_status_id) %>:
</label>
<%= f.select :reported_project_status_id,
<%= f.select :reported_project_status_id,
@reporting.possible_reported_project_statuses.map { |s|
[s.name, s.id]
}.unshift(["-",""]) %>

@ -26,12 +26,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= header_tags %>
<%= javascript_include_tag 'contextual_fieldset.js' %>
<% content_for :action_menu_specific do %>
<%= link_to_if_authorized(l("timelines.new_reporting"),
<%= link_to_if_authorized(l("timelines.new_reporting"),
{ :action => :new },
{ :title => l("timelines.new_reporting"),
:class => ("icon icon-add")

@ -26,19 +26,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<table class="list entries" id="browser">
<thead>
<tr id="root">
<th><%= Attachment.human_attribute_name(:filename) %></th>
<th><%= Attachment.human_attribute_name(:filesize) %></th>
<th><%= l(:label_revision) %></th>
<th><%= l(:label_age) %></th>
<th><%= Changeset.human_attribute_name(:author) %></th>
<th><%= Changeset.human_attribute_name(:comments) %></th>
</tr>
</thead>
<tbody>
<%= render :partial => 'dir_list_content' %>
</tbody>
<thead>
<tr id="root">
<th><%= Attachment.human_attribute_name(:filename) %></th>
<th><%= Attachment.human_attribute_name(:filesize) %></th>
<th><%= l(:label_revision) %></th>
<th><%= l(:label_age) %></th>
<th><%= Changeset.human_attribute_name(:author) %></th>
<th><%= Changeset.human_attribute_name(:comments) %></th>
</tr>
</thead>
<tbody>
<%= render :partial => 'dir_list_content' %>
</tbody>
</table>

@ -26,31 +26,30 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% @entries.each do |entry| %>
<% tr_id = Digest::MD5.hexdigest(entry.path)
<% tr_id = Digest::MD5.hexdigest(entry.path)
depth = params[:depth].to_i %>
<% ent_path = replace_invalid_utf8(entry.path) %>
<% ent_name = replace_invalid_utf8(entry.name) %>
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= h(entry.kind) %>">
<td style="padding-left: <%=18 * depth%>px;" class="filename">
<% if entry.is_dir? %>
<span class="icon-context dir-expander" onclick="<%= remote_function :url => {:action => 'show', :project_id => @project, :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
<% ent_path = replace_invalid_utf8(entry.path) %>
<% ent_name = replace_invalid_utf8(entry.name) %>
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= h(entry.kind) %>">
<td style="padding-left: <%=18 * depth%>px;" class="filename">
<% if entry.is_dir? %>
<span class="icon-context dir-expander" onclick="<%= remote_function :url => {:action => 'show', :project_id => @project, :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
:method => :get,
:update => { :success => tr_id },
:position => :after,
:success => "scmEntryLoaded('#{tr_id}')",
:condition => "scmEntryClick('#{tr_id}')"%>">&nbsp</span>
<% end %>
<%= link_to h(ent_name),
<% end %>
<%= link_to h(ent_name),
{:action => (entry.is_dir? ? 'show' : 'changes'), :project_id => @project, :path => to_path_param(ent_path), :rev => @rev},
:class => (entry.is_dir? ? 'icon-context icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
</td>
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
<% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
<td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td>
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
<td class="author"><%= changeset.nil? ? h(replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : h(changeset.author) if entry.lastrev %></td>
<td class="comments"><%=h truncate(Changeset.to_utf8(changeset.comments, changeset.repository.repo_log_encoding), :length => 50) unless changeset.nil? %></td>
</tr>
</td>
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
<% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
<td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td>
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
<td class="author"><%= changeset.nil? ? h(replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : h(changeset.author) if entry.lastrev %></td>
<td class="comments"><%=h truncate(Changeset.to_utf8(changeset.comments, changeset.repository.repo_log_encoding), :length => 50) unless changeset.nil? %></td>
</tr>
<% end %>

@ -26,19 +26,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% if @entry && @entry.kind == 'file' %>
<p>
<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :project_id => @project, :path => to_path_param(@path), :rev => @rev } %> |
<% if @repository.supports_cat? %>
<%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :project_id => @project, :path => to_path_param(@path), :rev => @rev } %> |
<% end %>
<% if @repository.supports_annotate? %>
<%= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :project_id => @project, :path => to_path_param(@path), :rev => @rev } %> |
<% end %>
<%= link_to(l(:button_download), {:action => 'entry', :project_id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
</p>
<p>
<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :project_id => @project, :path => to_path_param(@path), :rev => @rev } %> |
<% if @repository.supports_cat? %>
<%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :project_id => @project, :path => to_path_param(@path), :rev => @rev } %> |
<% end %>
<% if @repository.supports_annotate? %>
<%= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :project_id => @project, :path => to_path_param(@path), :rev => @rev } %> |
<% end %>
<%= link_to(l(:button_download), {:action => 'entry', :project_id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
</p>
<% end %>

@ -36,21 +36,18 @@ See doc/COPYRIGHT.rdoc for more details.
<%= link_to l(:label_statistics), stats_project_repository_path(@project),
:class => 'icon icon-stats' %> |
<!--<![endif]-->
<%# rev => nil prevents overwriting the rev parameter queried for in the form with the parameter from the request %>
<%= form_tag({:action => controller.action_name, :project_id => @project, :path => to_path_param(@path), :rev => nil}, {:method => :get, :id => 'revision_selector'}) do -%>
<!-- Branches Dropdown -->
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
<%= l(:label_branch) %>:
<%# rev => nil prevents overwriting the rev parameter queried for in the form with the parameter from the request %>
<%= form_tag({:action => controller.action_name, :project_id => @project, :path => to_path_param(@path), :rev => nil}, {:method => :get, :id => 'revision_selector'}) do -%>
<!-- Branches Dropdown -->
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
<%= l(:label_branch) %>:
<%= select_tag :branch, options_for_select([''] + @repository.branches,@rev), :id => 'branch' %> |
<% end -%>
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%>
<%= l(:label_tag) %>:
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%>
<%= l(:label_tag) %>:
<%= select_tag :tag, options_for_select([''] + @repository.tags,@rev), :id => 'tag' %> |
<% end -%>
<%= l(:label_revision) %>:
<%= l(:label_revision) %>:
<%= text_field_tag 'rev', @rev, :size => 8 %>
<% end -%>
<% end %>
<% end -%>
<% end %>

@ -43,27 +43,27 @@ See doc/COPYRIGHT.rdoc for more details.
<% show_diff = revisions.size > 1 %>
<% line_num = 1 %>
<% revisions.each do |changeset| %>
<tr class="changeset <%= cycle 'odd', 'even' %>">
<td class="id">
<%= link_to_revision(changeset, project) %>
</td>
<td class="checkbox">
<%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %>
</td>
<td class="checkbox">
<%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %>
</td>
<td class="committed_on">
<%= format_time(changeset.committed_on) %>
</td>
<td class="author">
<%=h changeset.author %>
</td>
<td class="comments">
<%= format_text(truncate_at_line_break(Changeset.to_utf8(changeset.comments, changeset.repository.repo_log_encoding))) %>
</td>
</tr>
<% line_num += 1 %>
<tr class="changeset <%= cycle 'odd', 'even' %>">
<td class="id">
<%= link_to_revision(changeset, project) %>
</td>
<td class="checkbox">
<%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %>
</td>
<td class="checkbox">
<%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %>
</td>
<td class="committed_on">
<%= format_time(changeset.committed_on) %>
</td>
<td class="author">
<%=h changeset.author %>
</td>
<td class="comments">
<%= format_text(truncate_at_line_break(Changeset.to_utf8(changeset.comments, changeset.repository.repo_log_encoding))) %>
</td>
</tr>
<% line_num += 1 %>
<% end %>
</tbody>
</table>

@ -26,36 +26,30 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
<%= render :partial => 'navigation' %>
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<p><%= render :partial => 'link_to_functions' %></p>
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
<div class="autoscroll">
<table class="filecontent annotate CodeRay">
<tbody>
<% line_num = 1 %>
<% syntax_highlight(@path, to_utf8_for_repositories(@annotate.content)).each_line do |line| %>
<% revision = @annotate.revisions[line_num-1] %>
<tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>">
<th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th>
<td class="revision">
<%= (revision.identifier ? link_to_revision(revision, @project) : format_revision(revision)) if revision %></td>
<td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td>
<td class="line-code"><pre><%= line %></pre></td>
</tr>
<% line_num += 1 %>
<% end %>
</tbody>
</table>
<table class="filecontent annotate CodeRay">
<tbody>
<% line_num = 1 %>
<% syntax_highlight(@path, to_utf8_for_repositories(@annotate.content)).each_line do |line| %>
<% revision = @annotate.revisions[line_num-1] %>
<tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>">
<th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th>
<td class="revision">
<%= (revision.identifier ? link_to_revision(revision, @project) : format_revision(revision)) if revision %></td>
<td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td>
<td class="line-code">
<pre><%= line %></pre>
</td>
</tr>
<% line_num += 1 %>
<% end %>
</tbody>
</table>
</div>
<% html_title(l(:button_annotate)) -%>

@ -26,38 +26,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= l(:label_repository) %></h2>
<%= simple_format(l(:text_repository_usernames_mapping)) %>
<% if @committers.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<%= form_tag({}) do %>
<table class="list">
<thead>
<tr>
<th><%= User.human_attribute_name(:login) %></th>
<th><%= User.model_name.human %></th>
</tr>
</thead>
<tbody>
<% i = 0 -%>
<% @committers.each do |committer, user_id| -%>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h committer %></td>
<td>
<%= hidden_field_tag "committers[#{i}][]", committer %>
<%= select_tag "committers[#{i}][]", content_tag('option', "-- #{l :actionview_instancetag_blank_option} --", :value => '') + options_from_collection_for_select(@users, 'id', 'name', user_id.to_i) %>
</td>
</tr>
<% i += 1 -%>
<% end -%>
</tbody>
</table>
<p><%= submit_tag l(:button_update), class: 'button -highlight' %></p>
<% end %>
<%= form_tag({}) do %>
<table class="list">
<thead>
<tr>
<th><%= User.human_attribute_name(:login) %></th>
<th><%= User.model_name.human %></th>
</tr>
</thead>
<tbody>
<% i = 0 -%>
<% @committers.each do |committer, user_id| -%>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h committer %></td>
<td>
<%= hidden_field_tag "committers[#{i}][]", committer %>
<%= select_tag "committers[#{i}][]", content_tag('option', "-- #{l :actionview_instancetag_blank_option} --", :value => '') + options_from_collection_for_select(@users, 'id', 'name', user_id.to_i) %>
</td>
</tr>
<% i += 1 -%>
<% end -%>
</tbody>
</table>
<p><%= submit_tag l(:button_update), class: 'button -highlight' %></p>
<% end %>
<% end %>

@ -34,13 +34,11 @@ See doc/COPYRIGHT.rdoc for more details.
<%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
<%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
<p><label><%= l(:label_view_diff) %></label>
<%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %></p>
<%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %></p>
<% end %>
<% cache(@cache_key) do -%>
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
<% end -%>
<%= other_formats_links do |f| %>
<%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %>
<% end %>

@ -34,7 +34,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% else -%>
<%= l(:label_previous) %>
<% end -%>
|
|
<% unless @changeset.next.nil? -%>
<%= link_to_revision(@changeset.next, @project, :text => l(:label_next)) %>
<% else -%>
@ -47,40 +47,32 @@ See doc/COPYRIGHT.rdoc for more details.
<%= submit_tag 'OK', :name => nil, class: 'button -highlight' %>
<% end %>
<% end %>
<h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<p><% if @changeset.scmid %>ID: <%= h(@changeset.scmid) %><br /><% end %>
<span class="author"><%= authoring(@changeset.committed_on, @changeset.author) %></span></p>
<p><% if @changeset.scmid %>ID: <%= h(@changeset.scmid) %><br />
<% end %>
<span class="author"><%= authoring(@changeset.committed_on, @changeset.author) %></span></p>
<%= format_text @changeset.comments %>
<% if @changeset.work_packages.visible.any? %>
<h3><%= l(:label_related_work_packages) %></h3>
<ul>
<% @changeset.work_packages.visible.each do |work_package| %>
<li><%= link_to_work_package work_package %></li>
<h3><%= l(:label_related_work_packages) %></h3>
<ul>
<% @changeset.work_packages.visible.each do |work_package| %>
<li><%= link_to_work_package work_package %></li>
<% end %>
</ul>
<% end %>
</ul>
<% end %>
<% if User.current.allowed_to?(:browse_repository, @project) %>
<h3><%= l(:label_attachment_plural) %></h3>
<ul id="changes-legend">
<li class="change change-A"><%= l(:label_added) %></li>
<li class="change change-M"><%= l(:label_modified) %></li>
<li class="change change-C"><%= l(:label_copied) %></li>
<li class="change change-R"><%= l(:label_renamed) %></li>
<li class="change change-D"><%= l(:label_deleted) %></li>
</ul>
<p><%= link_to(l(:label_view_diff), :action => 'diff', :project_id => @project, :path => nil, :rev => @changeset.identifier) if @changeset.changes.any? %></p>
<div class="changeset-changes">
<%= render_changeset_changes %>
</div>
<h3><%= l(:label_attachment_plural) %></h3>
<ul id="changes-legend">
<li class="change change-A"><%= l(:label_added) %></li>
<li class="change change-M"><%= l(:label_modified) %></li>
<li class="change change-C"><%= l(:label_copied) %></li>
<li class="change change-R"><%= l(:label_renamed) %></li>
<li class="change change-D"><%= l(:label_deleted) %></li>
</ul>
<p><%= link_to(l(:label_view_diff), :action => 'diff', :project_id => @project, :path => nil, :rev => @changeset.identifier) if @changeset.changes.any? %></p>
<div class="changeset-changes">
<%= render_changeset_changes %>
</div>
<% end %>
<% html_title("#{l(:label_revision)} #{format_revision(@changeset)}") -%>

@ -26,26 +26,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% content_for :action_menu_specific do %>
<%= form_tag({:action => 'revision', :id => @project}) do %>
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 8 %>
<%= submit_tag 'OK', class: 'button -highlight' %>
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 8 %>
<%= submit_tag 'OK', class: 'button -highlight' %>
<% end %>
<% end %>
<h2><%= l(:label_revision_plural) %></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<%= render :partial => 'revisions', :locals => {:project => @project, :path => '', :revisions => @changesets, :entry => nil }%>
<%= pagination_links_full @changesets %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
<% end %>
<%= other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<% end %>

@ -26,33 +26,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= error_messages_for 'role' %>
<% unless @role.builtin? %>
<div class="box">
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.check_box :assignable %></p>
<% if @role.new_record? && @roles.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(@roles, :id, :name)) %></p>
<% end %>
</div>
<div class="box">
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.check_box :assignable %></p>
<% if @role.new_record? && @roles.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(@roles, :id, :name)) %></p>
<% end %>
</div>
<% end %>
<h3><%= l(:label_permissions) %></h3>
<div class="box" id="permissions">
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
<% perms_by_module.keys.sort.each do |mod| %>
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
<% perms_by_module.keys.sort.each do |mod| %>
<fieldset><legend><%= mod.blank? ? Project.model_name.human : l_or_humanize(mod, :prefix => 'project_module_') %></legend>
<% perms_by_module[mod].each do |permission| %>
<% perms_by_module[mod].each do |permission| %>
<label class="floating">
<%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %>
<%= l_or_humanize(permission.name, :prefix => 'permission_') %>
<%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %>
<%= l_or_humanize(permission.name, :prefix => 'permission_') %>
</label>
<% end %>
<% end %>
</fieldset>
<% end %>
<br /><%= check_all_links 'permissions' %>
<%= hidden_field_tag 'role[permissions][]', '' %>
<% end %>
<br />
<%= check_all_links 'permissions' %>
<%= hidden_field_tag 'role[permissions][]', '' %>
</div>

@ -32,12 +32,12 @@ See doc/COPYRIGHT.rdoc for more details.
{
"items":[
<% @roles.each_with_index do |role, ix| %>
{
{
"id": <%= role.id.to_json.html_safe %>,
"name": <%= role.name.to_json.html_safe %>
} <%= "," unless ix == @roles.length - 1 %>
<% end %> ],
} <%= "," unless ix == @roles.length - 1 %>
<% end %> ],
"total": <%= @total ? @total : @roles.size %>,
"more": <%= @more ? @more : 0 %>
}
}
}

@ -30,41 +30,36 @@ See doc/COPYRIGHT.rdoc for more details.
<% content_for :action_menu_specific do %>
<%= link_to l(:label_role_new), {:action => 'new'}, :class => 'icon icon-add' %>
<% end %>
<% html_title l(:label_administration), l("label_role_plural") %>
<h2><%=l(:label_role_plural)%></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<table class="list">
<thead><tr>
<th><%= Role.model_name.human %></th>
<th><%=l(:button_sort)%></th>
<th></th>
</tr></thead>
<thead>
<tr>
<th><%= Role.model_name.human %></th>
<th><%=l(:button_sort)%></th>
<th></th>
</tr>
</thead>
<tbody>
<% for role in @roles %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), :action => 'edit', :id => role)) %></td>
<td align="center" style="width:15%;">
<% unless role.builtin? %>
<%= reorder_links('role', {:action => 'update', :id => role}, :method => :put) %>
<% end %>
</td>
<td class="buttons">
<%= link_to(l(:button_delete), role_path(role),
<% for role in @roles %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), :action => 'edit', :id => role)) %></td>
<td align="center" style="width:15%;">
<% unless role.builtin? %>
<%= reorder_links('role', {:action => 'update', :id => role}, :method => :put) %>
<% end %>
</td>
<td class="buttons">
<%= link_to(l(:button_delete), role_path(role),
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-delete') unless role.builtin? %>
</td>
</tr>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= pagination_links_full @roles %>
<p><%= link_to l(:label_permissions_report), :action => 'report' %></p>
<% html_title(l(:label_role_plural)) -%>

@ -26,58 +26,56 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= link_to l(:label_role_plural), roles_path %> &#187; <%=l(:label_permissions_report)%></h2>
<%= form_tag(roles_path, :method => :put, :id => 'permissions_form') do %>
<%= hidden_field_tag 'permissions[0]', '', :id => nil %>
<div class="autoscroll">
<table class="list">
<thead>
<tr>
<th><%=l(:label_permissions)%></th>
<% @roles.each do |role| %>
<th>
<%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %>
<%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('input.role-#{role.id}')",
<%= hidden_field_tag 'permissions[0]', '', :id => nil %>
<div class="autoscroll">
<table class="list">
<thead>
<tr>
<th><%=l(:label_permissions)%></th>
<% @roles.each do |role| %>
<th>
<%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %>
<%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('input.role-#{role.id}')",
:class => 'no-decoration-on-hover',
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
</th>
<% end %>
</tr>
</thead>
<tbody>
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
<% perms_by_module.keys.sort.each do |mod| %>
<% unless mod.blank? %>
<tr class="group open">
<td colspan="<%= @roles.size + 1 %>">
<span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
<%= l_or_humanize(mod, :prefix => 'project_module_') %>
</td>
</th>
<% end %>
</tr>
<% end %>
<% perms_by_module[mod].each do |permission| %>
<tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
<td>
<%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
</thead>
<tbody>
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
<% perms_by_module.keys.sort.each do |mod| %>
<% unless mod.blank? %>
<tr class="group open">
<td colspan="<%= @roles.size + 1 %>">
<span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
<%= l_or_humanize(mod, :prefix => 'project_module_') %>
</td>
</tr>
<% end %>
<% perms_by_module[mod].each do |permission| %>
<tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
<td>
<%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
:class => 'no-decoration-on-hover',
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
<%= l_or_humanize(permission.name, :prefix => 'permission_') %>
</td>
<% @roles.each do |role| %>
<td align="center">
<% if role.setable_permissions.include? permission %>
<%= check_box_tag "permissions[#{role.id}][]", permission.name, (role.permissions.include? permission.name), :id => nil, :class => "role-#{role.id}" %>
<% end %>
</td>
<%= l_or_humanize(permission.name, :prefix => 'permission_') %>
</td>
<% @roles.each do |role| %>
<td align="center">
<% if role.setable_permissions.include? permission %>
<%= check_box_tag "permissions[#{role.id}][]", permission.name, (role.permissions.include? permission.name), :id => nil, :class => "role-#{role.id}" %>
<% end %>
</td>
<% end %>
</tr>
<% end %>
<% end %>
</tr>
<% end %>
<% end %>
</tbody>
</table>
</div>
<p><%= check_all_links 'permissions_form' %></p>
<p><%= submit_tag l(:button_save), class: 'button -highlight' %></p>
</tbody>
</table>
</div>
<p><%= check_all_links 'permissions_form' %></p>
<p><%= submit_tag l(:button_save), class: 'button -highlight' %></p>
<% end %>

@ -30,52 +30,43 @@ See doc/COPYRIGHT.rdoc for more details.
<% content_for :header_tags do %>
<%= call_hook :search_index_head %>
<% end %>
<h2><%= l(:label_search) %></h2>
<div class="box">
<%= form_tag(search_path(@project), :method => :get) do %>
<%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %>
<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
<%= javascript_tag "Field.focus('search-input')" %>
<%= project_select_tag %>
<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
<label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
</p>
<p>
<% @object_types.each do |t| %>
<label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label>
<% end %>
</p>
<p><%= submit_tag l(:button_submit), :name => 'submit', class: 'button -highlight' %></p>
<% end %>
<%= form_tag(search_path(@project), :method => :get) do %>
<%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %>
<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
<%= javascript_tag "Field.focus('search-input')" %>
<%= project_select_tag %>
<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
<label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
</p>
<p>
<% @object_types.each do |t| %>
<label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label>
<% end %>
</p>
<p><%= submit_tag l(:button_submit), :name => 'submit', class: 'button -highlight' %></p>
<% end %>
</div>
<% if @results %>
<div id="search-results-counts">
<div id="search-results-counts">
<%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>
</div>
<h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
<%= render :partial => 'pagination', :locals => {:pagination_previous_date => @pagination_previous_date, :pagination_next_date => @pagination_next_date } %>
<dl id="search-results">
<% @results.each do |e| %>
<dt class="<%= e.event_type %>">
<%= icon_wrapper("icon-context icon-#{e.event_type}", e.event_name) %>
<% if e.project != @project %>
<span class="project"><%= e.project %></span>
<% end %>
<%= link_to highlight_tokens(truncate(e.event_title, :length => 255), @tokens), with_notes_anchor(e, @tokens) %>
</dt>
<dd><span class="description"><%= highlight_first([last_journal(e).try(:notes), e.event_description], @tokens) %></span>
</div>
<h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
<%= render :partial => 'pagination', :locals => {:pagination_previous_date => @pagination_previous_date, :pagination_next_date => @pagination_next_date } %>
<dl id="search-results">
<% @results.each do |e| %>
<dt class="<%= e.event_type %>">
<%= icon_wrapper("icon-context icon-#{e.event_type}", e.event_name) %>
<% if e.project != @project %>
<span class="project"><%= e.project %></span>
<% end %>
<%= link_to highlight_tokens(truncate(e.event_title, :length => 255), @tokens), with_notes_anchor(e, @tokens) %>
</dt>
<dd><span class="description"><%= highlight_first([last_journal(e).try(:notes), e.event_description], @tokens) %></span>
<span class="author"><%= format_time(e.event_datetime) %></span></dd>
<% end %>
</dl>
<% end %>
</dl>
<% end %>
<%= render :partial => 'pagination', :locals => {:pagination_previous_date => @pagination_previous_date, :pagination_next_date => @pagination_next_date } %>
<% html_title(l(:label_search)) -%>

@ -97,12 +97,10 @@ See doc/COPYRIGHT.rdoc for more details.
<p><%= setting_check_box :rest_api_enabled %></p>
</fieldset>
</div>
<% unless OpenProject::Configuration.disable_password_login? %>
<div style="float:right;">
<%= link_to l(:label_ldap_authentication), {:controller => '/ldap_auth_sources', :action => 'index'}, :class => 'icon icon-server-key' %>
<%= link_to l(:label_ldap_authentication), {:controller => '/ldap_auth_sources', :action => 'index'}, :class => 'icon icon-server-key' %>
</div>
<% end %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,63 +26,46 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= form_tag({:action => 'edit'}) do %>
<div class="box tabular settings">
<p><%= setting_text_field :app_title, :size => 30 %></p>
<p>
<%= setting_text_area :welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit', :'ng-non-bindable' => '' %>
<%= wikitoolbar_for 'settings_welcome_text' %>
</p>
<p>
<span class="inline-label">
<%= setting_text_field :attachment_max_size, :size => 6 %>
<span class="form-label"><%= l(:"number.human.storage_units.units.kb") %></span>
</span>
</p>
<p>
<%= setting_text_field :per_page_options, :size => 20 %>
<em><%= l(:text_comma_separated) %></em><br>
<em><%= l(:text_notice_too_many_values_are_inperformant) %></em>
</p>
<p>
<span class="inline-label">
<%= setting_text_field :activity_days_default, :size => 6 %>
<span class="form-label"><%= l(:label_day_plural) %></span>
</span>
</p>
<p><%= setting_text_field :host_name, :size => 60 %>
<em><%= l(:label_example) %>: <%= @guessed_host %></em></p>
<p><%= setting_select :protocol, [['HTTP', 'http'], ['HTTPS', 'https']] %></p>
<p><%= setting_select :text_formatting, Redmine::WikiFormatting.format_names.collect{|name| [name, name.to_s]}, :blank => :label_none %></p>
<p><%= setting_check_box :cache_formatted_text %></p>
<p><%= setting_select :wiki_compression, [['Gzip', 'gzip']], :blank => :label_none %></p>
<p><%= setting_check_box :feeds_enabled, :size => 6 %></p>
<p><%= setting_text_field :feeds_limit, :size => 6 %></p>
<p>
<span class="inline-label">
<%= setting_text_field :file_max_size_displayed, :size => 6 %>
<span class="form-label"><%= l(:"number.human.storage_units.units.kb") %></span>
</span>
</p>
<p><%= setting_text_field :diff_max_lines_displayed, :size => 6 %></p>
<%= call_hook(:view_settings_general_form) %>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<div class="box tabular settings">
<p><%= setting_text_field :app_title, :size => 30 %></p>
<p>
<%= setting_text_area :welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit', :'ng-non-bindable' => '' %>
<%= wikitoolbar_for 'settings_welcome_text' %>
</p>
<p>
<span class="inline-label">
<%= setting_text_field :attachment_max_size, :size => 6 %>
<span class="form-label"><%= l(:"number.human.storage_units.units.kb") %></span>
</span>
</p>
<p>
<%= setting_text_field :per_page_options, :size => 20 %>
<em><%= l(:text_comma_separated) %></em><br>
<em><%= l(:text_notice_too_many_values_are_inperformant) %></em>
</p>
<p>
<span class="inline-label">
<%= setting_text_field :activity_days_default, :size => 6 %>
<span class="form-label"><%= l(:label_day_plural) %></span>
</span>
</p>
<p><%= setting_text_field :host_name, :size => 60 %>
<em><%= l(:label_example) %>: <%= @guessed_host %></em></p>
<p><%= setting_select :protocol, [['HTTP', 'http'], ['HTTPS', 'https']] %></p>
<p><%= setting_select :text_formatting, Redmine::WikiFormatting.format_names.collect{|name| [name, name.to_s]}, :blank => :label_none %></p>
<p><%= setting_check_box :cache_formatted_text %></p>
<p><%= setting_select :wiki_compression, [['Gzip', 'gzip']], :blank => :label_none %></p>
<p><%= setting_check_box :feeds_enabled, :size => 6 %></p>
<p><%= setting_text_field :feeds_limit, :size => 6 %></p>
<p>
<span class="inline-label">
<%= setting_text_field :file_max_size_displayed, :size => 6 %>
<span class="form-label"><%= l(:"number.human.storage_units.units.kb") %></span>
</span>
</p>
<p><%= setting_text_field :diff_max_lines_displayed, :size => 6 %></p>
<%= call_hook(:view_settings_general_form) %>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,27 +26,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= form_tag({:action => 'edit', :tab => 'mail_handler'}) do %>
<div class="box tabular settings">
<p>
<%= setting_text_area :mail_handler_body_delimiters, :rows => 5 %>
<br /><em><%= l(:text_line_separated) %></em>
</p>
</div>
<div class="box tabular settings">
<p><%= setting_check_box :mail_handler_api_enabled,
<div class="box tabular settings">
<p>
<%= setting_text_area :mail_handler_body_delimiters, :rows => 5 %>
<br />
<em><%= l(:text_line_separated) %></em>
</p>
</div>
<div class="box tabular settings">
<p><%= setting_check_box :mail_handler_api_enabled,
:onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }"%></p>
<p><%= setting_text_field :mail_handler_api_key, :size => 30,
<p><%= setting_text_field :mail_handler_api_key, :size => 30,
:id => 'settings_mail_handler_api_key',
:disabled => !Setting.mail_handler_api_enabled? %>
<%= link_to_function l(:label_generate_key), "if ($('settings_mail_handler_api_key').disabled == false) { $('settings_mail_handler_api_key').value = randomKey(20) }" %>
</p>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= link_to_function l(:label_generate_key), "if ($('settings_mail_handler_api_key').disabled == false) { $('settings_mail_handler_api_key').value = randomKey(20) }" %>
</p>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,58 +26,45 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% if @deliveries %>
<%= form_tag({:action => 'edit', :tab => 'notifications'}) do %>
<div class="box tabular settings">
<p><%= setting_text_field :mail_from, :size => 60 %></p>
<p><%= setting_check_box :bcc_recipients %></p>
<p><%= setting_check_box :plain_text_mail %></p>
<p><%= setting_select(:default_notification_option, User.valid_notification_options.collect {|o| [l(o.last), o.first.to_s]}) %></p>
</div>
<fieldset class="box" id="notified_events"><legend><%=l(:text_select_mail_notifications)%></legend>
<%= hidden_field_tag 'settings[notified_events][]', '' %>
<% @notifiables.each do |notifiable| %>
<%= notification_field notifiable %>
<br />
<% end %>
<p><%= check_all_links('notified_events') %></p>
</fieldset>
<fieldset id="emails_decorators" class="box"><legend><%= l(:setting_emails_header) %> & <%= l(:setting_emails_footer) %></legend>
<%= select_tag 'lang', options_for_select(lang_options_for_select(false), current_language.to_s), :id => 'emails_decorators_switch', :onchange => "toggleEmailDecoratorFields()" %>
<% Setting.available_languages.each do |lang| %>
<div id="emails_decorators_<%= lang %>" style="display:none" class="emails_decorators">
<%= label_tag "settings[emails_header][#{lang}]", l(:setting_emails_header) %>
<%= text_area_tag("settings[emails_header][#{lang}]", Setting.emails_header[lang], :label => false, :class => 'wiki-edit', :rows => 5) %>
<%= label_tag "settings[emails_footer][#{lang}]", l(:setting_emails_footer) %>
<%= text_area_tag("settings[emails_footer][#{lang}]", Setting.emails_footer[lang], :label => false, :class => 'wiki-edit', :rows => 5) %>
<%= form_tag({:action => 'edit', :tab => 'notifications'}) do %>
<div class="box tabular settings">
<p><%= setting_text_field :mail_from, :size => 60 %></p>
<p><%= setting_check_box :bcc_recipients %></p>
<p><%= setting_check_box :plain_text_mail %></p>
<p><%= setting_select(:default_notification_option, User.valid_notification_options.collect {|o| [l(o.last), o.first.to_s]}) %></p>
</div>
<% end %>
</fieldset>
<%= javascript_tag do -%>
jQuery(document).ready(function () {
<fieldset class="box" id="notified_events"><legend><%=l(:text_select_mail_notifications)%></legend>
<%= hidden_field_tag 'settings[notified_events][]', '' %>
<% @notifiables.each do |notifiable| %>
<%= notification_field notifiable %>
<br />
<% end %>
<p><%= check_all_links('notified_events') %></p>
</fieldset>
<fieldset id="emails_decorators" class="box"><legend><%= l(:setting_emails_header) %> & <%= l(:setting_emails_footer) %></legend>
<%= select_tag 'lang', options_for_select(lang_options_for_select(false), current_language.to_s), :id => 'emails_decorators_switch', :onchange => "toggleEmailDecoratorFields()" %>
<% Setting.available_languages.each do |lang| %>
<div id="emails_decorators_<%= lang %>" style="display:none" class="emails_decorators">
<%= label_tag "settings[emails_header][#{lang}]", l(:setting_emails_header) %>
<%= text_area_tag("settings[emails_header][#{lang}]", Setting.emails_header[lang], :label => false, :class => 'wiki-edit', :rows => 5) %>
<%= label_tag "settings[emails_footer][#{lang}]", l(:setting_emails_footer) %>
<%= text_area_tag("settings[emails_footer][#{lang}]", Setting.emails_footer[lang], :label => false, :class => 'wiki-edit', :rows => 5) %>
</div>
<% end %>
</fieldset>
<%= javascript_tag do -%>
jQuery(document).ready(function () {
toggleEmailDecoratorFields();
});
<% end -%>
<div style="float:right;">
<%= link_to l(:label_send_test_email), :controller => '/admin', :action => 'test_email' %>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>
<% end -%>
<div style="float:right;">
<%= link_to l(:label_send_test_email), :controller => '/admin', :action => 'test_email' %>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>
<% else %>
<div class="nodata">
<%= simple_format(l(:text_email_delivery_not_configured)) %>
</div>
<div class="nodata">
<%= simple_format(l(:text_email_delivery_not_configured)) %>
</div>
<% end %>

@ -26,21 +26,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= form_tag({:action => 'edit', :tab => 'projects'}) do %>
<div class="box tabular settings">
<p><%= setting_check_box :default_projects_public %></p>
<p><%= setting_multiselect(:default_projects_modules,
<div class="box tabular settings">
<p><%= setting_check_box :default_projects_public %></p>
<p><%= setting_multiselect(:default_projects_modules,
Redmine::AccessControl.available_project_modules.collect {|m| [l_or_humanize(m, :prefix => "project_module_"), m.to_s]}) %></p>
<p><%= setting_check_box :sequential_project_identifiers %></p>
<p><%= setting_select :new_project_user_role_id,
<p><%= setting_check_box :sequential_project_identifiers %></p>
<p><%= setting_select :new_project_user_role_id,
Role.find_all_givable.collect {|r| [r.name, r.id.to_s]},
:blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %></p>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,56 +26,44 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= form_tag({:action => 'edit', :tab => 'repositories'}) do %>
<div class="box tabular settings">
<p><%= setting_check_box :autofetch_changesets %></p>
<p><%= setting_check_box :sys_api_enabled,
<div class="box tabular settings">
<p><%= setting_check_box :autofetch_changesets %></p>
<p><%= setting_check_box :sys_api_enabled,
:onclick => "if (this.checked) { Form.Element.enable('settings_sys_api_key'); } else { Form.Element.disable('settings_sys_api_key'); }" %></p>
<p><%= setting_text_field :sys_api_key, :size => 30,
<p><%= setting_text_field :sys_api_key, :size => 30,
:id => 'settings_sys_api_key',
:disabled => !Setting.sys_api_enabled?,
:label => :setting_mail_handler_api_key %>
<%= link_to_function l(:label_generate_key), "if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
</p>
<p><%= setting_multiselect(:enabled_scm, Redmine::Scm::Base.all) %></p>
<p><%= setting_text_field :repositories_encodings, :size => 60 %>
<em><%= l(:text_comma_separated) %></em></p>
<p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p>
<p><%= setting_check_box :repository_authentication_caching_enabled %></p>
</div>
<fieldset class="box tabular settings"><legend><%= l(:text_work_packages_ref_in_commit_messages) %></legend>
<p><%= setting_text_field :commit_ref_keywords, :size => 30 %>
<em><%= l(:text_comma_separated) %></em></p>
<p><%= setting_text_field :commit_fix_keywords, :size => 30 %>
<span>
<label style="float:none; margin-left:0px; display: inline;">
<%= l(:label_applied_status) %>:
<%= link_to_function l(:label_generate_key), "if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
</p>
<p><%= setting_multiselect(:enabled_scm, Redmine::Scm::Base.all) %></p>
<p><%= setting_text_field :repositories_encodings, :size => 60 %>
<em><%= l(:text_comma_separated) %></em></p>
<p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p>
<p><%= setting_check_box :repository_authentication_caching_enabled %></p>
</div>
<fieldset class="box tabular settings"><legend><%= l(:text_work_packages_ref_in_commit_messages) %></legend>
<p><%= setting_text_field :commit_ref_keywords, :size => 30 %>
<em><%= l(:text_comma_separated) %></em></p>
<p><%= setting_text_field :commit_fix_keywords, :size => 30 %>
<span>
<label style="float:none; margin-left:0px; display: inline;">
<%= l(:label_applied_status) %>:
<%= setting_select :commit_fix_status_id, [["", 0]] + Status.all.collect{|status| [status.name, status.id.to_s]}, :label => false %>
</label>
<label style="float:none; margin-left:0px; display: inline;">
<%= WorkPackage.human_attribute_name(:done_ratio) %>:
</label>
<label style="float:none; margin-left:0px; display: inline;">
<%= WorkPackage.human_attribute_name(:done_ratio) %>:
<%= setting_select :commit_fix_done_ratio, (0..10).to_a.collect {|r| ["#{r*10} %", "#{r*10}"] }, :blank => :label_no_change_option, :label => false %>
</label>
</span>
<br /><em><%= l(:text_comma_separated) %></em></p>
<p><%= setting_check_box :commit_logtime_enabled,
</label>
</span>
<br />
<em><%= l(:text_comma_separated) %></em></p>
<p><%= setting_check_box :commit_logtime_enabled,
:onclick => "if (this.checked) { Form.Element.enable('settings_commit_logtime_activity_id'); } else { Form.Element.disable('settings_commit_logtime_activity_id'); }"%></p>
<p><%= setting_select :commit_logtime_activity_id,
<p><%= setting_select :commit_logtime_activity_id,
[[l(:label_default), 0]] + TimeEntryActivity.shared.all.collect{|activity| [activity.name, activity.id.to_s]},
:disabled => !Setting.commit_logtime_enabled?%></p>
</fieldset>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
</fieldset>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -37,7 +37,6 @@ See doc/COPYRIGHT.rdoc for more details.
<p>
<%= setting_check_box :users_deletable_by_self %>
</p>
</div>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,27 +26,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= form_tag({:action => 'edit', :tab => 'work_packages'}) do %>
<div class="box tabular settings">
<p><%= setting_check_box :cross_project_work_package_relations %></p>
<p><%= setting_check_box :work_package_group_assignment %></p>
<p><%= setting_check_box :display_subprojects_work_packages %></p>
<p><%= setting_check_box :work_package_startdate_is_adddate %></p>
<p><%= setting_select :work_package_done_ratio, WorkPackage::DONE_RATIO_OPTIONS.collect {|i| [l("setting_work_package_done_ratio_#{i}"), i]} %></p>
<p><%= setting_text_field :work_packages_export_limit, :size => 6 %></p>
</div>
<fieldset class="box settings"><legend><%= l(:setting_column_options) %></legend>
<%= settings_multiselect([:work_package_list_default_columns, :work_package_list_summable_columns],
<div class="box tabular settings">
<p><%= setting_check_box :cross_project_work_package_relations %></p>
<p><%= setting_check_box :work_package_group_assignment %></p>
<p><%= setting_check_box :display_subprojects_work_packages %></p>
<p><%= setting_check_box :work_package_startdate_is_adddate %></p>
<p><%= setting_select :work_package_done_ratio, WorkPackage::DONE_RATIO_OPTIONS.collect {|i| [l("setting_work_package_done_ratio_#{i}"), i]} %></p>
<p><%= setting_text_field :work_packages_export_limit, :size => 6 %></p>
</div>
<fieldset class="box settings"><legend><%= l(:setting_column_options) %></legend>
<%= settings_multiselect([:work_package_list_default_columns, :work_package_list_summable_columns],
Query.new.available_columns.collect {|c| [c.caption, c.name.to_s]}, :label_choices => :setting_work_package_properties) %>
</fieldset>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
</fieldset>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<% end %>

@ -26,14 +26,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= l(:label_settings) %>: <%=h @plugin.name %></h2>
<div id="settings">
<%= form_tag({:action => 'plugin'}) do %>
<div class="box tabular">
<%= render :partial => @partial, :locals => {:settings => @settings}%>
</div>
<%= submit_tag l(:button_apply), class: 'button -highlight' %>
<% end %>
<%= form_tag({:action => 'plugin'}) do %>
<div class="box tabular">
<%= render :partial => @partial, :locals => {:settings => @settings}%>
</div>
<%= submit_tag l(:button_apply), class: 'button -highlight' %>
<% end %>
</div>

@ -31,40 +31,37 @@ See doc/COPYRIGHT.rdoc for more details.
<%= link_to l(:label_work_package_status_new), new_status_path, :class => 'icon icon-add' %>
<%= link_to(l(:label_update_work_package_done_ratios), update_work_package_done_ratio_statuses_path, :class => 'icon icon-reload2', :method => 'post', :confirm => l(:text_are_you_sure)) if WorkPackage.use_status_for_done_ratio? %>
<% end %>
<% html_title l(:label_administration), l(:label_work_package_status_plural) -%>
<h2><%=l(:label_work_package_status_plural)%></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<table class="list">
<thead><tr>
<th><%= Status.model_name.human %></th>
<% if WorkPackage.use_status_for_done_ratio? %>
<th><%= WorkPackage.human_attribute_name(:done_ratio) %></th>
<% end %>
<th><%= Status.human_attribute_name(:is_default) %></th>
<th><%= Status.human_attribute_name(:is_closed) %></th>
<th><%=l(:button_sort)%></th>
<th></th>
</tr></thead>
<thead>
<tr>
<th><%= Status.model_name.human %></th>
<% if WorkPackage.use_status_for_done_ratio? %>
<th><%= WorkPackage.human_attribute_name(:done_ratio) %></th>
<% end %>
<th><%= Status.human_attribute_name(:is_default) %></th>
<th><%= Status.human_attribute_name(:is_closed) %></th>
<th><%=l(:button_sort)%></th>
<th></th>
</tr>
</thead>
<tbody>
<% for status in @statuses %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to h(status.name), edit_status_path(status) %></td>
<% if WorkPackage.use_status_for_done_ratio? %>
<td align="center"><%= h status.default_done_ratio %></td>
<% end %>
<td align="center"><%= checked_image status.is_default? %></td>
<td align="center"><%= checked_image status.is_closed? %></td>
<td align="center" style="width:15%;">
<%= reorder_links('status', {:action => 'update', :id => status}, :method => :put) %>
</td>
<td class="buttons"><%= delete_link status_path(status) %></td>
</tr>
<% end %>
<% for status in @statuses %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to h(status.name), edit_status_path(status) %></td>
<% if WorkPackage.use_status_for_done_ratio? %>
<td align="center"><%= h status.default_done_ratio %></td>
<% end %>
<td align="center"><%= checked_image status.is_default? %></td>
<td align="center"><%= checked_image status.is_closed? %></td>
<td align="center" style="width:15%;">
<%= reorder_links('status', {:action => 'update', :id => status}, :method => :put) %>
</td>
<td class="buttons"><%= delete_link status_path(status) %></td>
</tr>
<% end %>
</tbody>
</table>
<%= pagination_links_full @statuses %>

@ -30,18 +30,18 @@ See doc/COPYRIGHT.rdoc for more details.
<% @hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
<% hours_for_value = select_hours(hours, criterias[level], value) -%>
<% next if hours_for_value.empty? -%>
<tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>">
<%= ('<td></td>' * level).html_safe %>
<td><%= h(format_criteria_value(criterias[level], value)) %></td>
<%= ('<td></td>' * (criterias.length - level - 1)).html_safe -%>
<% total = 0 -%>
<% @periods.each do |period| -%>
<% sum = sum_hours(select_hours(hours_for_value, @columns, period.to_s)); total += sum -%>
<td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td>
<tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>">
<%= ('<td></td>' * level).html_safe %>
<td><%= h(format_criteria_value(criterias[level], value)) %></td>
<%= ('<td></td>' * (criterias.length - level - 1)).html_safe -%>
<% total = 0 -%>
<% @periods.each do |period| -%>
<% sum = sum_hours(select_hours(hours_for_value, @columns, period.to_s)); total += sum -%>
<td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td>
<% end -%>
<td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td>
</tr>
<% if criterias.length > level+1 -%>
<%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %>
<% end -%>
<td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td>
</tr>
<% if criterias.length > level+1 -%>
<%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %>
<% end -%>
<% end %>
<% end %>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save