openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 42f841994eff2e740a8c725e4146fae9b515bd61
parent 4df775cffb71053b21f6ba52fc79a135d63794ca
Author: Jan Dankert <devnull@localhost>
Date:   Mon, 15 Oct 2012 01:16:03 +0200

Veröffentlichen auch über einen Seiteninhalt möglich.

Diffstat:
Maction/PageelementAction.class.php | 43++++++++++++++++++++++++++++++++++++++++++-
Athemes/default/templates/pageelement/pub.tpl.src.xml | 20++++++++++++++++++++
2 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/action/PageelementAction.class.php b/action/PageelementAction.class.php @@ -1457,6 +1457,46 @@ class PageelementAction extends Action else return intval($text); } + + /** + * Seite veroeffentlichen + * + * Es wird ein Formular angzeigt, mit dem die Seite veroeffentlicht + * werden kann + */ + public function pubView() + { } - ?> + + + /** + * Seite veroeffentlichen + * + * Die Seite wird generiert. + */ + function pubPost() + { + if ( !$this->page->hasRight( ACL_PUBLISH ) ) + Http::notAuthorized( 'no right for publish' ); + + $this->page->public = true; + $this->page->publish(); + $this->page->publish->close(); + +// foreach( $this->page->publish->publishedObjects as $o ) +// { +// $this->addNotice($o['type'],$o['full_filename'],'PUBLISHED','ok'); +// } + + $this->addNotice( 'page', + $this->page->fullFilename, + 'PUBLISHED'.($this->page->publish->ok?'':'_ERROR'), + $this->page->publish->ok, + array(), + $this->page->publish->log ); + } + +} + +?> +\ No newline at end of file diff --git a/themes/default/templates/pageelement/pub.tpl.src.xml b/themes/default/templates/pageelement/pub.tpl.src.xml @@ -0,0 +1,19 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <group title="message:options"> + + <part class="line"> + <part class="label"> + </part> + <part class="input"> + <checkbox name="files"></checkbox> + <label for="files"> + <text text="global_files"></text> + </label> + </part> + </part> + + </group> + </form> +</output> +\ No newline at end of file