##// END OF EJS Templates
[#9489] linked labels to their elements...
Toshi MARUYAMA -
r7559:f8c9efdb31af
parent child
Show More
@@ -1,79 +1,79
1 <h2><%= @copy ? l(:button_copy) : l(:button_move) %></h2>
1 <h2><%= @copy ? l(:button_copy) : l(:button_move) %></h2>
2
2
3 <ul>
3 <ul>
4 <% @issues.each do |issue| -%>
4 <% @issues.each do |issue| -%>
5 <li><%= link_to_issue issue %></li>
5 <li><%= link_to_issue issue %></li>
6 <% end -%>
6 <% end -%>
7 </ul>
7 </ul>
8
8
9 <% form_tag({:action => 'create'}, :id => 'move_form') do %>
9 <% form_tag({:action => 'create'}, :id => 'move_form') do %>
10 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
10 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
11
11
12 <div class="box tabular">
12 <div class="box tabular">
13 <fieldset class="attributes">
13 <fieldset class="attributes">
14 <legend><%= l(:label_change_properties) %></legend>
14 <legend><%= l(:label_change_properties) %></legend>
15
15
16 <div class="splitcontentleft">
16 <div class="splitcontentleft">
17 <p><label for="new_project_id"><%=l(:field_project)%>:</label>
17 <p><label for="new_project_id"><%=l(:field_project)%>:</label>
18 <%= select_tag "new_project_id",
18 <%= select_tag "new_project_id",
19 project_tree_options_for_select(@allowed_projects, :selected => @target_project),
19 project_tree_options_for_select(@allowed_projects, :selected => @target_project),
20 :onchange => remote_function(:url => { :action => 'new' },
20 :onchange => remote_function(:url => { :action => 'new' },
21 :method => :get,
21 :method => :get,
22 :update => 'content',
22 :update => 'content',
23 :with => "Form.serialize('move_form')") %></p>
23 :with => "Form.serialize('move_form')") %></p>
24
24
25 <p><label for="new_tracker_id"><%=l(:field_tracker)%>:</label>
25 <p><label for="new_tracker_id"><%=l(:field_tracker)%>:</label>
26 <%= select_tag "new_tracker_id", "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, "id", "name") %></p>
26 <%= select_tag "new_tracker_id", "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, "id", "name") %></p>
27
27
28 <p>
28 <p>
29 <label><%= l(:field_status) %></label>
29 <label for='status_id'><%= l(:field_status) %></label>
30 <%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
30 <%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
31 </p>
31 </p>
32
32
33 <p>
33 <p>
34 <label><%= l(:field_priority) %></label>
34 <label for='priority_id'><%= l(:field_priority) %></label>
35 <%= select_tag('priority_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
35 <%= select_tag('priority_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
36 </p>
36 </p>
37
37
38 <p>
38 <p>
39 <label><%= l(:field_assigned_to) %></label>
39 <label for='assigned_to_id'><%= l(:field_assigned_to) %></label>
40 <%= select_tag('assigned_to_id', content_tag('option', l(:label_no_change_option), :value => '') +
40 <%= select_tag('assigned_to_id', content_tag('option', l(:label_no_change_option), :value => '') +
41 content_tag('option', l(:label_nobody), :value => 'none') +
41 content_tag('option', l(:label_nobody), :value => 'none') +
42 principals_options_for_select(@target_project.assignable_users)) %>
42 principals_options_for_select(@target_project.assignable_users)) %>
43 </p>
43 </p>
44 </div>
44 </div>
45
45
46 <div class="splitcontentright">
46 <div class="splitcontentright">
47 <p>
47 <p>
48 <label><%= l(:field_start_date) %></label>
48 <label for='start_date'><%= l(:field_start_date) %></label>
49 <%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %>
49 <%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %>
50 </p>
50 </p>
51
51
52 <p>
52 <p>
53 <label><%= l(:field_due_date) %></label>
53 <label for='due_date'><%= l(:field_due_date) %></label>
54 <%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
54 <%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
55 </p>
55 </p>
56 </div>
56 </div>
57
57
58 </fieldset>
58 </fieldset>
59
59
60 <fieldset><legend><%= l(:field_notes) %></legend>
60 <fieldset><legend><%= l(:field_notes) %></legend>
61 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
61 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
62 <%= wikitoolbar_for 'notes' %>
62 <%= wikitoolbar_for 'notes' %>
63 </fieldset>
63 </fieldset>
64
64
65 <%= call_hook(:view_issues_move_bottom, :issues => @issues, :target_project => @target_project, :copy => !!@copy) %>
65 <%= call_hook(:view_issues_move_bottom, :issues => @issues, :target_project => @target_project, :copy => !!@copy) %>
66 </div>
66 </div>
67
67
68 <% if @copy %>
68 <% if @copy %>
69 <%= hidden_field_tag("copy_options[copy]", "1") %>
69 <%= hidden_field_tag("copy_options[copy]", "1") %>
70 <%= submit_tag l(:button_copy) %>
70 <%= submit_tag l(:button_copy) %>
71 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
71 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
72 <% else %>
72 <% else %>
73 <%= submit_tag l(:button_move) %>
73 <%= submit_tag l(:button_move) %>
74 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
74 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
75 <% end %>
75 <% end %>
76 <% end %>
76 <% end %>
77 <% content_for :header_tags do %>
77 <% content_for :header_tags do %>
78 <%= robot_exclusion_tag %>
78 <%= robot_exclusion_tag %>
79 <% end %>
79 <% end %>
@@ -1,91 +1,91
1 <h2><%= l(:label_bulk_edit_selected_issues) %></h2>
1 <h2><%= l(:label_bulk_edit_selected_issues) %></h2>
2
2
3 <ul><%= @issues.collect {|i| content_tag('li', link_to(h("#{i.tracker} ##{i.id}"), { :action => 'show', :id => i }) + h(": #{i.subject}")) }.join("\n") %></ul>
3 <ul><%= @issues.collect {|i| content_tag('li', link_to(h("#{i.tracker} ##{i.id}"), { :action => 'show', :id => i }) + h(": #{i.subject}")) }.join("\n") %></ul>
4
4
5 <% form_tag(:action => 'bulk_update') do %>
5 <% form_tag(:action => 'bulk_update') do %>
6 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
6 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
7 <div class="box tabular">
7 <div class="box tabular">
8 <fieldset class="attributes">
8 <fieldset class="attributes">
9 <legend><%= l(:label_change_properties) %></legend>
9 <legend><%= l(:label_change_properties) %></legend>
10
10
11 <div class="splitcontentleft">
11 <div class="splitcontentleft">
12 <p>
12 <p>
13 <label><%= l(:field_tracker) %></label>
13 <label for="issue_tracker_id"><%= l(:field_tracker) %></label>
14 <%= select_tag('issue[tracker_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, :id, :name)) %>
14 <%= select_tag('issue[tracker_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, :id, :name)) %>
15 </p>
15 </p>
16 <% if @available_statuses.any? %>
16 <% if @available_statuses.any? %>
17 <p>
17 <p>
18 <label><%= l(:field_status) %></label>
18 <label for='issue_status_id'><%= l(:field_status) %></label>
19 <%= select_tag('issue[status_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
19 <%= select_tag('issue[status_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
20 </p>
20 </p>
21 <% end %>
21 <% end %>
22 <p>
22 <p>
23 <label><%= l(:field_priority) %></label>
23 <label for='issue_priority_id'><%= l(:field_priority) %></label>
24 <%= select_tag('issue[priority_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
24 <%= select_tag('issue[priority_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
25 </p>
25 </p>
26 <p>
26 <p>
27 <label><%= l(:field_assigned_to) %></label>
27 <label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
28 <%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
28 <%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
29 content_tag('option', l(:label_nobody), :value => 'none') +
29 content_tag('option', l(:label_nobody), :value => 'none') +
30 principals_options_for_select(@assignables)) %>
30 principals_options_for_select(@assignables)) %>
31 </p>
31 </p>
32 <% if @project %>
32 <% if @project %>
33 <p>
33 <p>
34 <label><%= l(:field_category) %></label>
34 <label for='issue_category_id'><%= l(:field_category) %></label>
35 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
35 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
36 content_tag('option', l(:label_none), :value => 'none') +
36 content_tag('option', l(:label_none), :value => 'none') +
37 options_from_collection_for_select(@project.issue_categories, :id, :name)) %>
37 options_from_collection_for_select(@project.issue_categories, :id, :name)) %>
38 </p>
38 </p>
39 <% end %>
39 <% end %>
40 <% #TODO: allow editing versions when multiple projects %>
40 <% #TODO: allow editing versions when multiple projects %>
41 <% if @project %>
41 <% if @project %>
42 <p>
42 <p>
43 <label><%= l(:field_fixed_version) %></label>
43 <label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
44 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
44 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
45 content_tag('option', l(:label_none), :value => 'none') +
45 content_tag('option', l(:label_none), :value => 'none') +
46 version_options_for_select(@project.shared_versions.open.sort)) %>
46 version_options_for_select(@project.shared_versions.open.sort)) %>
47 </p>
47 </p>
48 <% end %>
48 <% end %>
49
49
50 <% @custom_fields.each do |custom_field| %>
50 <% @custom_fields.each do |custom_field| %>
51 <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('issue', custom_field, @projects) %></p>
51 <p><label><%= h(custom_field.name) %> <%= custom_field_tag_for_bulk_edit('issue', custom_field, @projects) %></label></p>
52 <% end %>
52 <% end %>
53
53
54 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
54 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
55 </div>
55 </div>
56
56
57 <div class="splitcontentright">
57 <div class="splitcontentright">
58 <% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
58 <% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
59 <p>
59 <p>
60 <label><%= l(:field_parent_issue) %></label>
60 <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
61 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
61 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
62 </p>
62 </p>
63 <div id="parent_issue_candidates" class="autocomplete"></div>
63 <div id="parent_issue_candidates" class="autocomplete"></div>
64 <%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:project_id => @project) }')" %>
64 <%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:project_id => @project) }')" %>
65 <% end %>
65 <% end %>
66 <p>
66 <p>
67 <label><%= l(:field_start_date) %></label>
67 <label for='issue_start_date'><%= l(:field_start_date) %></label>
68 <%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
68 <%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
69 </p>
69 </p>
70 <p>
70 <p>
71 <label><%= l(:field_due_date) %></label>
71 <label for='issue_due_date'><%= l(:field_due_date) %></label>
72 <%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
72 <%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
73 </p>
73 </p>
74 <% if Issue.use_field_for_done_ratio? %>
74 <% if Issue.use_field_for_done_ratio? %>
75 <p>
75 <p>
76 <label><%= l(:field_done_ratio) %></label>
76 <label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
77 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
77 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
78 </p>
78 </p>
79 <% end %>
79 <% end %>
80 </div>
80 </div>
81
81
82 </fieldset>
82 </fieldset>
83
83
84 <fieldset><legend><%= l(:field_notes) %></legend>
84 <fieldset><legend><%= l(:field_notes) %></legend>
85 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
85 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
86 <%= wikitoolbar_for 'notes' %>
86 <%= wikitoolbar_for 'notes' %>
87 </fieldset>
87 </fieldset>
88 </div>
88 </div>
89
89
90 <p><%= submit_tag l(:button_submit) %></p>
90 <p><%= submit_tag l(:button_submit) %></p>
91 <% end %>
91 <% end %>
@@ -1,73 +1,73
1 <div class="contextual">
1 <div class="contextual">
2 <% if !@query.new_record? && @query.editable_by?(User.current) %>
2 <% if !@query.new_record? && @query.editable_by?(User.current) %>
3 <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
3 <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
4 <%= link_to l(:button_delete), query_path(@query), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
4 <%= link_to l(:button_delete), query_path(@query), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
5 <% end %>
5 <% end %>
6 </div>
6 </div>
7
7
8 <h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2>
8 <h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2>
9 <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
9 <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
10
10
11 <% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>
11 <% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>
12 <%= hidden_field_tag 'set_filter', '1' %>
12 <%= hidden_field_tag 'set_filter', '1' %>
13 <div id="query_form_content" class="hide-when-print">
13 <div id="query_form_content" class="hide-when-print">
14 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
14 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
15 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
15 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
16 <div style="<%= @query.new_record? ? "" : "display: none;" %>">
16 <div style="<%= @query.new_record? ? "" : "display: none;" %>">
17 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
17 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
18 </div>
18 </div>
19 </fieldset>
19 </fieldset>
20 <fieldset class="collapsible collapsed">
20 <fieldset class="collapsible collapsed">
21 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
21 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
22 <div style="display: none;">
22 <div style="display: none;">
23 <table>
23 <table>
24 <tr>
24 <tr>
25 <td><%= l(:field_column_names) %></td>
25 <td><%= l(:field_column_names) %></td>
26 <td><%= render :partial => 'queries/columns', :locals => {:query => @query} %></td>
26 <td><%= render :partial => 'queries/columns', :locals => {:query => @query} %></td>
27 </tr>
27 </tr>
28 <tr>
28 <tr>
29 <td><%= l(:field_group_by) %></td>
29 <td><label for='group_by'><%= l(:field_group_by) %></label></td>
30 <td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, @query.group_by)) %></td>
30 <td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, @query.group_by)) %></td>
31 </tr>
31 </tr>
32 </table>
32 </table>
33 </div>
33 </div>
34 </fieldset>
34 </fieldset>
35 </div>
35 </div>
36 <p class="buttons hide-when-print">
36 <p class="buttons hide-when-print">
37
37
38 <%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
38 <%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
39 <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
39 <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
40 <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
40 <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
41 <%= link_to_function l(:button_save), "$('query_form').action='#{ @project ? new_project_query_path : new_query_path }'; submit_query_form('query_form')", :class => 'icon icon-save' %>
41 <%= link_to_function l(:button_save), "$('query_form').action='#{ @project ? new_project_query_path : new_query_path }'; submit_query_form('query_form')", :class => 'icon icon-save' %>
42 <% end %>
42 <% end %>
43 </p>
43 </p>
44 <% end %>
44 <% end %>
45
45
46 <%= error_messages_for 'query' %>
46 <%= error_messages_for 'query' %>
47 <% if @query.valid? %>
47 <% if @query.valid? %>
48 <% if @issues.empty? %>
48 <% if @issues.empty? %>
49 <p class="nodata"><%= l(:label_no_data) %></p>
49 <p class="nodata"><%= l(:label_no_data) %></p>
50 <% else %>
50 <% else %>
51 <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
51 <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
52 <p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p>
52 <p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p>
53 <% end %>
53 <% end %>
54
54
55 <% other_formats_links do |f| %>
55 <% other_formats_links do |f| %>
56 <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
56 <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
57 <%= f.link_to 'CSV', :url => params %>
57 <%= f.link_to 'CSV', :url => params %>
58 <%= f.link_to 'PDF', :url => params %>
58 <%= f.link_to 'PDF', :url => params %>
59 <% end %>
59 <% end %>
60
60
61 <% end %>
61 <% end %>
62 <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
62 <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
63
63
64 <% content_for :sidebar do %>
64 <% content_for :sidebar do %>
65 <%= render :partial => 'issues/sidebar' %>
65 <%= render :partial => 'issues/sidebar' %>
66 <% end %>
66 <% end %>
67
67
68 <% content_for :header_tags do %>
68 <% content_for :header_tags do %>
69 <%= auto_discovery_link_tag(:atom, {:query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_issue_plural)) %>
69 <%= auto_discovery_link_tag(:atom, {:query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_issue_plural)) %>
70 <%= auto_discovery_link_tag(:atom, {:controller => 'journals', :action => 'index', :query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_changes_details)) %>
70 <%= auto_discovery_link_tag(:atom, {:controller => 'journals', :action => 'index', :query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_changes_details)) %>
71 <% end %>
71 <% end %>
72
72
73 <%= context_menu issues_context_menu_path %>
73 <%= context_menu issues_context_menu_path %>
General Comments 0
You need to be logged in to leave comments. Login now