root/websites/limilic/trunk/root/src/create.tt2 @ 2024

Revision 2024, 4.5 kB (checked in by kazeburo, 7 years ago)

websites/limilic: jsのリファクタ

Line 
1[% USE FillInForm %]
2[% FILTER fillinform fobject => Catalyst.req %]
3
4<form action="[% Catalyst.uri_for('/create/do') %]" method="post" id="create">
5
6[% IF Catalyst.form.has_error %]
7<ul class="dfv_err">
8[% FOREACH message IN Catalyst.form.messages('create/do') %]
9<li>[% message | html %]</li>
10[% END %]
11</ul>
12[% END %]
13
14<fieldset>
15
16<h3>新規作成</h3>
17
18<div class="article_title_wrap"><input type="text" size="10" name="title" id="article_title_input" /></div>
19
20<ul class="mtab">
21<li><span class="article_body_tab_menu" id="article_tab_edit">本文</span></li><li><span class="article_body_tab_menu" id="article_tab_preview">プレビュー</span></li>
22</ul>
23
24<div class="mtab_body">
25<div class="mtab_body_content" id="article_tab_edit_content">
26<textarea name="body" rows="20" cols="90" id="article_body_edit_area"></textarea>
27</div>
28<div class="mtab_body_content" id="article_tab_preview_content" style="display:none;">
29<div id="article_body_preview_area" class="entry"> </div>
30</div>
31</div>
32
33<p>*一部の記法を除いて、<a href="http://hatenadiary.g.hatena.ne.jp/keyword/%e3%81%af%e3%81%a6%e3%81%aa%e8%a8%98%e6%b3%95%e4%b8%80%e8%a6%a7">はてな記法</a>が使えます</p>
34
35</fieldset>
36
37<fieldset>
38
39<h3>共有</h3>
40
41<ul class="mtab">
42<li><span class="acl_tab_menu" id="acl_tab_view">閲覧設定</span></li><li><span class="acl_tab_menu" id="acl_tab_modify">編集設定</span></li><li><span class="acl_tab_menu" id="acl_tab_anonymous">ID表示</span></li>
43</ul>
44
45<div class="mtab_body">
46
47<div class="mtab_body_content" id="acl_tab_view_content">
48
49<ul class="acl_mode_list">
50<li><label><input type="radio" name="acl_view_mode" value="1" /> 全員</label></li>
51<li><label><input type="radio" name="acl_view_mode" value="2" /> 自分のみ</label></li>
52<li><label><input type="radio" name="acl_view_mode" value="3" /> 以下のOpenID</label></li>
53</ul>
54
55<div class="acl_custom_wrap" id="acl_view_custom">
56<div class="acl_custom_select_wrap" id="acl_view_custom_wrap">
57<ul>
58[% FOREACH user_network IN Catalyst.stash.user_networks -%]
59<li><label><input type="checkbox" name="acl_custom_view_openid" value="[% user_network.openid | html %]" /> [% user_network.openid | html %]</label></li>
60[% END -%]
61</ul>
62[% IF user_networks.size == 0 %]
63<p class="no_custom_warning">下のフォームからOpenIDを入力してください</p>
64[% END %]
65</div>
66
67<div class="acl_custom_add_wrap">
68<div class="acl_custom_add_button_wrap"><input type="button" value="追加" id="acl_view_custom_add_button" /></div>
69<div class="acl_custom_add_text_wrap"><input type="text" size="10" name="acl_view_custom_add_text" id="acl_view_custom_add_text" /></div>
70<div class="clr"></div>
71</div>
72
73</div>
74</div>
75
76<div class="mtab_body_content" id="acl_tab_modify_content">
77
78<ul class="acl_mode_list">
79<li><label><input type="radio" name="acl_modify_mode" value="2" /> 自分のみ</label></li>
80<li><label><input type="radio" name="acl_modify_mode" value="3" /> 以下のOpenID</label></li>
81<li><label><input type="radio" name="acl_modify_mode" value="4" /> OpenIDで認証された全員</label></li>
82</ul>
83
84<div class="acl_custom_wrap" id="acl_modify_custom">
85<div class="acl_custom_select_wrap" id="acl_modify_custom_wrap">
86<ul>
87[% FOREACH user_network IN user_networks -%]
88<li><label><input type="checkbox" name="acl_custom_modify_openid" value="[% user_network.openid | html %]" /> [% user_network.openid | html %]</label></li>
89[% END -%]
90</ul>
91[% IF user_networks.size == 0 %]
92<p class="no_custom_warning">下のフォームからOpenIDを入力してください</p>
93[% END %]
94</div>
95
96<div class="acl_custom_add_wrap">
97<div class="acl_custom_add_button_wrap"><input type="button" value="追加" id="acl_modify_custom_add_button" /></div>
98<div class="acl_custom_add_text_wrap"><input type="text" size="10" name="acl_modify_custom_add_text" id="acl_modify_custom_add_text" /></div>
99<div class="clr"></div>
100</div>
101</div>
102
103</div>
104
105<div class="mtab_body_content" id="acl_tab_anonymous_content">
106<ul class="acl_mode_list">
107<li><label><input type="radio" name="anonymous" value="0" /> 表示する</label></li>
108<li><label><input type="radio" name="anonymous" value="1" /> 表示しない</label></li>
109</ul>
110</div>
111
112</div>
113</fieldset>
114
115<div id="create_page_submit">
116<input value="作 成" type="submit">
117</div>
118
119</form>
120
121[% END %]
122
123[% pagejs = BLOCK %]
124new Cpip.tabPreview( 'article_tab_preview', 'article_body_edit_area', 'article_body_preview_area' );
125new Cpip.tabCtrl('article_body_tab_menu');
126new Cpip.aclCustom('view');
127new Cpip.aclCustom('modify');
128new Cpip.tabCtrl('acl_tab_menu')
129[% END %]
Note: See TracBrowser for help on using the browser.