openrat-cms

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

commit 553b5f4c9642201ef73409c084f51530bd4f916b
parent 4c752d45ea0fab49c47370231f91e866df53de2e
Author: Jan Dankert <devnull@localhost>
Date:   Mon, 15 Oct 2012 00:27:22 +0200

Vorschau für Dateien und Seiten.

Diffstat:
Maction/FileAction.class.php | 6+++---
Maction/FileAction.ini.php | 5++---
Maction/PageAction.class.php | 6+++---
Maction/PageAction.ini.php | 3+--
Mmodel/File.class.php | 2+-
Mmodel/Page.class.php | 8++++----
Athemes/default/templates/file/preview.tpl.src.xml | 13+++++++++++++
Rthemes/default/templates/page/show.tpl.src.xml -> themes/default/templates/page/preview.tpl.src.xml | 0
Athemes/default/templates/template/preview.tpl.src.xml | 13+++++++++++++
9 files changed, 40 insertions(+), 16 deletions(-)

diff --git a/action/FileAction.class.php b/action/FileAction.class.php @@ -114,9 +114,9 @@ class FileAction extends ObjectAction * Anzeigen des Inhaltes, der Inhalt wird samt Header direkt * auf die Standardausgabe geschrieben */ - function showView() + function previewView() { - $this->setTemplateVar('preview_url',Html::url('file','preview',$this->file->objectid,array('target'=>'none') ) ); + $this->setTemplateVar('preview_url',Html::url('file','show',$this->file->objectid,array('target'=>'none') ) ); } @@ -124,7 +124,7 @@ class FileAction extends ObjectAction * Anzeigen des Inhaltes, der Inhalt wird samt Header direkt * auf die Standardausgabe geschrieben */ - function previewView() + function showView() { $this->lastModified( $this->file->lastchangeDate ); diff --git a/action/FileAction.ini.php b/action/FileAction.ini.php @@ -2,10 +2,9 @@ [default] goto=show -[show] -menu=edit - [preview] + +[show] direct=true [edit] diff --git a/action/PageAction.class.php b/action/PageAction.class.php @@ -623,15 +623,15 @@ class PageAction extends ObjectAction /** * Seite anzeigen */ - function showView() + function previewView() { - $this->setTemplateVar('preview_url',Html::url('page','preview',$this->page->objectid,array('target'=>'none') ) ); + $this->setTemplateVar('preview_url',Html::url('page','show',$this->page->objectid,array('target'=>'none') ) ); } /** * Seite anzeigen */ - function previewView() + function showView() { // Seite definieren $this->page->load(); diff --git a/action/PageAction.ini.php b/action/PageAction.ini.php @@ -10,10 +10,9 @@ goto=show ;target=prop [show] -menu=elements +direct=true [preview] -direct=true [edit] direct=true diff --git a/model/File.class.php b/model/File.class.php @@ -663,7 +663,7 @@ EOF if ( $this->tmpfile == '' ) { $db = db_connection(); - $this->tmpfile = $this->getTempDir().'openrat_db'.$db->id.'_'.$this->objectid.'.tmp'; + $this->tmpfile = $this->getTempFileName( array('db'=>$db->id,'o'.$this->objectid) ); } return $this->tmpfile; } diff --git a/model/Page.class.php b/model/Page.class.php @@ -257,11 +257,11 @@ class Page extends Object switch( $object->getType() ) { case 'file': - $inhalt = Html::url('file','preview',$objectid,$param); + $inhalt = Html::url('file','show',$objectid,$param); break; case 'page': - $inhalt = Html::url('page','preview',$objectid,$param); + $inhalt = Html::url('page','show',$objectid,$param); break; case 'link': @@ -276,11 +276,11 @@ class Page extends Object switch( $linkedObject->getType() ) { case 'file': - $inhalt = Html::url('file','preview',$link->linkedObjectId,$param); + $inhalt = Html::url('file','show',$link->linkedObjectId,$param); break; case 'page': - $inhalt = Html::url('page','preview',$link->linkedObjectId,$param); + $inhalt = Html::url('page','show',$link->linkedObjectId,$param); break; } } diff --git a/themes/default/templates/file/preview.tpl.src.xml b/themes/default/templates/file/preview.tpl.src.xml @@ -0,0 +1,12 @@ +<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"> + <insert url="var:preview_url"></insert> + <link class="action" action="file" subaction="edit"> + <image file="icon/edit"></image> + <text key="menu_file_edit"></text> + </link> + <link class="action" action="file" subaction="editvalue"> + <image file="icon/editvalue"></image> + <text key="menu_file_editvalue"></text> + </link> +</output> +\ No newline at end of file diff --git a/themes/default/templates/page/show.tpl.src.xml b/themes/default/templates/page/preview.tpl.src.xml diff --git a/themes/default/templates/template/preview.tpl.src.xml b/themes/default/templates/template/preview.tpl.src.xml @@ -0,0 +1,12 @@ +<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"> + <insert url="var:preview_url"></insert> + <link class="action" action="file" subaction="edit"> + <image file="icon/edit"></image> + <text key="menu_file_edit"></text> + </link> + <link class="action" action="file" subaction="editvalue"> + <image file="icon/editvalue"></image> + <text key="menu_file_editvalue"></text> + </link> +</output> +\ No newline at end of file