Added features:
[mir.git] / templates / admin / content.template
1 <html>
2 <head>
3   <title>${lang("content.htmltitle")}</title>
4   <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css"
5 </head>
6
7 <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
8
9 <include "FUNCTIONS.template">
10 <include "head.template">
11
12 <if new=="0">
13   <table width="100%" cellspacing="0" cellpadding="5">
14       <tr>
15         <td align="left" valign="top">
16             <call showGETButton(
17               "module=Comment&do=articlecomments&articleid="+article.id+"&returnurl="+utility.encodeURI(thisurl),
18               lang("content.comments"))>
19         </td>
20         <td align="right" valign="top">
21           <if article.is_locked=="1" && article.lockinguser>
22             ${lang("content.lockedby", article.lockinguser.login)}
23           </if>
24
25           <if mayLock=="1">
26             <form method="post" action="${config.actionRoot}">
27               <input type="hidden" name="module" value="Content">
28               <input type="hidden" name="id" value="${utility.encodeHTML(article.id)}">
29               <input type="hidden" name="returnurl" value="${utility.encodeURI(thisurl)}">
30               <input type="hidden" name="do" value="lock">
31               <input type="submit" class="majorbutton" name="lock" value="${lang("content.lock")}">
32             </form>
33           </if>
34           <if mayUnlock=="1">
35             <form method="post" action="${config.actionRoot}">
36               <input type="hidden" name="module" value="Content">
37               <input type="hidden" name="id" value="${utility.encodeHTML(article.id)}">
38               <input type="hidden" name="returnurl" value="${utility.encodeURI(thisurl)}">
39               <input type="hidden" name="do" value="unlock">
40               <input type="submit" class="majorbutton" name="unlock" value="${lang("content.unlock")}">
41             </form>
42           </if>
43           <if mayForceLock=="1">
44             <form method="post" action="${config.actionRoot}">
45               <input type="hidden" name="module" value="Content">
46               <input type="hidden" name="id" value="${utility.encodeHTML(article.id)}">
47               <input type="hidden" name="returnurl" value="${utility.encodeURI(thisurl)}">
48               <input type="hidden" name="do" value="forcelock">
49               <input type="submit" class="majorbutton" name="fotcelock" value="${lang("content.forcelock")}">
50             </form>
51           </if>
52         </td>
53       </tr>
54   </table>
55 </if>
56
57 <if mayEdit=="1">
58 <form method="post" action="${config.actionRoot}">
59   <input type="hidden" name="module" value="Content">
60   <input type="hidden" name="id" value="${utility.encodeHTML(article.id)}">
61   <input type="hidden" name="returnurl" value="${utility.encodeHTML(returnurl)}">
62   <if new=="1">
63     <input type="hidden" name="do" value="insert">
64   <else>
65     <input type="hidden" name="do" value="update">
66   </if>
67 </if>  
68
69 <table width="100%" cellspacing="0" cellpadding="5">
70   <tr>
71     <td align="left" valign="top">
72       <if new=="0">
73         <list article.operations as op>
74           <call showPOSTButton(
75             "module=Localizer&do=articleoperation&operation="+op+"&articleid="+article.id+"&returnurl="+utility.encodeURI(thisurl), 
76             lang("content.operation."+op))>
77         </list>
78       </if>
79     </td>
80     <td align="right" valign="top">
81       ${lang("content.published")} :
82       <if mayEdit=="1">
83         <input type="checkbox" name="is_published" value="1"<if article.is_published!="0" && article.is_published!=""> checked</if>>
84         <if new=="1">
85           <input type="submit" class="majorbutton" name="save" value="${lang("insert")}">
86         <else>
87           <input type="submit" class="majorbutton" name="save" value="${lang("save")}">
88         </if>
89       <else>
90         <if article.is_published!="0" && article.is_published!="">${lang("yes")}<else>${lang("no")}</if>
91       </if>
92     </td>
93   </tr>
94 </table>
95 <table width="100%" cellspacing="3" cellpadding="2">
96   <tr>
97     <td align="right" class="table-left" width="30%">
98       id # :
99     </td>
100     <td class="listrow2">
101       ${article.id}
102     </td>
103   </tr>
104   
105   <tr>
106     <td align="right" class="table-left">
107       ${lang("content.lastchange_date")}:
108     </td>
109     <td class="listrow2">
110       ${utility.encodeHTML(article.changedate.format(config["Mir.DefaultDateTimeFormat"]))}<br>
111     </td>
112   </tr>
113
114   <tr>
115     <td align="right" valign="top" class="table-left">
116       ${lang("content.create_date")}:
117     </td>
118     <td class="listrow2">
119       ${utility.encodeHTML(article.creationdate.format(config["Mir.DefaultDateTimeFormat"]))}
120       <if mayEdit=="1">
121         <br>${lang("edit")}:
122         <input type="text" size="10" maxlength="16" name="webdb_create" value=""> &nbsp; <span class="small">(yyyy-mm-dd [HH:mm])</span>
123       </if>
124     </td>
125   </tr>
126
127   <call _PulldownTableRow (lang("content.articletype"), "to_article_type", articletypes, "id", "name", article.to_article_type, "articletypes.", mayEdit)>
128   <call _PulldownTableRow (lang("content.language"), "to_language", languages, "id", "name", article.to_language, "", mayEdit)>
129   
130   <list topics as r>
131     <tr>
132       <td align="right" valign="top" class="table-left">
133         ${lang(r.key)}:
134       </td>
135       <td class="listrow2">
136         <if mayEdit=="1">
137           <if r.listtype=="1">
138             <table border=0 cellpadding="2" cellspacing="0">
139               <tr> 
140                 <assign col=r.listparameter>
141                 <list r.items as t>
142                   <if col=="0">
143               </tr>
144               <tr>
145                 <assign col=r.listparameter>
146                   </if>
147                 <td title="${utility.encodeHTML(t.description)}">
148                   <input type="checkbox" name="to_topic" value="${t.id}" <list article.to_topics as to><if (t.id == to["id"])>checked</if></list>>
149                   <span class="small"> ${t.title}</span>
150                 </td>
151                 <assign col=utility.increment(col, "-1")>
152                 </list>
153                   <if col!="0">
154                     <td colspan="${col}">
155                       &nbsp;
156                     </td>
157                   </if>
158               </tr>
159             </table>
160           <else>
161             <if r.listtype=="0">
162               <select name="to_topic" size="r.listparameter" multiple>
163                         <list r.items as t>
164                           <option value="${t.id}" <list article.to_topics as to><if (t.id == to["id"])>selected</if></list>>${t.title}</option>
165                 </list>
166               </select>
167             <else>
168               <select name="to_topic" size="1">
169                         <list r.items as t>
170                           <option value="${t.id}" <list article.to_topics as to><if (t.id == to["id"])>selected</if></list>>${t.title}</option>
171                 </list>
172               </select>
173             </if>
174           </if>
175         <else>
176                 <list r.items as t>
177                   <list article.to_topics as to><if (t.id == to["id"])>${t.title} <br/> </if></list>
178           </list>
179         </if>
180       </td>
181     </tr>
182   </list>
183   
184   
185   <call _TextInputTableRow      (lang("content.title"), 40, 255, "title", article.title, mayEdit)>
186   <call _TextInputTableRowLight (lang("content.subtitle"), 40, 255, "subtitle", article.subtitle, mayEdit)>
187   <call _TextInputTableRowLight (lang("content.edittitle"), 40, 255, "edittitle", article.edittitle, mayEdit)>
188   <call _TextInputTableRowLight (lang("content.location"), 40, 255, "source", article.source, mayEdit)>
189   <call _TextInputTableRow      (lang("content.creator"), 40, 80, "creator", article.creator, mayEdit)>
190   <call _TextInputTableRowLight (lang("content.creator.email"), 40, 80, "creator_email", article.creator_email, mayEdit)>
191   <call _TextInputTableRowLight (lang("content.creator.url"), 40, 255, "creator_main_url", article.creator_main_url, mayEdit)>
192   <call _TextInputTableRowLight (lang("content.creator.address"), 20, 80, "creator_address", article.creator_address, mayEdit)>
193   <call _TextInputTableRowLight (lang("content.creator.telephone"), 20, 20, "creator_phone", article.creator_phone, mayEdit)>
194   <call _CheckboxTableRow       (lang("content.html"), "is_html", article.is_html, mayEdit)>
195   <call _TextAreaTableRow       (lang("content.abstract"), "", 70, 15, "description", article.description, mayEdit)>
196   <call _TextAreaTableRow       (lang("content.content"), "", 70, 20, "content_data", article.content_data, mayEdit)>
197   <call _TextAreaTableRow       (lang("content.comment"), lang("content.internal"), 70, 6, "comment", article.comment, mayEdit)>
198   <call _TextAreaTableRow       (lang("content.keywords"), "", 70, 4, "keywords", article.keywords, mayEdit)>
199
200   <if mayEdit=="1">
201     <tr>
202       <td colspan="2" align="right" valign="top">
203         <if new=="1">
204           <input type="submit" class="majorbutton" name="save" value="${lang("insert")}">
205         <else>
206           <input type="submit" class="majorbutton" name="save" value="${lang("save")}">
207         </if>
208       </td>
209     </tr>
210   </if>    
211 </table>
212   
213 <if new=="0">
214   <table width="90%" cellspacing="0" cellpadding="0">
215   
216   <tr>
217     <td align="left" valign="top">
218     
219     <table cellspacing="3" cellpadding="2">
220       <tr>
221         <td class="table-head" colspan="2">
222           ${lang("content.family")}
223         </td>
224       </tr>
225         
226       <tr>
227         <td align=right valign=top class="table-left">
228           ${lang("content.parent")}:
229         </td>
230         <td align="left" valign="top" class="listrow2">
231           <if article.parent>
232             <b>${utility.encodeHTML(article.parent.title)}</b><br>
233             <a href="${config.actionRoot}?module=Content&do=edit&id=${article.parent.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("content.viewparent")}</a> |
234             <a href="${config.actionRoot}?module=Content&do=clearparent&id=${article.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("content.clearparent")}</a> |
235           </if>
236           <if mayEdit=="1">
237             &nbsp;<a href="${config.actionRoot}?module=Content&do=selectparent&id=${article.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("content.selectparent")}</a>
238           </if>
239         </td>
240       </tr>
241         
242       <tr>
243         <td align=right valign=top class="table-left">
244           ${lang("content.children")}:
245         </td>
246         <td align="left" valign="top" class="listrow2">
247           <a href="${config.actionRoot}?module=Content&do=listchildren&article_id=${article.id}">${lang("content.viewchildren")}</a>
248         </td>
249       </tr>
250     </table>
251   </td>
252     <td align="right" valign="top">
253       <call showArticleAttachments(article, mayEdit)>
254     </td>
255   </tr>
256 </table>
257
258 </if>          
259 <if mayEdit=="1">
260   </form>
261 </if>  
262
263   <include "foot.template">
264 </body>
265 </html>