Commit a7dfb5fb385f159d0276b236c6cba4dd25aa57e0
1 parent
8a3ed72f
Exists in
master
and in
28 other branches
Show status description at steps of a track
Showing
5 changed files
with
16 additions
and
2 deletions
Show diff stats
plugins/community_track/lib/community_track_plugin/step_helper.rb
1 | module CommunityTrackPlugin::StepHelper | 1 | module CommunityTrackPlugin::StepHelper |
2 | 2 | ||
3 | def self.status_descriptions | 3 | def self.status_descriptions |
4 | - [_('Finished'), _('In progress'), _('Waiting')] | 4 | + [_('Closed'), _('Join!'), _('Soon')] |
5 | end | 5 | end |
6 | 6 | ||
7 | def self.status_classes | 7 | def self.status_classes |
plugins/community_track/public/style.css
@@ -140,6 +140,7 @@ | @@ -140,6 +140,7 @@ | ||
140 | #track .step .name { | 140 | #track .step .name { |
141 | font-weight: bold; | 141 | font-weight: bold; |
142 | color: #333; | 142 | color: #333; |
143 | + clear: both; | ||
143 | } | 144 | } |
144 | 145 | ||
145 | #track .step .name a:hover { | 146 | #track .step .name a:hover { |
@@ -149,6 +150,7 @@ | @@ -149,6 +150,7 @@ | ||
149 | #track .step .date { | 150 | #track .step .date { |
150 | font-size: 12px; | 151 | font-size: 12px; |
151 | color: #AAA; | 152 | color: #AAA; |
153 | + float: left; | ||
152 | } | 154 | } |
153 | 155 | ||
154 | #track .step .lead { | 156 | #track .step .lead { |
@@ -255,3 +257,11 @@ | @@ -255,3 +257,11 @@ | ||
255 | #article .step_list .step .step_actions .button:hover { | 257 | #article .step_list .step .step_actions .button:hover { |
256 | color: #444; | 258 | color: #444; |
257 | } | 259 | } |
260 | + | ||
261 | +.step .content { | ||
262 | + width: 80%; | ||
263 | +} | ||
264 | + | ||
265 | +.step .legend { | ||
266 | + float: right; | ||
267 | +} |
plugins/community_track/test/unit/community_track_plugin/step_helper_test.rb
@@ -28,7 +28,7 @@ class StepHelperTest < ActiveSupport::TestCase | @@ -28,7 +28,7 @@ class StepHelperTest < ActiveSupport::TestCase | ||
28 | 28 | ||
29 | should 'return a description for status' do | 29 | should 'return a description for status' do |
30 | @step.stubs(:waiting?).returns(true) | 30 | @step.stubs(:waiting?).returns(true) |
31 | - assert_equal _('Waiting'), status_description(@step) | 31 | + assert_equal _('Soon'), status_description(@step) |
32 | end | 32 | end |
33 | 33 | ||
34 | should 'return nil at custom_options_for_article' do | 34 | should 'return nil at custom_options_for_article' do |
plugins/community_track/views/blocks/_track.rhtml
@@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
14 | <% link_to_step_tool(step) do %> | 14 | <% link_to_step_tool(step) do %> |
15 | <span class="step <%= block.status_class(step) %>"> | 15 | <span class="step <%= block.status_class(step) %>"> |
16 | <span class="position"><%= step.position %></span> | 16 | <span class="position"><%= step.position %></span> |
17 | + <span class="legend"><%= status_description(step) %></span> | ||
17 | <span class="tool_icon button with-text icon-new icon-new<%= step.tool_class.icon_name if step.tool_class %>"></span> | 18 | <span class="tool_icon button with-text icon-new icon-new<%= step.tool_class.icon_name if step.tool_class %>"></span> |
18 | <span class="name"><%= step.name %></span> | 19 | <span class="name"><%= step.name %></span> |
19 | </span> | 20 | </span> |
plugins/community_track/views/content_viewer/_step_item.rhtml
@@ -6,6 +6,9 @@ | @@ -6,6 +6,9 @@ | ||
6 | <div class="date"> | 6 | <div class="date"> |
7 | <%= show_period(step_item.start_date, step_item.end_date) %> | 7 | <%= show_period(step_item.start_date, step_item.end_date) %> |
8 | </div> | 8 | </div> |
9 | + <div class="legend"> | ||
10 | + <%= status_description(step_item) %> | ||
11 | + </div> | ||
9 | <div class="name"><span class="tool_icon button with-text icon-new icon-new<%= step_item.tool_class.icon_name if step_item.tool_class %>"></span> <%= step_item.name %></div> | 12 | <div class="name"><span class="tool_icon button with-text icon-new icon-new<%= step_item.tool_class.icon_name if step_item.tool_class %>"></span> <%= step_item.name %></div> |
10 | <div class="lead"><%= step_item.body %></div> | 13 | <div class="lead"><%= step_item.body %></div> |
11 | <div class="tools"> | 14 | <div class="tools"> |