OSDN Git Service

template: unify some vue.js related parameter to 'x-template'
authorhylom <hylom@users.sourceforge.jp>
Fri, 17 Mar 2017 12:17:27 +0000 (21:17 +0900)
committerhylom <hylom@users.sourceforge.jp>
Fri, 17 Mar 2017 12:17:27 +0000 (21:17 +0900)
src/newslash_web/templates/comment/comment.html.tt2
src/newslash_web/templates/comment/comments.html.tt2
src/newslash_web/templates/common/article.html.tt2
src/newslash_web/templates/components/article_item.html.tt2
src/newslash_web/templates/components/journal_editor.html.tt2
src/newslash_web/templates/journal/editor.html.tt2
src/newslash_web/templates/timeline/item.html.tt2

index 610b6f0..a170768 100644 (file)
@@ -16,7 +16,7 @@
             v-on:click="showModInfo">±0</span>
       <span class="score badge" v-show="showScore && comment.points != 0" v-on:click="showModInfo">
         <span v-text="signedPoints">
-          [%- IF !vuejs -%]
+          [%- IF !x-template -%]
           [% IF comment.points > 0 %]+[% comment.points %][% END -%]
           [% IF comment.points < 0 %]-[% comment.points %][% END -%]
           [%- END -%]                                 
@@ -24,7 +24,7 @@
         <span v-text="reasonText">[% comment.reason %]</span>
       </span>
       <span class="author">by
-        [% IF comment.is_login || vuejs %]
+        [% IF comment.is_login || x-template %]
         <a v-if="comment.is_login" :href="'/~' + comment.author"><span v-text="comment.author">[% comment.author %]</span></a>
         <span v-else v-text="comment.author">[% comment.author %]</span>
         [% ELSE %]
@@ -38,7 +38,7 @@
       <span class="subnetid"><span v-text="comment.subnetid">[% comment.subnetid %]</span></span>
       [%- END -%]
     </div>
-    [%- IF vuejs -%]
+    [%- IF x-template -%]
     <div class="moderate-reasons" v-if="displayModInfo">
       モデレーション履歴:<span v-if="noMods">なし</span>
       <span class="loading" v-if="loadingMods">読み込み中</span>
index 0eed0a4..b5c0769 100644 (file)
@@ -10,7 +10,7 @@
 </div>
 
 <script type="text/x-template" id="comment-template">
-  [%- INCLUDE comment/comment comment={} vuejs=1-%]
+  [%- INCLUDE comment/comment comment={} x-template=1 -%]
 </script>
 
 <script type="text/x-template" id="comment-form-template">
index d36f01f..2da547d 100644 (file)
@@ -3,10 +3,10 @@ IF story.content_type == 'story'; content_id = story.sid; END;
 IF story.content_type == 'journal'; content_id = story.id; END;
 IF story.content_type == 'submission'; content_id = story.subid; END;
 -%]
-<article type="[% story.content_type %]" item-id="[% content_id %]" [% IF !story.vue_template %]v-if="0"[% END %]>
+<article type="[% story.content_type %]" item-id="[% content_id %]" [% IF !x-template %]v-if="0"[% END %]>
   <header>
     <h1>
-      [%- IF story.primary_topic.image.length || story.vue_template -%]
+      [%- IF story.primary_topic.image.length || x-template -%]
       <img [% IF story.primary_topic.image %]src="[% Site.topic_icon_base_url %]/[% story.primary_topic.image %]"[% END %]
            :src="topicIconURL" v-if="topicIconURL" />
       [%- END -%]
@@ -27,7 +27,7 @@ IF story.content_type == 'submission'; content_id = story.subid; END;
       [% IF story.content_type == 'story' %]<span v-text="item.dept">[% story.dept %]</span> 部門より[% END %]
     </div>
     <div class="toolbar">
-      [%- IF story.content_type == 'journal' && story.uid == user.uid || story.vue_template -%]
+      [%- 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>
@@ -40,10 +40,10 @@ IF story.content_type == 'submission'; content_id = story.subid; END;
   <footer>
     [%- IF !hide_more_link -%]
     <div class="link-to-story"><a href="[% url %]" :href="url">
-        [%- IF story.commentcount || story.vue_template -%]
+        [%- IF story.commentcount || x-template -%]
        <span v-if="item.commentcount > 0">記事と<span v-text="item.commentcount">[% story.commentcount %]</span>件のコメントを読む</span>
         [%- END -%]
-        [%- IF !story.commentcount || story.vue_template -%]
+        [%- IF !story.commentcount || x-template -%]
        <span v-if="item.commentcount == 0">記事を読む</span>
         [%- END -%]
     </a></div>
index 598ef59..5e7a5f6 100644 (file)
@@ -1,5 +1,5 @@
 <script type="text/x-template" id="article-item">
-  [% INCLUDE common/article story={content_type => type, vue_template => 1} hide_more_link = 0 %]
+  [% INCLUDE common/article story={content_type => type} x-template=1 hide_more_link = 0 %]
 </script>
 <script src="/js/article-item.js" ></script>
 <script>
index 2dbad59..d8457bb 100644 (file)
@@ -1,5 +1,5 @@
 <script type="text/x-template" id="content-editor">
-[% INCLUDE journal/editor vuejs=1%]
+[% INCLUDE journal/editor x-template=1%]
 </script>
 <script src="/js/content-editor.js" ></script>
 <script>
index 0c0b8a0..1e70875 100644 (file)
@@ -14,7 +14,7 @@
         <label for="post-commentstatus">コメント設定:</label>
         <select id="post-commentstatus" class="form-control" name="commentstatus" v-model="commentstatus">
           <option value="disabled">コメント無効</option>
-          <option value="enabled"[% IF !vuejs %] selected="selected"[% END %]>コメント有効</option>
+          <option value="enabled"[% IF !x-template %] selected="selected"[% END %]>コメント有効</option>
           <option value="friends_fof_only">トモダチとそのトモダチ</option>
           <option value="friends_only">トモダチのみ</option>
           <option value="logged_in">ログインユーザのみ</option>
index a8e753f..c213b94 100644 (file)
@@ -3,10 +3,10 @@ IF item.content_type == 'story'; content_id = item.sid; END;
 IF item.content_type == 'journal'; content_id = item.id; END;
 IF item.content_type == 'submission'; content_id = item.subid; END;
 -%]
-<article type="[% item.content_type %]" item-id="[% content_id %]" [% IF !item.vue_template %]v-if="0"[% END %]>
+<article type="[% item.content_type %]" item-id="[% content_id %]" [% IF !item.x-template %]v-if="0"[% END %]>
   <header>
     <h1>
-      [%- IF item.primary_topic.image.length || item.vue_template -%]
+      [%- IF item.primary_topic.image.length || x-template -%]
       <img [% IF item.primary_topic.image %]src="[% Site.topic_icon_base_url %]/[% item.primary_topic.image %]"[% END %]
            :src="topicIconURL" v-if="topicIconURL" />
       [%- END -%]
@@ -27,7 +27,7 @@ IF item.content_type == 'submission'; content_id = item.subid; END;
       [% IF item.content_type == 'story' %]<span v-text="item.dept">[% item.dept %]</span> 部門より[% END %]
     </div>
     <div class="toolbar">
-      [%- IF item.content_type == 'journal' && item.uid == user.uid || item.vue_template -%]
+      [%- IF item.content_type == 'journal' && item.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>