@@ -0,0 +1,24 | |||
|
1 | <h2><%=l(:button_move)%></h2> | |
|
2 | ||
|
3 | ||
|
4 | <%= start_form_tag({:action => 'move_issues', :id => @project}, :class => "tabular") %> | |
|
5 | ||
|
6 | <div class="box"> | |
|
7 | <p><label><%= l(:label_issue_plural) %>:</label> | |
|
8 | <% for issue in @issues %> | |
|
9 | <b><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></b> - <%= issue.subject %> | |
|
10 | <%= hidden_field_tag "issue_ids[]", issue.id %><br /> | |
|
11 | <% end %> | |
|
12 | <i>(<%= @issues.length%> <%= lwr(:label_issue, @issues.length)%>)</i></p> | |
|
13 | ||
|
14 | | |
|
15 | ||
|
16 | <!--[form:issue]--> | |
|
17 | <p><label for="new_project_id"><%=l(:field_project)%></label> | |
|
18 | <%= select_tag "new_project_id", options_from_collection_for_select(@projects, "id", "name", @project.id) %></p> | |
|
19 | ||
|
20 | <p><label for="new_tracker_id"><%=l(:field_tracker)%></label> | |
|
21 | <%= select_tag "new_tracker_id", options_from_collection_for_select(@trackers, "id", "name") %></p> | |
|
22 | </div> | |
|
23 | <%= submit_tag l(:button_move) %> | |
|
24 | <%= end_form_tag %> |
@@ -0,0 +1,9 | |||
|
1 | class IssueMove < ActiveRecord::Migration | |
|
2 | def self.up | |
|
3 | Permission.create :controller => "projects", :action => "move_issues", :description => "button_move", :sort => 1061, :mail_option => 1, :mail_enabled => 0 | |
|
4 | end | |
|
5 | ||
|
6 | def self.down | |
|
7 | Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'move_issues']).destroy | |
|
8 | end | |
|
9 | end |
@@ -239,6 +239,30 class ProjectsController < ApplicationController | |||
|
239 | 239 | :filename => 'export.csv') |
|
240 | 240 | end |
|
241 | 241 | |
|
242 | def move_issues | |
|
243 | @issues = @project.issues.find(params[:issue_ids]) if params[:issue_ids] | |
|
244 | redirect_to :action => 'list_issues', :id => @project and return unless @issues | |
|
245 | @projects = [] | |
|
246 | # find projects to which the user is allowed to move the issue | |
|
247 | @logged_in_user.memberships.each {|m| @projects << m.project if Permission.allowed_to_role("projects/move_issues", m.role_id)} | |
|
248 | # issue can be moved to any tracker | |
|
249 | @trackers = Tracker.find(:all) | |
|
250 | if request.post? and params[:new_project_id] and params[:new_tracker_id] | |
|
251 | new_project = Project.find(params[:new_project_id]) | |
|
252 | new_tracker = Tracker.find(params[:new_tracker_id]) | |
|
253 | @issues.each { |i| | |
|
254 | # category is project dependent | |
|
255 | i.category = nil unless i.project_id == new_project.id | |
|
256 | # move the issue | |
|
257 | i.project = new_project | |
|
258 | i.tracker = new_tracker | |
|
259 | i.save | |
|
260 | } | |
|
261 | flash[:notice] = l(:notice_successful_update) | |
|
262 | redirect_to :action => 'list_issues', :id => @project | |
|
263 | end | |
|
264 | end | |
|
265 | ||
|
242 | 266 | # Add a news to @project |
|
243 | 267 | def add_news |
|
244 | 268 | @news = News.new(:project => @project) |
@@ -41,7 +41,7 class Issue < ActiveRecord::Base | |||
|
41 | 41 | end |
|
42 | 42 | |
|
43 | 43 | def validate |
|
44 | if self.due_date.nil? && !@attributes['due_date'].empty? | |
|
44 | if self.due_date.nil? && @attributes['due_date'] && !@attributes['due_date'].empty? | |
|
45 | 45 | errors.add :due_date, :activerecord_error_not_a_date |
|
46 | 46 | end |
|
47 | 47 | end |
@@ -35,6 +35,14 | |||
|
35 | 35 | |
|
36 | 36 | <% end %> |
|
37 | 37 | |
|
38 | <% if authorize_for('projects', 'move_issues') %> | |
|
39 | <%= start_form_tag ({:controller => 'projects', :action => 'move_issues', :id => @project} ) %> | |
|
40 | <%= hidden_field_tag "issue_ids[]", @issue.id %> | |
|
41 | <%= submit_tag l(:button_move) %> | |
|
42 | <%= end_form_tag %> | |
|
43 | | |
|
44 | <% end %> | |
|
45 | ||
|
38 | 46 | <% if authorize_for('issues', 'destroy') %> |
|
39 | 47 | <%= start_form_tag ({:controller => 'issues', :action => 'destroy', :id => @issue} ) %> |
|
40 | 48 | <%= submit_tag l(:button_delete) %> |
@@ -8,7 +8,7 | |||
|
8 | 8 | |
|
9 | 9 | <p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p> |
|
10 | 10 | <p><%= f.select :assigned_to_id, (@issue.project.members.collect {|m| [m.name, m.user_id]}), :include_blank => true %></p> |
|
11 | <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}) %></p> | |
|
11 | <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %></p> | |
|
12 | 12 | <p><%= f.text_field :subject, :size => 80, :required => true %></p> |
|
13 | 13 | <p><%= f.text_area :description, :cols => 60, :rows => 10, :required => true %></p> |
|
14 | 14 | <p><%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %></p> |
@@ -22,11 +22,15 | |||
|
22 | 22 | </tr> |
|
23 | 23 | </table> |
|
24 | 24 | |
|
25 | ||
|
26 | <%= start_form_tag ({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) %> | |
|
25 | 27 | <table class="listTableContent"> |
|
26 | <tr><td colspan="7" align="right"> | |
|
27 | <small><%= link_to l(:label_export_csv), :action => 'export_issues_csv', :id => @project.id %></small> | |
|
28 | </td></tr> | |
|
29 | <tr class="ListHead"> | |
|
28 | <tr> | |
|
29 | <td colspan="6" align="left"><small><%= check_all_links 'issues_form' %></small></td> | |
|
30 | <td colspan="2" align="right"><small><%= link_to l(:label_export_csv), :action => 'export_issues_csv', :id => @project.id %></small></td> | |
|
31 | </tr> | |
|
32 | <tr class="ListHead"> | |
|
33 | <td></td> | |
|
30 | 34 | <%= sort_header_tag('issues.id', :caption => '#') %> |
|
31 | 35 | <%= sort_header_tag('issue_statuses.name', :caption => l(:field_status)) %> |
|
32 | 36 | <%= sort_header_tag('issues.tracker_id', :caption => l(:field_tracker)) %> |
@@ -37,6 +41,7 | |||
|
37 | 41 | </tr> |
|
38 | 42 | <% for issue in @issues %> |
|
39 | 43 | <tr bgcolor="#<%= issue.status.html_color %>"> |
|
44 | <td width="15"><%= check_box_tag "issue_ids[]", issue.id %></td> | |
|
40 | 45 | <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td> |
|
41 | 46 | <td align="center"><%= issue.status.name %></td> |
|
42 | 47 | <td align="center"><%= issue.tracker.name %></td> |
@@ -50,4 +55,6 | |||
|
50 | 55 | <p> |
|
51 | 56 | <%= pagination_links_full @issue_pages %> |
|
52 | 57 | [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ] |
|
53 | </p> No newline at end of file | |
|
58 | </p> | |
|
59 | <%= submit_tag l(:button_move) %> | |
|
60 | <%= end_form_tag %> No newline at end of file |
@@ -259,6 +259,7 button_unlock: Entriegeln | |||
|
259 | 259 | button_download: Fernzuladen |
|
260 | 260 | button_list: Aufzulisten |
|
261 | 261 | button_view: Siehe |
|
262 | button_move: Bewegen | |
|
262 | 263 | |
|
263 | 264 | text_select_mail_notifications: Aktionen für die Mailbenachrichtigung aktiviert werden soll. |
|
264 | 265 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -35,8 +35,8 activerecord_error_not_a_date: is not a valid date | |||
|
35 | 35 | |
|
36 | 36 | general_fmt_age: %d yr |
|
37 | 37 | general_fmt_age_plural: %d yrs |
|
38 |
general_fmt_date: %% |
|
|
39 |
general_fmt_datetime: %% |
|
|
38 | general_fmt_date: %%m/%%d/%%Y | |
|
39 | general_fmt_datetime: %%m/%%d/%%Y %%I:%%M %%p | |
|
40 | 40 | general_fmt_datetime_short: %%b %%d, %%I:%%M %%p |
|
41 | 41 | general_fmt_time: %%I:%%M %%p |
|
42 | 42 | general_text_No: 'No' |
@@ -84,7 +84,7 field_regexp: Regular expression | |||
|
84 | 84 | field_min_length: Minimum length |
|
85 | 85 | field_max_length: Maximum length |
|
86 | 86 | field_value: Value |
|
87 |
field_category: Cat |
|
|
87 | field_category: Category | |
|
88 | 88 | field_title: Title |
|
89 | 89 | field_project: Project |
|
90 | 90 | field_issue: Issue |
@@ -259,6 +259,7 button_unlock: Unlock | |||
|
259 | 259 | button_download: Download |
|
260 | 260 | button_list: List |
|
261 | 261 | button_view: View |
|
262 | button_move: Move | |
|
262 | 263 | |
|
263 | 264 | text_select_mail_notifications: Select actions for which mail notifications should be sent. |
|
264 | 265 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -259,6 +259,7 button_unlock: Desbloquear | |||
|
259 | 259 | button_download: Telecargar |
|
260 | 260 | button_list: Listar |
|
261 | 261 | button_view: Ver |
|
262 | button_move: Mover | |
|
262 | 263 | |
|
263 | 264 | text_select_mail_notifications: Seleccionar las actividades que necesitan la activación de la notificación por mail. |
|
264 | 265 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -259,6 +259,7 button_unlock: Déverrouiller | |||
|
259 | 259 | button_download: Télécharger |
|
260 | 260 | button_list: Lister |
|
261 | 261 | button_view: Voir |
|
262 | button_move: Déplacer | |
|
262 | 263 | |
|
263 | 264 | text_select_mail_notifications: Sélectionner les actions pour lesquelles la notification par mail doit être activée. |
|
264 | 265 | text_regexp_info: ex. ^[A-Z0-9]+$ |
General Comments 0
You need to be logged in to leave comments.
Login now