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