Project

General

Profile

Feature #1739 » redmine_changeable_author_v1.0.4.patch

Jiri Stepanek, 2010-12-08 10:51

View differences:

app/helpers/issues_helper.rb
121 121
        value = format_date(detail.value.to_date) if detail.value
122 122
        old_value = format_date(detail.old_value.to_date) if detail.old_value
123 123

  
124
      when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'fixed_version_id'].include?(detail.prop_key)
124
      when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'fixed_version_id', 'author_id'].include?(detail.prop_key)
125 125
        value = find_name_by_reflection(field, detail.value)
126 126
        old_value = find_name_by_reflection(field, detail.old_value)
127 127

  
app/models/issue.rb
202 202
    status_id
203 203
    parent_issue_id
204 204
    category_id
205
    author_id
205 206
    assigned_to_id
206 207
    priority_id
207 208
    fixed_version_id
app/views/issues/_attributes.rhtml
2 2

  
3 3
<div class="splitcontentleft">
4 4
<% if @issue.new_record? || @allowed_statuses.any? %>
5
<% if User.current.allowed_to?(:edit_issue_author, @project) %>
6
<p><%= f.select :author_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => false, :required => true %></p>
7
<% end %>
5 8
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
6 9
<% else %>
7 10
<p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p>
app/views/issues/show.rhtml
9 9
<%= render_issue_subject_with_tree(@issue) %>
10 10
</div>
11 11
        <p class="author">
12
        <%= authoring @issue.created_on, @issue.author %>.
12
        <%= l(:label_added_time, time_tag(@issue.created_on)) %>.
13 13
        <% if @issue.created_on != @issue.updated_on %>
14 14
        <%= l(:label_updated_time, time_tag(@issue.updated_on)) %>.
15 15
        <% end %>
......
17 17

  
18 18
<table class="attributes">
19 19
<tr>
20
    <th class="author"><%=l(:field_author)%>:</th><td class="author"><%= avatar(@issue.author, :size => "14") %><%= @issue.author ? link_to_user(@issue.author) : "-" %></td>
21
</tr>
22
<tr>
20 23
    <th class="status"><%=l(:field_status)%>:</th><td class="status"><%= @issue.status.name %></td>
21 24
    <th class="start-date"><%=l(:field_start_date)%>:</th><td class="start-date"><%= format_date(@issue.start_date) %></td>
22 25
</tr>
config/locales/cs.yml
574 574
  label_feeds_access_key_created_on: "Přístupový klíč pro RSS byl vytvořen před {{value}}"
575 575
  label_module_plural: Moduly
576 576
  label_added_time_by: "Přidáno uživatelem {{author}} před {{age}}"
577
  label_added_time: "Přidáno před {{age}}"
577 578
  label_updated_time: "Aktualizováno před {{value}}"
578 579
  label_jump_to_a_project: Vyberte projekt...
579 580
  label_file_plural: Soubory
......
781 782
  permission_rename_wiki_pages: Přejmenovávání Wiki stránek
782 783
  permission_edit_time_entries: Upravování záznamů o stráveném času
783 784
  permission_edit_own_issue_notes: Upravování vlastních poznámek
785
  permission_edit_issue_author: Úprava autora
784 786
  setting_gravatar_enabled: Použít uživatelské ikony Gravatar
785 787
  label_example: Příklad
786 788
  text_repository_usernames_mapping: "Vybrat nebo upravit mapování mezi Redmine uživateli a uživatelskými jmény nalezenými v logu repozitáře.\nUživatelé se shodným Redmine uživatelským jménem a uživatelským jménem v repozitáři jsou mapovaní automaticky."
config/locales/en.yml
366 366
  permission_add_issue_notes: Add notes
367 367
  permission_edit_issue_notes: Edit notes
368 368
  permission_edit_own_issue_notes: Edit own notes
369
  permission_edit_issue_author: Edit author
369 370
  permission_move_issues: Move issues
370 371
  permission_delete_issues: Delete issues
371 372
  permission_manage_public_queries: Manage public queries
......
712 713
  label_feeds_access_key_created_on: "RSS access key created {{value}} ago"
713 714
  label_module_plural: Modules
714 715
  label_added_time_by: "Added by {{author}} {{age}} ago"
716
  label_added_time: "Added {{value}} ago"
715 717
  label_updated_time_by: "Updated by {{author}} {{age}} ago"
716 718
  label_updated_time: "Updated {{value}} ago"
717 719
  label_jump_to_a_project: Jump to a project...
config/locales/sk.yml
568 568
  label_feeds_access_key_created_on: "Prístupový klúč pre RSS bol vytvorený pred {{value}}"
569 569
  label_module_plural: Moduly
570 570
  label_added_time_by: "Pridané užívateľom {{author}} pred {{age}}"
571
  label_added_time: "Pridané pred {{value}}"
571 572
  label_updated_time: "Aktualizované pred {{value}}"
572 573
  label_jump_to_a_project: Zvoliť projekt...
573 574
  label_file_plural: Súbory
......
775 776
  permission_rename_wiki_pages: Premenovanie Wiki strániek
776 777
  permission_edit_time_entries: Úprava záznamov o strávenom čase
777 778
  permission_edit_own_issue_notes: Úprava vlastných poznámok úlohy
779
  permission_edit_issue_author: Úprava autora
778 780
  setting_gravatar_enabled: Použitie užívateľských Gravatar ikon
779 781
  permission_edit_own_messages: Úprava vlastných správ
780 782
  permission_delete_own_messages: Mazanie vlastných správ
lib/redmine.rb
71 71
    map.permission :add_issue_notes, {:issues => [:edit, :update], :journals => [:new]}
72 72
    map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
73 73
    map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
74
    map.permission :edit_issue_author, {}
74 75
    map.permission :move_issues, {:issue_moves => [:new, :create]}, :require => :loggedin
75 76
    map.permission :delete_issues, {:issues => :destroy}, :require => :member
76 77
    # Queries
(2-2/12)