Feature #23954 » last_activity-1.patch
| app/helpers/admin_helper.rb | ||
|---|---|---|
|
[l(:project_status_archived), '9']], selected.to_s)
|
||
|
end
|
||
|
# Returns date of last activity on project or creation date
|
||
|
def last_activity(project)
|
||
|
event = Redmine::Activity::Fetcher.new(User.current, :project => project).events(nil, nil, :limit => 1)[0]
|
||
|
event.nil? ? project.created_on : event[:updated_on].nil? ? event[:created_on] : event[:updated_on]
|
||
|
end
|
||
|
def plugin_data_for_updates(plugins)
|
||
|
data = {"v" => Redmine::VERSION.to_s, "p" => {}}
|
||
|
plugins.each do |plugin|
|
||
| app/views/admin/projects.html.erb | ||
|---|---|---|
|
<th><%=l(:label_project)%></th>
|
||
|
<th><%=l(:field_is_public)%></th>
|
||
|
<th><%=l(:field_created_on)%></th>
|
||
|
<th><%=l(:field_last_activity)%></th>
|
||
|
<th></th>
|
||
|
</tr></thead>
|
||
|
<tbody>
|
||
| ... | ... | |
|
<td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td>
|
||
|
<td><%= checked_image project.is_public? %></td>
|
||
|
<td><%= format_date(project.created_on) %></td>
|
||
|
<td><%= format_date(last_activity(project)) %></td>
|
||
|
<td class="buttons">
|
||
|
<%= link_to(l(:button_archive), archive_project_path(project, :status => params[:status]), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %>
|
||
|
<%= link_to(l(:button_unarchive), unarchive_project_path(project, :status => params[:status]), :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
|
||
| config/locales/en.yml | ||
|---|---|---|
|
field_downloads: Downloads
|
||
|
field_author: Author
|
||
|
field_created_on: Created
|
||
|
field_last_activity: Last activity
|
||
|
field_updated_on: Updated
|
||
|
field_closed_on: Closed
|
||
|
field_field_format: Format
|
||
| config/locales/pt-BR.yml | ||
|---|---|---|
|
field_downloads: Downloads
|
||
|
field_author: Autor
|
||
|
field_created_on: Criado em
|
||
|
field_last_activity: Última atividade
|
||
|
field_updated_on: Alterado em
|
||
|
field_field_format: Formato
|
||
|
field_is_for_all: Para todos os projetos
|
||