@@ -0,0 +1,10 | |||
|
1 | <p> | |
|
2 | <% if @repository.supports_cat? %> | |
|
3 | <%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> | | |
|
4 | <% end %> | |
|
5 | <% if @repository.supports_annotate? %> | |
|
6 | <%= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> | | |
|
7 | <% end %> | |
|
8 | <%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %> | |
|
9 | <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %> | |
|
10 | </p> |
@@ -123,7 +123,10 class IssuesController < ApplicationController | |||
|
123 | 123 | render :nothing => true, :layout => true |
|
124 | 124 | return |
|
125 | 125 | end |
|
126 | if params[:issue].is_a?(Hash) | |
|
126 | 127 | @issue.attributes = params[:issue] |
|
128 | @issue.watcher_user_ids = params[:issue]['watcher_user_ids'] if User.current.allowed_to?(:add_issue_watchers, @project) | |
|
129 | end | |
|
127 | 130 | @issue.author = User.current |
|
128 | 131 | |
|
129 | 132 | default_status = IssueStatus.default |
@@ -127,6 +127,9 class RepositoriesController < ApplicationController | |||
|
127 | 127 | end |
|
128 | 128 | |
|
129 | 129 | def annotate |
|
130 | @entry = @repository.entry(@path, @rev) | |
|
131 | show_error_not_found and return unless @entry | |
|
132 | ||
|
130 | 133 | @annotate = @repository.scm.annotate(@path, @rev) |
|
131 | 134 | render_error l(:error_scm_annotate) and return if @annotate.nil? || @annotate.empty? |
|
132 | 135 | end |
@@ -28,6 +28,7 class Mailer < ActionMailer::Base | |||
|
28 | 28 | 'Issue-Author' => issue.author.login |
|
29 | 29 | redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to |
|
30 | 30 | recipients issue.recipients |
|
31 | cc(issue.watcher_recipients - @recipients) | |
|
31 | 32 | subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}" |
|
32 | 33 | body :issue => issue, |
|
33 | 34 | :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue) |
@@ -48,6 +48,14 | |||
|
48 | 48 | <p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p> |
|
49 | 49 | <% end %> |
|
50 | 50 | |
|
51 | <% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%> | |
|
52 | <p><label><%= l(:label_issue_watchers) %></label> | |
|
53 | <% @issue.project.users.sort.each do |user| -%> | |
|
54 | <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watcher_user_ids.include?(user.id) %> <%=h user %></label> | |
|
55 | <% end -%> | |
|
56 | </p> | |
|
57 | <% end %> | |
|
58 | ||
|
51 | 59 | <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> |
|
52 | 60 | |
|
53 | 61 | <%= wikitoolbar_for 'issue_description' %> |
@@ -1,5 +1,7 | |||
|
1 | 1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> |
|
2 | 2 | |
|
3 | <p><%= render :partial => 'link_to_functions' %></p> | |
|
4 | ||
|
3 | 5 | <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %> |
|
4 | 6 | |
|
5 | 7 | <div class="autoscroll"> |
@@ -1,15 +1,6 | |||
|
1 | 1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2> |
|
2 | 2 | |
|
3 | <p> | |
|
4 | <% if @repository.supports_cat? %> | |
|
5 | <%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> | | |
|
6 | <% end %> | |
|
7 | <% if @repository.supports_annotate? %> | |
|
8 | <%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> | | |
|
9 | <% end %> | |
|
10 | <%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %> | |
|
11 | <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %> | |
|
12 | </p> | |
|
3 | <p><%= render :partial => 'link_to_functions' %></p> | |
|
13 | 4 | |
|
14 | 5 | <%= render_properties(@properties) %> |
|
15 | 6 |
@@ -1,5 +1,7 | |||
|
1 | 1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> |
|
2 | 2 | |
|
3 | <p><%= render :partial => 'link_to_functions' %></p> | |
|
4 | ||
|
3 | 5 | <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> |
|
4 | 6 | |
|
5 | 7 | <% content_for :header_tags do %> |
@@ -5,6 +5,13 Copyright (C) 2006-2008 Jean-Philippe Lang | |||
|
5 | 5 | http://www.redmine.org/ |
|
6 | 6 | |
|
7 | 7 | |
|
8 | == v0.8.1 | |
|
9 | ||
|
10 | * Select watchers on new issue form | |
|
11 | * Show view/annotate/download links on entry and annotate views | |
|
12 | * Fixed: Deleted files are shown when using Darcs | |
|
13 | ||
|
14 | ||
|
8 | 15 | == 2008-12-30 v0.8.0 |
|
9 | 16 | |
|
10 | 17 | * Setting added in order to limit the number of diff lines that should be displayed |
@@ -580,7 +580,7 label_reverse_chronological_order: Dans l'ordre chronologique inverse | |||
|
580 | 580 | label_planning: Planning |
|
581 | 581 | label_incoming_emails: Emails entrants |
|
582 | 582 | label_generate_key: Générer une clé |
|
583 |
label_issue_watchers: |
|
|
583 | label_issue_watchers: Observateurs | |
|
584 | 584 | label_example: Exemple |
|
585 | 585 | |
|
586 | 586 | button_login: Connexion |
@@ -84,7 +84,7 module Redmine | |||
|
84 | 84 | end |
|
85 | 85 | end |
|
86 | 86 | return nil if $? && $?.exitstatus != 0 |
|
87 | entries.sort_by_name | |
|
87 | entries.compact.sort_by_name | |
|
88 | 88 | end |
|
89 | 89 | |
|
90 | 90 | def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={}) |
@@ -149,14 +149,21 module Redmine | |||
|
149 | 149 | |
|
150 | 150 | private |
|
151 | 151 |
|
|
152 | # Returns an Entry from the given XML element | |
|
153 | # or nil if the entry was deleted | |
|
152 | 154 | def entry_from_xml(element, path_prefix) |
|
155 | modified_element = element.elements['modified'] | |
|
156 | if modified_element.elements['modified_how'].text.match(/removed/) | |
|
157 | return nil | |
|
158 | end | |
|
159 | ||
|
153 | 160 | Entry.new({:name => element.attributes['name'], |
|
154 | 161 | :path => path_prefix + element.attributes['name'], |
|
155 | 162 | :kind => element.name == 'file' ? 'file' : 'dir', |
|
156 | 163 | :size => nil, |
|
157 | 164 | :lastrev => Revision.new({ |
|
158 | 165 | :identifier => nil, |
|
159 |
:scmid => |
|
|
166 | :scmid => modified_element.elements['patch'].attributes['hash'] | |
|
160 | 167 | }) |
|
161 | 168 | }) |
|
162 | 169 | end |
@@ -332,6 +332,30 class IssuesControllerTest < Test::Unit::TestCase | |||
|
332 | 332 | assert_equal 'activerecord_error_invalid', issue.errors.on(:custom_values) |
|
333 | 333 | end |
|
334 | 334 | |
|
335 | def test_post_new_with_watchers | |
|
336 | @request.session[:user_id] = 2 | |
|
337 | ActionMailer::Base.deliveries.clear | |
|
338 | ||
|
339 | assert_difference 'Watcher.count', 2 do | |
|
340 | post :new, :project_id => 1, | |
|
341 | :issue => {:tracker_id => 1, | |
|
342 | :subject => 'This is a new issue with watchers', | |
|
343 | :description => 'This is the description', | |
|
344 | :priority_id => 5, | |
|
345 | :watcher_user_ids => ['2', '3']} | |
|
346 | end | |
|
347 | assert_redirected_to 'issues/show' | |
|
348 | ||
|
349 | issue = Issue.find_by_subject('This is a new issue with watchers') | |
|
350 | # Watchers added | |
|
351 | assert_equal [2, 3], issue.watcher_user_ids.sort | |
|
352 | assert issue.watched_by?(User.find(3)) | |
|
353 | # Watchers notified | |
|
354 | mail = ActionMailer::Base.deliveries.last | |
|
355 | assert_kind_of TMail::Mail, mail | |
|
356 | assert [mail.bcc, mail.cc].flatten.include?(User.find(3).mail) | |
|
357 | end | |
|
358 | ||
|
335 | 359 | def test_post_should_preserve_fields_values_on_validation_failure |
|
336 | 360 | @request.session[:user_id] = 2 |
|
337 | 361 | post :new, :project_id => 1, |
@@ -49,6 +49,12 class RepositoryDarcsTest < Test::Unit::TestCase | |||
|
49 | 49 | assert_equal 6, @repository.changesets.count |
|
50 | 50 | end |
|
51 | 51 | |
|
52 | def test_deleted_files_should_not_be_listed | |
|
53 | entries = @repository.entries('sources') | |
|
54 | assert entries.detect {|e| e.name == 'watchers_controller.rb'} | |
|
55 | assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'} | |
|
56 | end | |
|
57 | ||
|
52 | 58 | def test_cat |
|
53 | 59 | @repository.fetch_changesets |
|
54 | 60 | cat = @repository.cat("sources/welcome_controller.rb", 2) |
General Comments 0
You need to be logged in to leave comments.
Login now