From: Hendrik B. <nh...@us...> - 2011-06-16 20:08:48
|
Update of /cvsroot/arianne/stendhal_website/content/association In directory vz-cvs-4.sog:/tmp/cvs-serv3846/content/association Modified Files: main.php de.php edit.php Log Message: added displaytitle so that German pages can get a heading in German Index: main.php =================================================================== RCS file: /cvsroot/arianne/stendhal_website/content/association/main.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** main.php 14 Jun 2011 21:04:25 -0000 1.5 --- main.php 16 Jun 2011 20:08:46 -0000 1.6 *************** *** 41,49 **** function writeContent() { global $lang; ! $title = $_REQUEST['title']; ! if ($title == '') { ! $title = 'Faiumoni'; ! } ! startBox(htmlspecialchars(ucfirst($title))); if ($this->cmsPage != null) { echo $this->cmsPage->content; --- 41,45 ---- function writeContent() { global $lang; ! startBox(htmlspecialchars($this->cmsPage->displaytitle)); if ($this->cmsPage != null) { echo $this->cmsPage->content; Index: edit.php =================================================================== RCS file: /cvsroot/arianne/stendhal_website/content/association/edit.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** edit.php 6 Jun 2011 20:07:03 -0000 1.4 --- edit.php 16 Jun 2011 20:08:46 -0000 1.5 *************** *** 53,59 **** --- 53,70 ---- } + echo '<form method="POST">'; startBox(t('Editing').' '.htmlspecialchars(ucfirst($title))); echo '<p>'.t('Please skip Heading 1 and start with Heading 2.').'</p>'; echo '<p>'.t('Back to article').' <a href="'.rewriteURL('/'.$lang.'/'.urlencode($_REQUEST['title']).'.html').'">'.htmlspecialchars(ucfirst($title)).'</a></p>'; + $displaytitle = ''; + if (isset($_POST['displaytitle'])) { + $displaytitle = $_POST['displaytitle']; + } else if ($this->cmsPage != null) { + $displaytitle = $this->cmsPage->displaytitle; + } else { + $displaytitle = $_REQUEST['title']; + } + echo '<label for="displaytitle">'.t('Display title').': </label><input name="displaytitle" value="'.htmlspecialchars($displaytitle).'" style="width:99%"><br>'; + echo '<label for="commitcomment">'.t('Commit comment').': </label><input name="commitcomment" style="width:99%">'; endBox(); *************** *** 65,73 **** endBox(); } else { ! CMS::save($lang, $_REQUEST['title'], $html, $_REQUEST['commitcomment'], $_SESSION['account']->id); } } ! echo '<form method="POST">'; echo '<input name="csrf" type="hidden" value="'.htmlspecialchars($_SESSION['csrf']).'">'; echo '<textarea id="editor" name="editor" style="width:100%; height:30em">'; --- 76,84 ---- endBox(); } else { ! CMS::save($lang, $_REQUEST['title'], $html, $_REQUEST['commitcomment'], $_REQUEST['displaytitle'], $_SESSION['account']->id); } } ! echo '<input name="csrf" type="hidden" value="'.htmlspecialchars($_SESSION['csrf']).'">'; echo '<textarea id="editor" name="editor" style="width:100%; height:30em">'; *************** *** 78,82 **** } echo '</textarea>'; - echo '<input name="commitcomment" style="width:100%">'; echo '</form>'; } --- 89,92 ---- Index: de.php =================================================================== RCS file: /cvsroot/arianne/stendhal_website/content/association/de.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** de.php 15 Jun 2011 21:33:59 -0000 1.2 --- de.php 16 Jun 2011 20:08:46 -0000 1.3 *************** *** 37,39 **** --- 37,42 ---- $dict['Last edited on'] = 'Zuletzt geändert am'; $dict['by account'] = 'durch Benutzer'; + $dict['Display title'] = 'Anzeigetitel'; + $dict['Commit comment'] = 'Ãnderungskommentar'; + } |