2018-10-03 14:27:01 +00:00
|
|
|
<%#
|
|
|
|
The h-entry, u-report-of, u-url and h-card css classes are necessary
|
|
|
|
for the webmentions support. http://microformats.org/wiki/h-entry
|
2022-10-19 12:54:39 +00:00
|
|
|
|
|
|
|
This has apparently useless <span> tags explained in a comment in CSS
|
|
|
|
around .negative_1 in CSS (introduced same commit as this comment).
|
2018-10-03 14:27:01 +00:00
|
|
|
%>
|
2012-06-30 16:18:36 +00:00
|
|
|
<li id="story_<%= story.short_id %>" data-shortid="<%= story.short_id %>"
|
2015-02-11 17:37:03 +00:00
|
|
|
class="story <%= story.vote && story.vote[:vote] == 1 ? "upvoted" : "" %>
|
2020-05-12 02:52:05 +00:00
|
|
|
<%= story.vote && story.vote[:vote] == -1 ? "flagged" : "" %>
|
2015-07-24 05:33:42 +00:00
|
|
|
<%= story.score <= -1 ? "negative_1" : "" %>
|
|
|
|
<%= story.score <= -3 ? "negative_3" : "" %>
|
|
|
|
<%= story.score <= -5 ? "negative_5" : "" %>
|
2015-02-11 17:37:03 +00:00
|
|
|
<%= story.is_hidden_by_cur_user ? "hidden" : "" %>
|
2017-07-13 20:38:33 +00:00
|
|
|
<%= story.is_saved_by_cur_user ? "saved" : "" %>
|
2022-02-07 03:38:50 +00:00
|
|
|
<%= story.is_deleted? ? "deleted" : "" %>">
|
2018-10-03 14:27:01 +00:00
|
|
|
<div class="story_liner h-entry">
|
2012-12-09 04:38:36 +00:00
|
|
|
<div class="voters">
|
2012-06-17 01:15:46 +00:00
|
|
|
<% if @user %>
|
2019-04-03 12:18:33 +00:00
|
|
|
<a class="upvoter" title="Add upvote"></a>
|
2012-06-17 01:15:46 +00:00
|
|
|
<% else %>
|
2015-01-02 23:02:55 +00:00
|
|
|
<%= link_to "", login_path, :class => "upvoter" %>
|
2012-06-17 01:15:46 +00:00
|
|
|
<% end %>
|
2019-08-14 14:09:15 +00:00
|
|
|
<div class="score"><%= story.show_score_to_user?(@user) ? story.score : '~' %></div>
|
2012-12-09 04:38:36 +00:00
|
|
|
</div>
|
|
|
|
<div class="details">
|
2023-02-08 16:47:40 +00:00
|
|
|
<span role="heading" aria-level="1" class="link h-cite u-repost-of">
|
2012-07-05 00:33:12 +00:00
|
|
|
<% if story.can_be_seen_by_user?(@user) %>
|
2020-11-17 14:46:09 +00:00
|
|
|
<a class="u-url" href="<%= story.url_or_comments_path %>" rel="ugc <%= story.send_referrer? ? '' : 'noreferrer' %>"><%= story.title %></a>
|
2012-07-05 00:33:12 +00:00
|
|
|
<% end %>
|
|
|
|
<% if story.is_gone? %>
|
2012-09-02 14:50:07 +00:00
|
|
|
[Story removed by <%= story.is_moderated? ? "moderator" :
|
2022-02-20 19:50:08 +00:00
|
|
|
"submitter" %>]
|
2012-07-05 00:33:12 +00:00
|
|
|
<% end %>
|
2012-12-09 04:38:36 +00:00
|
|
|
</span>
|
2015-11-04 16:52:27 +00:00
|
|
|
<% if story.markeddown_description.present? %>
|
2017-03-28 16:08:01 +00:00
|
|
|
<a class="description_present" title="<%= truncate(story.description,
|
|
|
|
:length => 500) %>" href="<%= story.comments_path %>">☶</a>
|
2015-11-04 16:52:27 +00:00
|
|
|
<% end %>
|
2012-07-05 00:33:12 +00:00
|
|
|
<% if story.can_be_seen_by_user?(@user) %>
|
|
|
|
<span class="tags">
|
2018-06-23 03:48:32 +00:00
|
|
|
<% story.tags.each do |tag| %>
|
2019-03-13 13:04:59 +00:00
|
|
|
<%= tag_link(tag) %>
|
2012-07-05 00:33:12 +00:00
|
|
|
<% end %>
|
|
|
|
</span>
|
2015-01-29 16:04:02 +00:00
|
|
|
<% if story.domain.present? %>
|
2020-11-17 14:46:09 +00:00
|
|
|
<a class="domain" href="<%= domain_path(story.domain) %>"><%= story.domain.domain %></a>
|
2015-01-29 16:04:02 +00:00
|
|
|
<% end %>
|
2014-04-08 22:51:12 +00:00
|
|
|
|
|
|
|
<% if defined?(single_story) && single_story %>
|
2020-06-07 19:47:02 +00:00
|
|
|
<% story.merged_stories.not_deleted.includes(:domain, :user, :tags).each do |ms| %>
|
2014-04-08 22:51:12 +00:00
|
|
|
<br>
|
|
|
|
<span class="merge"></span>
|
|
|
|
<span class="link">
|
2020-11-17 14:46:09 +00:00
|
|
|
<a href="<%= ms.url_or_comments_path %>" rel="ugc <%= ms.send_referrer? ? '' : 'noreferrer' %>"%><%= ms.title %></a>
|
2014-04-08 22:51:12 +00:00
|
|
|
</span>
|
|
|
|
<span class="tags">
|
2018-06-23 03:48:32 +00:00
|
|
|
<% ms.tags.each do |tag| %>
|
|
|
|
<a href="<%= tag_path(tag) %>"
|
|
|
|
class="<%= tag.css_class %>"
|
|
|
|
title="<%= tag.description %>"><%= tag.tag %></a>
|
2014-04-08 22:51:12 +00:00
|
|
|
<% end %>
|
|
|
|
</span>
|
2020-06-07 19:47:02 +00:00
|
|
|
<% if ms.domain_id.present? %>
|
2020-11-17 14:46:09 +00:00
|
|
|
<a class="domain" href="<%= domain_path(ms.domain) %>"><%= ms.domain.domain %></a>
|
2015-01-29 16:04:02 +00:00
|
|
|
<% end %>
|
2015-01-02 00:54:26 +00:00
|
|
|
<span class="byline">
|
2016-01-21 17:58:26 +00:00
|
|
|
<% if (@user && @user.show_avatars?) || !@user %>
|
enable mod_userdir
diff of `rails routes`:
12,13d11
< GET /newest/:user(.:format) home#newest_by_user
< GET /newest/:user/page/:page(.:format) home#newest_by_user
32d29
< user_threads GET /threads/:user(.:format) comments#user_threads
120,122c117,132
< u GET /u(.:format) users#tree
< user GET /u/:username(.:format) users#show
< user_standing GET /u/:username/standing(.:format) users#standing
---
> users_tree GET /users(.:format) users#tree
> user GET /~:username(.:format) users#show
> user_standing GET /~:username/standing(.:format) users#standing
> GET /~:user/stories(/page/:page)(.:format) home#newest_by_user
> user_threads GET /~:user/threads(.:format) comments#user_threads
> user_ban POST /~:username/ban(.:format) users#ban
> user_unban POST /~:username/unban(.:format) users#unban
> user_disable_invite POST /~:username/disable_invitation(.:format) users#disable_invitation
> user_enable_invite POST /~:username/enable_invitation(.:format) users#enable_invitation
> u GET /u(.:format) redirect(302, /users)
> GET /u/:username(.:format) redirect(302, /~%{username})
> GET /@:username(.:format) redirect(302, /~%{username})
> GET /u/:username/standing(.:format) redirect(302, ~%{username}/standing)
> GET /newest/:user(.:format) redirect(302, ~%{user}/stories)
> GET /newest/:user(/page/:page)(.:format) redirect(302, ~%{user}/stories/page/%{page})
> GET /threads/:user(.:format) redirect(302, ~%{user}/threads)
125,128d134
< user_ban POST /users/:username/ban(.:format) users#ban
< user_unban POST /users/:username/unban(.:format) users#unban
< user_disable_invite POST /users/:username/disable_invitation(.:format) users#disable_invitation
< user_enable_invite POST /users/:username/enable_invitation(.:format) users#enable_invitation
2023-08-29 12:45:28 +00:00
|
|
|
<%= link_to avatar_img(ms.user, 16), ms.user %>
|
2015-07-31 15:51:33 +00:00
|
|
|
<% end %>
|
2020-06-27 13:32:09 +00:00
|
|
|
<% if ms.user_is_author? %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> authored by </span>
|
2015-11-13 09:28:32 +00:00
|
|
|
<% else %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> via </span>
|
2015-07-30 22:15:48 +00:00
|
|
|
<% end %>
|
enable mod_userdir
diff of `rails routes`:
12,13d11
< GET /newest/:user(.:format) home#newest_by_user
< GET /newest/:user/page/:page(.:format) home#newest_by_user
32d29
< user_threads GET /threads/:user(.:format) comments#user_threads
120,122c117,132
< u GET /u(.:format) users#tree
< user GET /u/:username(.:format) users#show
< user_standing GET /u/:username/standing(.:format) users#standing
---
> users_tree GET /users(.:format) users#tree
> user GET /~:username(.:format) users#show
> user_standing GET /~:username/standing(.:format) users#standing
> GET /~:user/stories(/page/:page)(.:format) home#newest_by_user
> user_threads GET /~:user/threads(.:format) comments#user_threads
> user_ban POST /~:username/ban(.:format) users#ban
> user_unban POST /~:username/unban(.:format) users#unban
> user_disable_invite POST /~:username/disable_invitation(.:format) users#disable_invitation
> user_enable_invite POST /~:username/enable_invitation(.:format) users#enable_invitation
> u GET /u(.:format) redirect(302, /users)
> GET /u/:username(.:format) redirect(302, /~%{username})
> GET /@:username(.:format) redirect(302, /~%{username})
> GET /u/:username/standing(.:format) redirect(302, ~%{username}/standing)
> GET /newest/:user(.:format) redirect(302, ~%{user}/stories)
> GET /newest/:user(/page/:page)(.:format) redirect(302, ~%{user}/stories/page/%{page})
> GET /threads/:user(.:format) redirect(302, ~%{user}/threads)
125,128d134
< user_ban POST /users/:username/ban(.:format) users#ban
< user_unban POST /users/:username/unban(.:format) users#unban
< user_disable_invite POST /users/:username/disable_invitation(.:format) users#disable_invitation
< user_enable_invite POST /users/:username/enable_invitation(.:format) users#enable_invitation
2023-08-29 12:45:28 +00:00
|
|
|
<%= styled_user_link ms.user, story, ['u-author', 'h-card'] %>
|
2015-01-02 00:54:26 +00:00
|
|
|
|
2018-01-24 14:54:07 +00:00
|
|
|
<%= time_ago_in_words_label(ms.created_at) %>
|
2017-05-02 02:20:46 +00:00
|
|
|
<% if ms.is_editable_by_user?(@user) %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span>
|
2017-05-02 02:20:46 +00:00
|
|
|
<a href="<%= edit_story_path(ms.short_id) %>">edit</a>
|
|
|
|
<% end %>
|
2015-01-02 00:54:26 +00:00
|
|
|
</span>
|
2014-04-08 22:51:12 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2012-07-05 00:33:12 +00:00
|
|
|
<% end %>
|
2015-07-30 22:56:09 +00:00
|
|
|
|
|
|
|
<% if !(defined?(single_story) && single_story) && @user &&
|
|
|
|
@user.show_story_previews? %>
|
2020-08-25 12:51:09 +00:00
|
|
|
<% if (sc = story.description_or_story_text(500)).present? %>
|
2015-07-30 22:56:09 +00:00
|
|
|
<div class="story_content">
|
2020-11-17 14:46:09 +00:00
|
|
|
<%= sc %>
|
2015-07-30 22:56:09 +00:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
2012-12-09 04:38:36 +00:00
|
|
|
<div class="byline">
|
2016-01-21 17:58:26 +00:00
|
|
|
<% if (@user && @user.show_avatars?) || !@user %>
|
enable mod_userdir
diff of `rails routes`:
12,13d11
< GET /newest/:user(.:format) home#newest_by_user
< GET /newest/:user/page/:page(.:format) home#newest_by_user
32d29
< user_threads GET /threads/:user(.:format) comments#user_threads
120,122c117,132
< u GET /u(.:format) users#tree
< user GET /u/:username(.:format) users#show
< user_standing GET /u/:username/standing(.:format) users#standing
---
> users_tree GET /users(.:format) users#tree
> user GET /~:username(.:format) users#show
> user_standing GET /~:username/standing(.:format) users#standing
> GET /~:user/stories(/page/:page)(.:format) home#newest_by_user
> user_threads GET /~:user/threads(.:format) comments#user_threads
> user_ban POST /~:username/ban(.:format) users#ban
> user_unban POST /~:username/unban(.:format) users#unban
> user_disable_invite POST /~:username/disable_invitation(.:format) users#disable_invitation
> user_enable_invite POST /~:username/enable_invitation(.:format) users#enable_invitation
> u GET /u(.:format) redirect(302, /users)
> GET /u/:username(.:format) redirect(302, /~%{username})
> GET /@:username(.:format) redirect(302, /~%{username})
> GET /u/:username/standing(.:format) redirect(302, ~%{username}/standing)
> GET /newest/:user(.:format) redirect(302, ~%{user}/stories)
> GET /newest/:user(/page/:page)(.:format) redirect(302, ~%{user}/stories/page/%{page})
> GET /threads/:user(.:format) redirect(302, ~%{user}/threads)
125,128d134
< user_ban POST /users/:username/ban(.:format) users#ban
< user_unban POST /users/:username/unban(.:format) users#unban
< user_disable_invite POST /users/:username/disable_invitation(.:format) users#disable_invitation
< user_enable_invite POST /users/:username/enable_invitation(.:format) users#enable_invitation
2023-08-29 12:45:28 +00:00
|
|
|
<%= link_to avatar_img(story.user, 16), story.user %>
|
2015-07-31 15:51:33 +00:00
|
|
|
<% end %>
|
2012-07-11 23:28:27 +00:00
|
|
|
<% if story.previewing %>
|
2015-11-13 09:28:32 +00:00
|
|
|
<% if story.user_is_author? %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> authored by </span>
|
2015-11-13 09:28:32 +00:00
|
|
|
<% else %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> via </span>
|
2015-11-13 09:28:32 +00:00
|
|
|
<% end %>
|
enable mod_userdir
diff of `rails routes`:
12,13d11
< GET /newest/:user(.:format) home#newest_by_user
< GET /newest/:user/page/:page(.:format) home#newest_by_user
32d29
< user_threads GET /threads/:user(.:format) comments#user_threads
120,122c117,132
< u GET /u(.:format) users#tree
< user GET /u/:username(.:format) users#show
< user_standing GET /u/:username/standing(.:format) users#standing
---
> users_tree GET /users(.:format) users#tree
> user GET /~:username(.:format) users#show
> user_standing GET /~:username/standing(.:format) users#standing
> GET /~:user/stories(/page/:page)(.:format) home#newest_by_user
> user_threads GET /~:user/threads(.:format) comments#user_threads
> user_ban POST /~:username/ban(.:format) users#ban
> user_unban POST /~:username/unban(.:format) users#unban
> user_disable_invite POST /~:username/disable_invitation(.:format) users#disable_invitation
> user_enable_invite POST /~:username/enable_invitation(.:format) users#enable_invitation
> u GET /u(.:format) redirect(302, /users)
> GET /u/:username(.:format) redirect(302, /~%{username})
> GET /@:username(.:format) redirect(302, /~%{username})
> GET /u/:username/standing(.:format) redirect(302, ~%{username}/standing)
> GET /newest/:user(.:format) redirect(302, ~%{user}/stories)
> GET /newest/:user(/page/:page)(.:format) redirect(302, ~%{user}/stories/page/%{page})
> GET /threads/:user(.:format) redirect(302, ~%{user}/threads)
125,128d134
< user_ban POST /users/:username/ban(.:format) users#ban
< user_unban POST /users/:username/unban(.:format) users#unban
< user_disable_invite POST /users/:username/disable_invitation(.:format) users#disable_invitation
< user_enable_invite POST /users/:username/enable_invitation(.:format) users#enable_invitation
2023-08-29 12:45:28 +00:00
|
|
|
|
|
|
|
<%= styled_user_link story.user, story, ['u-author', 'h-card'] %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> just now </span>
|
2012-07-11 23:28:27 +00:00
|
|
|
<% else %>
|
2015-11-13 09:28:32 +00:00
|
|
|
<% if story.user_is_author? %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> authored by </span>
|
2015-11-13 09:28:32 +00:00
|
|
|
<% else %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> via </span>
|
2015-11-13 09:28:32 +00:00
|
|
|
<% end %>
|
enable mod_userdir
diff of `rails routes`:
12,13d11
< GET /newest/:user(.:format) home#newest_by_user
< GET /newest/:user/page/:page(.:format) home#newest_by_user
32d29
< user_threads GET /threads/:user(.:format) comments#user_threads
120,122c117,132
< u GET /u(.:format) users#tree
< user GET /u/:username(.:format) users#show
< user_standing GET /u/:username/standing(.:format) users#standing
---
> users_tree GET /users(.:format) users#tree
> user GET /~:username(.:format) users#show
> user_standing GET /~:username/standing(.:format) users#standing
> GET /~:user/stories(/page/:page)(.:format) home#newest_by_user
> user_threads GET /~:user/threads(.:format) comments#user_threads
> user_ban POST /~:username/ban(.:format) users#ban
> user_unban POST /~:username/unban(.:format) users#unban
> user_disable_invite POST /~:username/disable_invitation(.:format) users#disable_invitation
> user_enable_invite POST /~:username/enable_invitation(.:format) users#enable_invitation
> u GET /u(.:format) redirect(302, /users)
> GET /u/:username(.:format) redirect(302, /~%{username})
> GET /@:username(.:format) redirect(302, /~%{username})
> GET /u/:username/standing(.:format) redirect(302, ~%{username}/standing)
> GET /newest/:user(.:format) redirect(302, ~%{user}/stories)
> GET /newest/:user(/page/:page)(.:format) redirect(302, ~%{user}/stories/page/%{page})
> GET /threads/:user(.:format) redirect(302, ~%{user}/threads)
125,128d134
< user_ban POST /users/:username/ban(.:format) users#ban
< user_unban POST /users/:username/unban(.:format) users#unban
< user_disable_invite POST /users/:username/disable_invitation(.:format) users#disable_invitation
< user_enable_invite POST /users/:username/enable_invitation(.:format) users#enable_invitation
2023-08-29 12:45:28 +00:00
|
|
|
<%= styled_user_link story.user, story, ['u-author', 'h-card'] %>
|
2014-11-07 19:42:33 +00:00
|
|
|
|
2018-01-24 14:54:07 +00:00
|
|
|
<%= time_ago_in_words_label(story.created_at) %>
|
2012-06-17 01:15:46 +00:00
|
|
|
|
2012-07-11 23:28:27 +00:00
|
|
|
<% if story.is_editable_by_user?(@user) %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span>
|
2017-03-09 17:21:38 +00:00
|
|
|
<a href="<%= edit_story_path(story.short_id) %>" class="<%=
|
|
|
|
story.has_suggestions? ? "story_has_suggestions" : "" %>">edit</a>
|
2015-10-17 15:38:48 +00:00
|
|
|
<% end %>
|
|
|
|
<% if story.can_have_suggestions_from_user?(@user) %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span><%= link_to "suggest", story_suggest_path(story.short_id),
|
2015-10-15 01:32:24 +00:00
|
|
|
:class => "suggester" %>
|
2012-07-11 23:28:27 +00:00
|
|
|
<% end %>
|
2014-03-03 23:14:33 +00:00
|
|
|
<% if !story.is_gone? && @user %>
|
2015-02-11 17:37:03 +00:00
|
|
|
<% if @user && story.vote && story.vote[:vote] == -1 %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span><a class="flagger">unflag (<%=
|
2015-02-11 17:37:03 +00:00
|
|
|
Vote::STORY_REASONS[story.vote[:reason]].to_s.downcase %>)</a>
|
2020-05-12 02:52:05 +00:00
|
|
|
<% elsif @user && @user.can_flag?(story) %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span>
|
2022-08-24 13:28:06 +00:00
|
|
|
<span class="dropdown_parent">
|
|
|
|
<a class="flagger">flag</a>
|
|
|
|
</span>
|
2014-07-02 15:04:48 +00:00
|
|
|
<% end %>
|
2015-02-11 17:37:03 +00:00
|
|
|
<% if story.is_hidden_by_cur_user %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span><%= link_to "unhide", story_unhide_path(story.short_id),
|
2014-03-03 23:14:33 +00:00
|
|
|
:class => "hider" %>
|
|
|
|
<% else %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span><%= link_to "hide", story_hide_path(story.short_id),
|
2014-03-03 23:14:33 +00:00
|
|
|
:class => "hider" %>
|
|
|
|
<% end %>
|
2017-07-14 00:14:58 +00:00
|
|
|
<% if defined?(single_story) && single_story && story.hider_count > 0 %>
|
|
|
|
(hidden by <%= pluralize(story.hider_count, "user") %>)
|
|
|
|
<% end %>
|
2017-07-13 20:38:33 +00:00
|
|
|
<% if story.is_saved_by_cur_user %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span><%= link_to "unsave", story_unsave_path(story.short_id),
|
2017-07-13 20:38:33 +00:00
|
|
|
:class => "saver" %>
|
|
|
|
<% else %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span><%= link_to "save", story_save_path(story.short_id),
|
2017-07-13 20:38:33 +00:00
|
|
|
:class => "saver" %>
|
|
|
|
<% end %>
|
2014-03-03 23:14:33 +00:00
|
|
|
<% end %>
|
2016-02-10 14:39:42 +00:00
|
|
|
<% if story.url.present? %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span>
|
2022-08-24 13:28:06 +00:00
|
|
|
<span class="dropdown_parent">
|
2022-09-26 13:16:13 +00:00
|
|
|
<input id="archive_<%= story.short_id %>" class="archive_button" type="checkbox">
|
2022-01-22 15:18:16 +00:00
|
|
|
<label for="archive_<%= story.short_id %>">archive</label>
|
|
|
|
<div class="archive-dropdown">
|
|
|
|
<a href="<%= story.archiveorg_url %>">Archive.org</a>
|
|
|
|
<a href="<%= story.archivetoday_url %>">Archive.today</a>
|
|
|
|
<a href="<%= story.ghost_url %>">Ghostarchive</a>
|
2021-10-19 01:24:22 +00:00
|
|
|
</div>
|
2022-01-22 16:32:13 +00:00
|
|
|
</span>
|
2016-02-10 14:39:42 +00:00
|
|
|
<% end %>
|
2020-02-03 04:45:49 +00:00
|
|
|
<% if !story.is_gone? || @user.try(:is_moderator?) %>
|
2014-02-08 20:28:27 +00:00
|
|
|
<span class="comments_label">
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | </span>
|
2023-02-08 16:47:40 +00:00
|
|
|
<a role="heading" aria-level="2" href="<%= story.comments_path %>">
|
2016-02-02 17:56:10 +00:00
|
|
|
<% if story.comments_count == 0 %>
|
2018-11-08 14:30:05 +00:00
|
|
|
no comments</a>
|
2016-02-02 17:56:10 +00:00
|
|
|
<% else %>
|
2018-11-07 17:42:40 +00:00
|
|
|
<%= story.comments_count %> <%= 'comment'.pluralize(story.comments_count) %></a>
|
2016-02-02 17:56:10 +00:00
|
|
|
<% end %>
|
2014-02-08 20:28:27 +00:00
|
|
|
</span>
|
2012-06-30 16:18:36 +00:00
|
|
|
<% end %>
|
2014-03-18 05:06:43 +00:00
|
|
|
|
2015-09-03 19:18:25 +00:00
|
|
|
<% if defined?(single_story) && single_story &&
|
2020-05-12 02:52:05 +00:00
|
|
|
((story.flags > 0 && @user && @user.is_moderator?) ||
|
|
|
|
(story.flags >= 3 || story.score <= 0)) %>
|
2022-10-19 12:54:39 +00:00
|
|
|
<span> | <%= story.vote_summary_for(@user).downcase %> </span>
|
2014-03-18 05:06:43 +00:00
|
|
|
<% end %>
|
2012-06-30 16:18:36 +00:00
|
|
|
<% end %>
|
2012-12-09 04:38:36 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-02-08 20:28:27 +00:00
|
|
|
</div>
|
2018-10-10 12:26:27 +00:00
|
|
|
<a href="<%= story.comments_path %>" class="mobile_comments <%= story.comments_count == 0 ? "zero" : "" %>" style="display: none;">
|
2018-08-08 13:34:50 +00:00
|
|
|
<span><%= story.comments_count %></span>
|
|
|
|
</a>
|
2012-06-17 01:15:46 +00:00
|
|
|
</li>
|