Commit a7dfb5fb385f159d0276b236c6cba4dd25aa57e0

Authored by Victor Costa
1 parent 8a3ed72f

Show status description at steps of a track

plugins/community_track/lib/community_track_plugin/step_helper.rb
1 1 module CommunityTrackPlugin::StepHelper
2 2  
3 3 def self.status_descriptions
4   - [_('Finished'), _('In progress'), _('Waiting')]
  4 + [_('Closed'), _('Join!'), _('Soon')]
5 5 end
6 6  
7 7 def self.status_classes
... ...
plugins/community_track/public/style.css
... ... @@ -140,6 +140,7 @@
140 140 #track .step .name {
141 141 font-weight: bold;
142 142 color: #333;
  143 + clear: both;
143 144 }
144 145  
145 146 #track .step .name a:hover {
... ... @@ -149,6 +150,7 @@
149 150 #track .step .date {
150 151 font-size: 12px;
151 152 color: #AAA;
  153 + float: left;
152 154 }
153 155  
154 156 #track .step .lead {
... ... @@ -255,3 +257,11 @@
255 257 #article .step_list .step .step_actions .button:hover {
256 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 28  
29 29 should 'return a description for status' do
30 30 @step.stubs(:waiting?).returns(true)
31   - assert_equal _('Waiting'), status_description(@step)
  31 + assert_equal _('Soon'), status_description(@step)
32 32 end
33 33  
34 34 should 'return nil at custom_options_for_article' do
... ...
plugins/community_track/views/blocks/_track.rhtml
... ... @@ -14,6 +14,7 @@
14 14 <% link_to_step_tool(step) do %>
15 15 <span class="step <%= block.status_class(step) %>">
16 16 <span class="position"><%= step.position %></span>
  17 + <span class="legend"><%= status_description(step) %></span>
17 18 <span class="tool_icon button with-text icon-new icon-new<%= step.tool_class.icon_name if step.tool_class %>"></span>
18 19 <span class="name"><%= step.name %></span>
19 20 </span>
... ...
plugins/community_track/views/content_viewer/_step_item.rhtml
... ... @@ -6,6 +6,9 @@
6 6 <div class="date">
7 7 <%= show_period(step_item.start_date, step_item.end_date) %>
8 8 </div>
  9 + <div class="legend">
  10 + <%= status_description(step_item) %>
  11 + </div>
9 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 13 <div class="lead"><%= step_item.body %></div>
11 14 <div class="tools">
... ...