Patch #24313 » 03_use_regular_icons_in_activity_tab.patch
| app/views/activities/index.html.erb | ||
|---|---|---|
|
<h3><%= format_activity_day(day) %></h3>
|
||
|
<dl>
|
||
|
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
||
|
<dt class="<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
|
||
|
<dt class="icon icon-<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
|
||
|
<%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
|
||
|
<span class="time"><%= format_time(e.event_datetime, false) %></span>
|
||
|
<%= content_tag('span', e.project, :class => 'project') if @project.nil? || @project != e.project %>
|
||
| public/stylesheets/application.css | ||
|---|---|---|
|
div#activity dl, #search-results { margin-left: 2em; }
|
||
|
div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
|
||
|
div#activity dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
|
||
|
#search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
|
||
|
div#activity dt.me .time { border-bottom: 1px solid #999; }
|
||
|
div#activity dt .time { color: #777; font-size: 80%; }
|
||
|
div#activity dd .description, #search-results dd .description { font-style: italic; }
|
||
| ... | ... | |
|
div#search-results-counts ul { margin-top: 0.5em; }
|
||
|
div#search-results-counts li { list-style-type:none; float: left; margin-left: 1em; }
|
||
|
dt.issue { background-image: url(../images/ticket.png); }
|
||
|
dt.issue-edit { background-image: url(../images/ticket_edit.png); }
|
||
|
dt.issue-closed { background-image: url(../images/ticket_checked.png); }
|
||
|
dt.issue-note { background-image: url(../images/ticket_note.png); }
|
||
|
dt.changeset { background-image: url(../images/changeset.png); }
|
||
|
dt.news { background-image: url(../images/news.png); }
|
||
|
dt.message { background-image: url(../images/message.png); }
|
||
|
dt.reply { background-image: url(../images/comments.png); }
|
||
|
dt.wiki-page { background-image: url(../images/wiki_edit.png); }
|
||
|
dt.attachment { background-image: url(../images/attachment.png); }
|
||
|
dt.document { background-image: url(../images/document.png); }
|
||
|
dt.project { background-image: url(../images/projects.png); }
|
||
|
dt.time-entry { background-image: url(../images/time.png); }
|
||
|
#search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); }
|
||
|
div#roadmap .related-issues { margin-bottom: 1em; }
|
||
| ... | ... | |
|
.open .icon-folder { background-image: url(../images/folder_open.png); }
|
||
|
.icon-package { background-image: url(../images/package.png); }
|
||
|
.icon-user { background-image: url(../images/user.png); }
|
||
|
.icon-projects { background-image: url(../images/projects.png); }
|
||
|
.icon-project, .icon-projects { background-image: url(../images/projects.png); }
|
||
|
.icon-help { background-image: url(../images/help.png); }
|
||
|
.icon-attachment { background-image: url(../images/attachment.png); }
|
||
|
.icon-history { background-image: url(../images/history.png); }
|
||
|
.icon-time { background-image: url(../images/time.png); }
|
||
|
.icon-time-entry, .icon-time { background-image: url(../images/time.png); }
|
||
|
.icon-time-add { background-image: url(../images/time_add.png); }
|
||
|
.icon-stats { background-image: url(../images/stats.png); }
|
||
|
.icon-warning { background-image: url(../images/warning.png); }
|
||
| ... | ... | |
|
.icon-custom-fields { background-image: url(../images/textfield.png); }
|
||
|
.icon-plugins { background-image: url(../images/plugin.png); }
|
||
|
.icon-news { background: url(../images/news.png); }
|
||
|
.icon-issue-closed { background-image: url(../images/ticket_checked.png); }
|
||
|
.icon-issue-note { background-image: url(../images/ticket_note.png); }
|
||
|
.icon-changeset { background-image: url(../images/changeset.png); }
|
||
|
.icon-message { background-image: url(../images/message.png); }
|
||
|
.icon-reply { background-image: url(../images/comments.png); }
|
||
|
.icon-wiki-page { background-image: url(../images/wiki_edit.png); }
|
||
|
.icon-document { background-image: url(../images/document.png); }
|
||
|
.icon-project { background-image: url(../images/projects.png); }
|
||
|
.icon-file { background-image: url(../images/files/default.png); }
|
||
|
.icon-file.text-plain { background-image: url(../images/files/text.png); }
|
||
| test/functional/activities_controller_test.rb | ||
|---|---|---|
|
assert_response :success
|
||
|
assert_select 'h3', :text => /#{2.days.ago.to_date.day}/
|
||
|
assert_select 'dl dt.issue-edit a', :text => /(#{IssueStatus.find(2).name})/
|
||
|
assert_select 'dl dt.icon-issue-edit a', :text => /(#{IssueStatus.find(2).name})/
|
||
|
end
|
||
|
def test_project_index_with_invalid_project_id_should_respond_404
|
||
| ... | ... | |
|
assert_response :success
|
||
|
assert_select 'h3', :text => /#{3.days.ago.to_date.day}/
|
||
|
assert_select 'dl dt.issue a', :text => /Cannot print recipes/
|
||
|
assert_select 'dl dt.icon-issue a', :text => /Cannot print recipes/
|
||
|
end
|
||
|
def test_global_index
|
||
| ... | ... | |
|
d5 = User.find(1).time_to_date(i5.created_on)
|
||
|
assert_select 'h3', :text => /#{d5.day}/
|
||
|
assert_select 'dl dt.issue a', :text => /Subproject issue/
|
||
|
assert_select 'dl dt.icon-issue a', :text => /Subproject issue/
|
||
|
end
|
||
|
def test_user_index
|
||
| ... | ... | |
|
d1 = User.find(1).time_to_date(i1.created_on)
|
||
|
assert_select 'h3', :text => /#{d1.day}/
|
||
|
assert_select 'dl dt.issue a', :text => /Cannot print recipes/
|
||
|
assert_select 'dl dt.icon-issue a', :text => /Cannot print recipes/
|
||
|
end
|
||
|
def test_user_index_with_invalid_user_id_should_respond_404
|
||
| ... | ... | |
|
with_settings :default_language => 'en' do
|
||
|
get :index, :format => 'atom', :show_issues => '1'
|
||
|
assert_response :success
|
||
|
|
||
|
assert_select 'title', :text => /Issues/
|
||
|
end
|
||
|
end
|
||