Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #1485 from scottsds/issue_3719
Browse files Browse the repository at this point in the history
Issue 3719: Language not visible anywhere
  • Loading branch information
CristinaRO committed Apr 22, 2014
2 parents f7fe428 + 669509d commit 1dd9cf8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/helpers/works_helper.rb
Expand Up @@ -21,6 +21,11 @@ def work_meta_list(work, chapter=nil)
end
list.concat([[ts("Hits:"), work.hits]]) if show_hit_count?(work)

if work.language.present?
language = work.language.name
list.concat([[ts('Language:'), language]])
end

if work.chaptered? && work.revised_at
prefix = work.is_wip ? ts("Updated:") : ts("Completed:")
latest_date = (work.preview_mode && work.backdate) ? published_date : date_in_user_time_zone(work.revised_at).to_date
Expand Down
8 changes: 6 additions & 2 deletions app/views/works/_work_module.html.erb
Expand Up @@ -85,7 +85,7 @@
(@collection && false) ? collection_work_path(@collection, work, :anchor => "comments", :show_comments => true) : (work.chapter_total_display.to_i > 1 ? work_path(work, :anchor => "comments", :show_comments => true, :view_full_work => 'true') : work_path(work, :anchor => "comments", :show_comments => true)) %></dd>
<% end %>
<% if work.all_kudos_count > 0 %>
<dt><%= ts('Kudos: ') %></dt>
<dt><%= ts('Kudos') %>:</dt>
<dd><%= link_to work.all_kudos_count.to_s,
(@collection && false) ? collection_work_path(@collection, work, :anchor => "comments") :
(work.chapter_total_display.to_i > 1 ? work_path(work, :anchor => "comments", :view_full_work => 'true') :
Expand All @@ -100,9 +100,13 @@
<dt><%= ts("Hits") %>:</dt>
<dd><%= work.hits %></dd>
<% end %>
<% if work.language.present? %>
<dt><%= ts("Language") %>:</dt>
<dd><%= work.language.name %></dd>
<% end %>
<% end %>
<% #### END CACHE stats #### %>
</dl>
<% end %>
<% end %>
1 change: 1 addition & 0 deletions features/works/work_languages.feature
Expand Up @@ -22,6 +22,7 @@ Feature: Create Works
Then I should see "Preview"
When I press "Post"
Then I should see "Work was successfully posted."
And I should see "Language:Deutsch" within "dl.work.meta.group"
When I go to the works page
Then I should see "Überraschende Überraschung"
When I follow "Weiß Kreuz"
Expand Down

0 comments on commit 1dd9cf8

Please sign in to comment.