blob: cf591b735477cc5d2908a470babb7ae2a9f81fa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
<script type="text/javascript">//<![CDATA[
function charCounter( textareaId, counterId, maxLimit ) {ldelim}
document.getElementById( counterId ).value = maxLimit - document.getElementById( textareaId ).value.length;
{rdelim}
//]]></script>
{assign var=serviceEditTpls value=$gLibertySystem->getServiceValues('content_edit_tpl')}
<div class="floaticon">{bithelp}</div>
<div class="admin articles">
<div class="header">
{if $gContent->mArticleId}
<h1>{tr}Edit Article {$gContent->mInfo.title}{/tr}</h1>
{elseif $gBitUser->hasPermission('bit_p_approve_submission') || $gBitUser->hasPermission('bit_p_admin_received_articles') || $gBitUser->hasPermission('bit_p_autoapprove_submission')}
<h1>{tr}Create Article{/tr}</h1>
{else}
<h1>{tr}Submit Article{/tr}</h1>
{/if}
</div>
{if $preview}
<h2>Preview</h2>
<div class="preview">{include file="bitpackage:articles/article_display.tpl"}</div>
{/if}
<div class="body">
{form enctype="multipart/form-data" id="writearticle"}
<input type="hidden" name="article_id" value="{$gContent->mArticleId}" />
{jstabs}
{jstab title="Article Body"}
{legend legend="Article Body"}
<div class="row">
{formlabel label="Title" for="title"}
{forminput}
<input type="text" name="title" id="title" value="{$article.title|escape}" size="50" />
{formhelp note=""}
{/forminput}
</div>
<div class="row">
{formlabel label="Author Name" for="author_name"}
{forminput}
<input type="text" name="author_name" id="author_name" value="{if $article.author_name|escape}{$article.author_name|escape}{else}{$author_name|escape}{/if}" />
{formhelp note=""}
{/forminput}
</div>
<div class="row">
{formlabel label="Topic" for="topic_id"}
{forminput}
<select name="topic_id" id="topic_id">
<option value="">{tr}None{/tr}</option>
{section name=t loop=$topics}
<option value="{$topics[t].topic_id}" {if $article.topic_id eq $topics[t].topic_id}selected="selected"{/if}>{$topics[t].topic_name|escape}</option>
{/section}
</select>
{formhelp note=""}
{/forminput}
</div>
<div class="row">
{formlabel label="Type" for="article_type_id"}
{forminput}
<select id="article_type_id" name="article_type_id">
{section name=t loop=$types}
<option value="{$types[t].article_type_id}" {if $article.article_type_id eq $types[t].article_type_id}selected="selected"{/if}>{tr}{$types[t].type_name}{/tr} {if $types[t].use_ratings eq 'y'}{assign var=rat value=TRUE} [ {tr}uses rating{/tr} ]{/if}</option>
{/section}
</select>
{formhelp note=""}
{/forminput}
</div>
{if $rat}
<div id="ratingedit" class="row">
{formlabel label="Rating" for="rating"}
{forminput}
<select name="rating" id="rating">
<option value="5" {if $article.rating eq 5}selected="selected"{/if}>{tr}5{/tr}</option>
<option value="4" {if $article.rating eq 4}selected="selected"{/if}>{tr}4{/tr}</option>
<option value="3" {if $article.rating eq 3 or !$article.rating}selected="selected"{/if}>{tr}3{/tr}</option>
<option value="2" {if $article.rating eq 2}selected="selected"{/if}>{tr}2{/tr}</option>
<option value="1" {if $article.rating eq 1}selected="selected"{/if}>{tr}1{/tr}</option>
</select>
{formhelp note="Rating is only used when the article type allows it."}{*(we shouldn't use hide since you can't edit this page if you don't have js enabled) (can't get js to enable/disable this as needed)*}
{/forminput}
</div>
{/if}
{include file="bitpackage:liberty/edit_format.tpl"}
{if $gBitSystemPrefs.feature_cms_templates eq 'y' and $gBitUser->hasPermission( 'bit_p_use_content_templates' )}
<div class="row">
{formlabel label="Apply template" for="template"}
{forminput}
<select name="template_id" onchange="javascript:document.getElementById('writearticle').submit();">
<option value="0">{tr}none{/tr}</option>
{section name=ix loop=$templates}
<option value="{$templates[ix].template_id|escape}">{tr}{$templates[ix].name}{/tr}</option>
{/section}
</select>
<noscript>
<input type="submit" value="get template" />
</noscript>
{formhelp note=""}
{/forminput}
</div>
{/if}
{*<div class="row">
{formlabel label="Introduction" for="heading"}
{forminput}
<textarea class="wikiedit" name="description" id="heading" rows="7" cols="80">{$article.description|escape}</textarea>
{formhelp note="The introduction is shown on your articles home page. If you provide text in the body part or this article, a link to the full text will be provided."}
{/forminput}
</div>*}
{if $gBitSystem->isPackageActive( 'quicktags' )}
{include file="bitpackage:quicktags/quicktags_full.tpl"}
{/if}
<div class="row">
{forminput}
<textarea id="{$textarea_id}" name="edit" rows="{$rows|default:20}" cols="{$cols|default:80}"
onkeydown="charCounter('{$textarea_id}','artCounter',{$gBitSystemPrefs.article_description_length})"
onkeyup ="charCounter('{$textarea_id}','artCounter',{$gBitSystemPrefs.article_description_length})"
>{$article.data|escape:html}</textarea>
{capture name=artCount}
{$article.data|count_characters:true}
{/capture}
<input style="float:right" readonly="readonly" type="text" id="artCounter" size="5" value="{$gBitSystemPrefs.article_description_length-$smarty.capture.artCount}" />
{formhelp note="If the article body exceeds the specified maximum body length, a seperate page will be provided with the full body of the article."}
{/forminput}
</div>
{if $cms_spellcheck eq 'y'}
<div class="row">
{formlabel label="Spellcheck" for="spellcheck"}
{forminput}
<input type="checkbox" name="spellcheck" id="spellcheck" {if $spellcheck eq 'y'}checked="checked"{/if} />
{formhelp note=""}
{/forminput}
</div>
{/if}
{if $serviceEditTpls.access_control }
{include file=$serviceEditTpls.access_control"}
{/if}
<div class="row submit">
<input type="submit" name="preview" value="{tr}Preview{/tr}" />
<input type="submit" name="save" value="{tr}Save{/tr}" />
</div>
{/legend}
{/jstab}
{jstab title="Article Dates"}
{legend legend="Publication and Expiration Dates"}
<div class="row">
<input type="hidden" name="publishDateInput" value="1" />
{formlabel label="Publish Date" for=""}
{forminput}
{html_select_date prefix="publish_" time=$gContent->mInfo.publish_date start_year="-5" end_year="+10"} {tr}at{/tr}
<span dir="ltr">{html_select_time prefix="publish_" time=$publish_dateSite display_seconds=false} {$siteTimeZone}</span>
{formhelp note=""}
{/forminput}
</div>
<div class="row">
<input type="hidden" name="expireDateInput" value="1" />
{formlabel label="Expiration Date" for=""}
{forminput}
{html_select_date prefix="expire_" time=$gContent->mInfo.expire_date start_year="-5" end_year="+10"} {tr}at{/tr}
<span dir="ltr">{html_select_time prefix="expire_" time=$expire_dateSite display_seconds=false} {$siteTimeZone}</span>
{formhelp note=""}
{/forminput}
</div>
{/legend}
{/jstab}
{if $serviceEditTpls.categorization }
{jstab title="Categorize"}
{legend legend="Categorize"}
{include file=$serviceEditTpls.categorization"}
{/legend}
{/jstab}
{/if}
{jstab title="Advanced"}
{legend legend="Upload custom article image"}
{*if $gBitSystem->isFeatureActive( 'feature_article__attachments' ) *}
{include file="bitpackage:liberty/edit_storage_list.tpl"}
{*/if*}
{if $gContent->mInfo.image_attachment_id}
<div class="row">
{formlabel label="Own Image"}
{forminput}
<img alt="{tr}Article image{/tr}" border="0" src="{$gContent->mImage.image_url}"/><br />
{formhelp note=""}
{/forminput}
</div>
{/if}
<div class="row">
{formlabel label="Custom Image" for="upload"}
{forminput}
<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
<input type="file" id="upload" name="article_image"/>
{formhelp note="Use a custom image file for the article."}
{/forminput}
</div>
{/legend}
{if $serviceEditTpls.menu}
{legend legend="Insert Link in Menu"}
{include file=$serviceEditTpls.menu"}
{/legend}
{/if}
{/jstab}
{/jstabs}
{/form}
<br /><br />
{include file="bitpackage:liberty/edit_help_inc.tpl"}
</div><!-- end .body -->
</div><!-- end .article -->
|