def roadmap
@trackers = Tracker.find(:all, :conditions => ["is_in_roadmap=?", true], :order => 'position')
- retrieve_selected_tracker_ids(@trackers)
+ retrieve_selected_tracker_ids(@trackers)
+ conditions = ("1" == params[:completed] ? nil : [ "#{Version.table_name}.effective_date > ?", Date.today])
@versions = @project.versions.find(:all,
- :conditions => [ "#{Version.table_name}.effective_date>?", Date.today],
+ :conditions => conditions,
:order => "#{Version.table_name}.effective_date ASC"
)
end
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module ProjectsHelper
+ def link_to_version(version, options = {})
+ return '' unless version && version.is_a?(Version)
+ link_to version.name, {:controller => 'projects',
+ :action => 'roadmap',
+ :id => version.project_id,
+ :completed => (version.completed? ? 1 : nil),
+ :anchor => version.name
+ }, options
+ end
end
effective_date
end
+ def completed?
+ effective_date && effective_date <= Date.today
+ end
+
private
def check_integrity
raise "Can't delete version" if self.fixed_issues.find(:first)
</span>
</div>
<% else %>
- <%= image_tag('milestone.png') %> <small><%= "#{l(:label_version)}: #{i.name}" %></small>
+ <small><%= link_to_version i, :class => "icon icon-package" %></small>
<% end %>
<% end %>
</td>
<h2><%=l(:label_change_log)%></h2>
-<div>
-
<div class="rightbox" style="width:140px;">
<% form_tag do %>
-<p><strong><%=l(:label_tracker_plural)%></strong></p>
+<p><strong><%=l(:label_tracker_plural)%></strong><br />
<% @trackers.each do |tracker| %>
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
<%= tracker.name %><br />
-<% end %>
+<% end %></p>
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
<% end %>
</div>
end %>
<li><%= link_to_issue issue %>: <%=h issue.subject %></li>
<% end %>
-</div>
\ No newline at end of file
<%= link_to_issue i %><%= " (#{i.project.name})" unless @project && @project == i.project %>:
<%=h i.subject %>
<% else %>
- <strong><%= "#{l(:label_version)}: #{i.name}" %></strong>
+ <%= link_to_version i, :class => "icon icon-package" %>
<% end %>
</small></div>
<% top = top + 20
<h2><%=l(:label_roadmap)%></h2>
-<div>
-
-<div class="rightbox" style="width:140px;">
+<div class="rightbox">
<% form_tag do %>
-<p><strong><%=l(:label_tracker_plural)%></strong></p>
+<p><strong><%=l(:label_tracker_plural)%></strong><br />
<% @trackers.each do |tracker| %>
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
<%= tracker.name %><br />
-<% end %>
+<% end %></p>
+<p class="small"><label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label></p>
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
<% end %>
</div>
<% if @versions.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
<% @versions.each do |version| %>
- <h3 class="icon22 icon22-package"><%= version.name %></h3>
+ <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a>
+ <% if version.completed? %>
+ <p><%= format_date(version.effective_date) %></p>
+ <% else %>
+ <p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p>
+ <% end %>
<p><%=h version.description %></p>
- <p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p>
<% issues = version.fixed_issues.find(:all,
- :include => :status,
+ :include => [:status, :tracker],
:conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
- :order => "position")
+ :order => "#{Tracker.table_name}.position")
total = issues.size
complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c }
<% end %>
</ul>
<% end %>
-</div>
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Вход
button_submit: Изпращане
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Einloggen
button_submit: OK
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Login
button_submit: Submit
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Conexión
button_submit: Someter
label_start_to_end: début à fin
label_stay_logged_in: Rester connecté
label_disabled: désactivé
+label_show_completed_versions: Voire les versions passées
button_login: Connexion
button_submit: Soumettre
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Login
button_submit: Invia
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: ログイン
button_submit: 変更
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Login
button_submit: Enviar
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: 登录
button_submit: 提交