use bytes qw();
use Digest::MD5 qw(md5_hex);
use Encode;
+use Newslash::Util::Formatters qw(format_datetime);
#========================================================================
$c->{title} = $c->{subject};
$c->{time} = $c->{date};
$c->{introtext} = $c->{comment};
+ $c->{date_string} = format_datetime($c->{date});
#my $max_weight = 0;
#for my $t (@{$c->{topics}}) {
use Data::Dumper;
use DateTime;
+use Newslash::Util::Formatters qw(format_datetime);
#========================================================================
#}
}
+ warn "timestamp: $story->{time}";
+ $story->{time_string} = format_datetime($story->{time});
$story->{discussion_id} = $story->{discussion};
}
[%- IF story.content_type == 'submission' -%]タレコミ[%- END -%]
</span>
by <span v-text="item.author">[% story.author %]</span>
- <span v-text="item.time">[% story.time %]</span>
+ <span v-text="formatDateTime(item.time)">[% story.time_string %]</span>
[% IF story.content_type == 'story' %]<span v-text="item.dept">[% story.dept %]</span> 部門より[% END %]
</div>
- <div class="toolbar">
+ <div class="toolbar" v-show="!editing">
[%- IF story.content_type == 'journal' && story.uid == user.uid || x_template -%]
<button type="button" class="btn btn-default btn-sm"
area-label="編集" v-show="editable" v-on:click="editItem(item)">
<span class="glyphicon glyphicon-pencil"></span>
</button>
[%- END -%]
+ [%- IF story.content_type == 'submission' && user.author || x_template -%]
+ [<a href="/admin/story/edit?subid=[% story.submission_id %]">accept</a>]
+ [%- END -%]
</div>
</header>
<div class="body contents-text" v-html="item.introtext">[% story.introtext %]</div>
<div class="form-inline" v-if="item.content_type == 'story'">
<p class="form-group">
- <label for="post-createtime" >日時(GMT):</label>
+ <label for="post-createtime" >日時(JST):</label>
<input id="post-createtime" type="datetime-local" class="form-control" name="createtime" v-model="item.createtime" placeholder="XXXX-XX-XX XX:XX:XX" value="[% date.format(date.now, "%FT%T") %]"/>
</p>
<p class="form-group">
<span v-text="comment.author">[% comment.author %]</span>
[% END %]
</span>
- <span class="date">on <span v-text="comment.date">[% comment.date %]</span></span>
+ <span class="date">on <span v-text="comment.date_string">[% comment.date_string %]</span></span>
<span class="cid">(#<span v-text="comment.cid">[% comment.cid %]</span>)</span>
[%- IF user.is_admin -%]
<span class="ipid"><span v-text="comment.ipid">[% comment.ipid %]</span></span>