Changeset 1096:3c0cfbe684cc for themes/ductile
- Timestamp:
- 01/19/13 12:20:15 (13 years ago)
- Branch:
- default
- Location:
- themes/ductile
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_config.php
r1081 r1096 229 229 'subtitle_hidden' => null, 230 230 'logo_src' => null, 231 'preview_not_mandatory' => null, 231 232 // CSS 232 233 'body_font' => null, … … 337 338 $ductile_user['subtitle_hidden'] = (integer) !empty($_POST['subtitle_hidden']); 338 339 $ductile_user['logo_src'] = $_POST['logo_src']; 340 $ductile_user['preview_not_mandatory'] = (integer) !empty($_POST['preview_not_mandatory']); 339 341 340 342 $ductile_stickers = array(); … … 510 512 echo '</fieldset>'; 511 513 514 echo '<fieldset><legend>'.__('Miscellaneous options').'</legend>'; 515 echo '<p class="field"><label for="preview_not_mandatory">'.__('Comment preview is not mandatory:').' '. 516 form::checkbox('preview_not_mandatory',1,$ductile_user['preview_not_mandatory']).'</label>'.'</p>'; 517 echo '</fieldset>'; 518 512 519 echo '<input type="hidden" name="conf_tab" value="html">'; 513 520 echo '<p class="clear">'.form::hidden('ds_order','').'<input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>'; -
themes/ductile/_public.php
r1081 r1096 23 23 $core->tpl->addValue('ductileNbEntryPerPage',array('tplDuctileTheme','ductileNbEntryPerPage')); 24 24 $core->tpl->addValue('ductileLogoSrc',array('tplDuctileTheme','ductileLogoSrc')); 25 $core->tpl->addBlock('IfPreviewIsNotMandatory',array('tplDuctileTheme','IfPreviewIsNotMandatory')); 25 26 26 27 class tplDuctileTheme … … 175 176 176 177 return $img_url; 178 } 179 180 public static function IfPreviewIsNotMandatory($attr,$content) 181 { 182 $s = $GLOBALS['core']->blog->settings->themes->get($GLOBALS['core']->blog->settings->system->theme.'_style'); 183 if ($s !== null) { 184 $s = @unserialize($s); 185 if (is_array($s)) { 186 if (isset($s['preview_not_mandatory'])) { 187 if ($s['preview_not_mandatory']) { 188 return $content; 189 } 190 } 191 } 192 } 193 return ''; 177 194 } 178 195 -
themes/ductile/locales/fr/admin.po
r1081 r1096 64 64 msgid "Full" 65 65 msgstr "Complet" 66 67 msgid "Miscellaneous options" 68 msgstr "Options diverses" 69 70 msgid "Comment preview is not mandatory:" 71 msgstr "Prévisualisation du commentaire optionnelle :" 66 72 67 73 msgid "Presentation" -
themes/ductile/tpl/_simple-entry.html
r881 r1096 164 164 <p class="buttons"> 165 165 <input type="submit" class="preview" name="preview" value="{{tpl:lang preview}}" /> 166 <tpl:If CommentPreview>166 <tpl:IfPreviewIsNotMandatory> 167 167 <input type="submit" class="submit" value="{{tpl:lang send}}" /> 168 </tpl:If CommentPreview>168 </tpl:IfPreviewIsNotMandatory> 169 169 </p> 170 170 </fieldset>
Note: See TracChangeset
for help on using the changeset viewer.