2 USE dtf = DateTimeFormatter;
3 IF story.content_type == 'story'; content_id = story.sid; END;
4 IF story.content_type == 'journal'; content_id = story.id; END;
5 IF story.content_type == 'submission'; content_id = story.subid; END;
6 IF story.content_type == 'poll'; content_id = story.qid; END;
7 IF story.content_type == 'vote'; content_id = story.qid; END;
9 IF story.content_type == 'story'; url = "/story/" _ story.sid _ "/"; END;
10 IF story.content_type == 'journal'; url = "/journal/" _ story.id _ "/"; END;
11 IF story.content_type == 'submission'; url = "/submission/" _ story.id _ "/"; END;
12 IF story.content_type == 'comment'; url = "/comment/" _ story.id _ "/"; END;
13 IF story.content_type == 'poll'; url = "/poll/" _ story.id _ "/"; END;
16 <article id="[% story.id %]" type="[% story.content_type %]" item-id="[% content_id %]" [% IF !x_template %]v-if="0"[% END %]>
19 [%- IF story.primary_topic.image.length || x_template -%]
20 <img [% IF story.primary_topic.image %]src="[% Site.topic_icon_base_url %]/[% story.primary_topic.image %]"[% END %]
21 :src="primaryTopicIconURL" v-if="primaryTopicIconURL" />
23 <a href="[% url %]" v-html="item.title">[% story.title %]</a>
26 <div class="property">
27 <span class="content-type">
28 [%- IF story.content_type == 'story' -%]ストーリー[%- END -%]
29 [%- IF story.content_type == 'journal' -%]日記[%- END -%]
30 [%- IF story.content_type == 'submission' -%]タレコミ[%- END -%]
31 [%- IF story.content_type == 'comment' -%]コメント[%- END -%]
32 [%- IF story.content_type == 'poll' -%]国民投票[%- END -%]
35 by <span v-text="item.author">[% story.author %]</span>
37 <span class="create-time" v-text="item.create_time">[% dtf.mysql_to_user(story.create_time, user.config.offset_sec, user.config.time_format) %]</span>
38 [% IF story.content_type == 'story' %]<span class="dept"><span v-text="item.dept" v-if="item.dept">[% story.dept %]</span> 部門より</span>[% END %]
41 <div class="toolbar" v-show="!editing">
42 [%- IF story.content_type == 'journal' && story.uid == user.uid || x_template -%]
43 <button type="button" class="btn btn-default btn-sm"
44 area-label="編集" v-show="editable" v-on:click="editItem(item)">
45 <span class="glyphicon glyphicon-pencil"></span>
48 [%- IF story.content_type == 'story' && user.is_admin || user.editor || x_template -%]
49 <button type="button" class="btn btn-default btn-sm" id="activate-editor"
50 area-label="編集" title="編集" v-on:click="editItem(item)"
52 <span class="glyphicon glyphicon-cog"></span>
55 [%- IF story.content_type == 'submission' && (user.author || x_template) -%]
56 [<a href="/admin/story/edit?subid=[% story.submission_id %]">accept</a>]
61 <div class="body contents-text">
62 [%- IF story.content_type == 'poll' -%]
63 [% INCLUDE common/poll/poll_body %]
64 [%- ELSIF story.content_type == 'vote' -%]
65 [% INCLUDE common/poll/vote_body %]
69 [%- IF story.introtext || x_template -%]
70 <div class="body contents-text" v-html="item.introtext">[% story.introtext %]</div>
73 [% IF story.bodytext && !hide_bodytext %]
74 <div class="body contents-text" v-html="item.bodytext">[% story.bodytext %]</div>
78 <div class="body contents-text" v-if="item.url"><p><a :href="item.url">情報元へのリンク</a></p></div>
79 [%- ELSIF story.url -%]
80 <div class="body contents-text"><p><a href="[% story.url %]">情報元へのリンク</a></p></div>
84 [%- IF !hide_more_link -%]
85 <div class="link-to-story" v-if="!editing"><a href="[% url %]" :href="url">
86 [%- IF story.content_type == "poll" -%]
87 [%- IF story.commentcount || x_template -%]
88 <span v-if="item.commentcount > 0">投票結果と<span v-text="item.commentcount">[% story.commentcount %]</span>件のコメントを見る</span>
90 [%- IF !story.commentcount || x_template -%]<span v-if="item.commentcount == 0">投票結果を見る</span>[%- END -%]
92 [%- link_target = "記事" -%]
93 [%- IF story.commentcount || x_template -%]
94 <span v-if="item.commentcount > 0">[% link_target %]と<span v-text="item.commentcount">[% story.commentcount %]</span>件のコメントを読む</span>
96 [%- IF !story.commentcount || x_template -%]
97 <span v-if="item.commentcount == 0">[% link_target %]を読む</span>
102 <div class="comment-counter">
103 <a href="#comments"><span class="counter" v-text="item.commentcount">[% story.commentcount %]</span>コメント</a>
107 <div class="tag-bar">
109 [%- FOREACH tag IN story.tags -%]
110 [%- IF tag.private == "no" && tag.tagname != "mainpage" && tag.uid == story.uid -%]
111 <li>[% tag.tagname %]</li>