openrat-cms

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

commit 2ac766d89f49af85e9c6f205c7bf35047589770a
parent f45d22b9e9662929f7794568b9047ce80ea3eebe
Author: Jan Dankert <devnull@localhost>
Date:   Tue,  6 Mar 2012 22:31:52 +0100

Neue View \"Info\" für Seiten,Dateien,Ordner,Verknüpfungen

Diffstat:
action/FileAction.class.php | 38++++++++++++++++++++++++++++++++++++++
action/FolderAction.class.php | 5+++++
action/LinkAction.class.php | 7+++++++
action/PageAction.class.php | 30++++++++++++++++++++++++++++++
themes/default/templates/file/info.tpl.src.xml | 150+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/file/prop.tpl.src.xml | 109-------------------------------------------------------------------------------
themes/default/templates/folder/info.tpl.src.xml | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/folder/prop.tpl.src.xml | 51---------------------------------------------------
themes/default/templates/link/info.tpl.src.xml | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/link/prop.tpl.src.xml | 43-------------------------------------------
themes/default/templates/page/info.tpl.src.xml | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/page/prop.tpl.src.php | 1+
12 files changed, 506 insertions(+), 203 deletions(-)

diff --git a/action/FileAction.class.php b/action/FileAction.class.php @@ -334,6 +334,44 @@ class FileAction extends ObjectAction } + public function infoView() + { + + global $conf; + + if ( $this->file->filename == $this->file->objectid ) + $this->file->filename = ''; + + // Eigenschaften der Datei uebertragen + $this->setTemplateVars( $this->file->getProperties() ); + + $this->setTemplateVar('size',number_format($this->file->size/1000,0,',','.').' kB' ); + $this->setTemplateVar('full_filename',$this->file->full_filename()); + + if ( is_file($this->file->tmpfile())) + { + $this->setTemplateVar('cache_filename' ,$this->file->tmpfile()); + $this->setTemplateVar('cache_filemtime',@filemtime($this->file->tmpfile())); + } + + // Alle Seiten mit dieser Datei ermitteln + $pages = $this->file->getDependentObjectIds(); + + $list = array(); + foreach( $pages as $id ) + { + $o = new Object( $id ); + $o->load(); + $list[$id] = array(); + $list[$id]['url' ] = Html::url('main','page',$id); + $list[$id]['name'] = $o->name; + } + asort( $list ); + $this->setTemplateVar('pages',$list); + $this->setTemplateVar('edit_filename',$conf['filename']['edit']); + } + + /** * Anzeigen des Inhaltes */ diff --git a/action/FolderAction.class.php b/action/FolderAction.class.php @@ -1186,6 +1186,11 @@ class FolderAction extends ObjectAction function propView() { $this->setTemplateVars( $this->folder->getProperties() ); + } + + function infoView() + { + $this->setTemplateVars( $this->folder->getProperties() ); $this->setTemplateVar( 'full_filename',$this->folder->full_filename() ); } diff --git a/action/LinkAction.class.php b/action/LinkAction.class.php @@ -193,4 +193,11 @@ class LinkAction extends ObjectAction $this->setTemplateVars( $this->link->getProperties() ); $this->setTemplateVar('act_linkobjectid',$this->link->linkedObjectId); } + + + + function infoView() + { + $this->setTemplateVars( $this->link->getProperties() ); + } } \ No newline at end of file diff --git a/action/PageAction.class.php b/action/PageAction.class.php @@ -373,6 +373,36 @@ class PageAction extends ObjectAction /** + * Die Eigenschaften der Seite anzeigen + */ + function infoView() + { + $this->setTemplateVar('id',$this->page->objectid); + + $this->page->public = true; + $this->page->load(); + $this->page->full_filename(); + + if ( $this->page->filename == $this->page->objectid ) + $this->page->filename = ''; + + $this->setTemplateVars( $this->page->getProperties() ); + + if ( $this->userIsAdmin() ) + { + $this->setTemplateVar('template_url',Html::url('main','template',$this->page->templateid)); + } + + $template = new Template( $this->page->templateid ); + $template->load(); + $this->setTemplateVar('template_name',$template->name); + + + } + + + + /** * Die Vorlage der Seite austauschen * * Die Vorlage wird ausgetauscht, die Inhalte werden gemaess der Benutzereingaben kopiert diff --git a/themes/default/templates/file/info.tpl.src.xml b/themes/default/templates/file/info.tpl.src.xml @@ -0,0 +1,149 @@ +<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> + <fieldset> + <part class="line"> + <part class="label"> + <text text="global_name"></text> + </part> + <part class="input"> + <text var="name" class="name" /> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="global_filename"></text> + </part> + <part class="input"> + <text var="filename" class="filename" /> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="file_extension"></text> + </part> + <part class="input"> + <text var="extension" class="extension" /> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="global_description"></text> + </part> + <part class="input"> + <text var="description" /> + </part> + </part> + </fieldset> + + <fieldset title="message:additional_info"> + <part class="line"> + <part class="label"> + <label for="full_filename"> + <text text="global_full_filename"></text> + </label> + </part> + <part class="input"> + <text var="full_filename"></text> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="size"> + <text text="FILE_SIZE"></text> + </label> + </part> + <part class="input"> + </part> + <text var="size"></text> + </part> + <part class="line"> + <part class="label"> + <label for="mimetype"> + <text text="FILE_mimetype"></text> + </label> + </part> + <part class="input"> + <text var="mimetype"></text> + <newline></newline> + <link class="action" action="file" subaction="size"> + <text key="menu_file_size"></text> + </link> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="message:id"></text> + </part> + <part class="input"> + <text var="objectid"></text> + </part> + </part> + <if present="cache_filename"> + <part class="line"> + <part class="label"> + <label for="cache_filename"> + <text text="CACHE_FILENAME"></text> + </label> + </part> + <part class="input"> + <text var="cache_filename"></text> + <newline></newline> + <image icon="el_date"></image> + <date date="var:cache_filemtime"></date> + </part> + </part> + </if> + <part class="line"> + <part class="label"> + <label for="pages"> + <text text="FILE_PAGES"></text> + </label> + </part> + <part class="input"> + <table> + <list list="pages" extract="true"> + <row> + <cell> + <link url="var:url" target="cms_main"> + <image type="page"></image> + <text var="name"></text> + </link> + </cell> + </row> + </list> + </table> + <if empty="pages"> + <text text="GLOBAL_NOT_FOUND"></text> + </if> + </part> + </part> + </fieldset> + <fieldset title="message:prop_userinfo"> + <part class="line"> + <part class="label"> + <text text="global_created"></text> + </part> + <part class="input"> + <image icon="el_date"></image> + <date date="var:create_date"></date> + <newline></newline> + <image icon="user"></image> + <user user="var:create_user"></user> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="global_lastchange"></text> + </part> + <part class="input"> + <image icon="el_date"></image> + <date date="var:lastchange_date"></date> + <newline></newline> + <image icon="user"></image> + <user user="var:lastchange_user"></user> + </part> + </part> + </fieldset> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/file/prop.tpl.src.xml b/themes/default/templates/file/prop.tpl.src.xml @@ -44,115 +44,6 @@ </part> </fieldset> - <fieldset title="message:additional_info"> - <part class="line"> - <part class="label"> - <label for="full_filename"> - <text text="global_full_filename"></text> - </label> - </part> - <part class="input"> - <text var="full_filename"></text> - </part> - </part> - <part class="line"> - <part class="label"> - <label for="size"> - <text text="FILE_SIZE"></text> - </label> - </part> - <part class="input"> - </part> - <text var="size"></text> - </part> - <part class="line"> - <part class="label"> - <label for="mimetype"> - <text text="FILE_mimetype"></text> - </label> - </part> - <part class="input"> - <text var="mimetype"></text> - <newline></newline> - <link class="action" action="file" subaction="size"> - <text key="menu_file_size"></text> - </link> - </part> - </part> - <part class="line"> - <part class="label"> - <text text="message:id"></text> - </part> - <part class="input"> - <text var="objectid"></text> - </part> - </part> - <if present="cache_filename"> - <part class="line"> - <part class="label"> - <label for="cache_filename"> - <text text="CACHE_FILENAME"></text> - </label> - </part> - <part class="input"> - <text var="cache_filename"></text> - <newline></newline> - <image icon="el_date"></image> - <date date="var:cache_filemtime"></date> - </part> - </part> - </if> - <part class="line"> - <part class="label"> - <label for="pages"> - <text text="FILE_PAGES"></text> - </label> - </part> - <part class="input"> - <table> - <list list="pages" extract="true"> - <row> - <cell> - <link url="var:url" target="cms_main"> - <image type="page"></image> - <text var="name"></text> - </link> - </cell> - </row> - </list> - </table> - <if empty="pages"> - <text text="GLOBAL_NOT_FOUND"></text> - </if> - </part> - </part> - </fieldset> - <fieldset title="message:prop_userinfo"> - <part class="line"> - <part class="label"> - <text text="global_created"></text> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:create_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:create_user"></user> - </part> - </part> - <part class="line"> - <part class="label"> - <text text="global_lastchange"></text> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:lastchange_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:lastchange_user"></user> - </part> - </part> - </fieldset> <link class="action" action="file" subaction="compress"> <image file="icon/compress"></image> <text key="menu_file_compress"></text> diff --git a/themes/default/templates/folder/info.tpl.src.xml b/themes/default/templates/folder/info.tpl.src.xml @@ -0,0 +1,82 @@ +<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> + + <fieldset title="message:GLOBAL_PROP"> + <part class="line"> + <part class="label"> + <label for="name" key="global_name" /> + </part> + <part class="input"> + <text var="name" class="name,focus" /> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="filename" key="global_filename" /> + </part> + <part class="input"> + <text var="filename" /> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="description" key="global_description" /> + </part> + <part class="input"> + <text var="description" class="description" /> + </part> + </part> + </fieldset> + + <fieldset title="message:additional_info"> + <part class="line"> + <part class="label"> + <label for="full_filename" key="FULL_FILENAME" /> + </part> + <part class="input"> + <text var="full_filename"></text> + </part> + </part> + + <part class="line"> + <part class="label"> + <label for="objectid" key="id"></label> + </part> + <part class="input"> + <text var="objectid"></text> + </part> + </part> + </fieldset> + + <fieldset title="message:PROP_USERINFO"> + <part class="line"> + <part class="label"> + <label for="create_user" key="global_created"> + </label> + </part> + <part class="input"> + <image icon="el_date"></image> + <date date="var:create_date"></date> + <newline></newline> + <image icon="user"></image> + <user user="var:create_user"></user> + </part> + </part> + + <part class="line"> + <part class="label"> + <label for="lastchange_user" key="global_lastchange"> + </label> + </part> + <part class="input"> + <image icon="el_date"></image> + <date date="var:lastchange_date"></date> + <newline></newline> + <image icon="user"></image> + <user user="var:lastchange_user"></user> + </part> + </part> + </fieldset> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/folder/prop.tpl.src.xml b/themes/default/templates/folder/prop.tpl.src.xml @@ -29,56 +29,5 @@ </part> </part> </fieldset> - - <fieldset title="message:additional_info"> - <part class="line"> - <part class="label"> - <label for="full_filename" key="FULL_FILENAME"> - </label> - </part> - <part class="input"> - <text var="full_filename"></text> - </part> - </part> - - <part class="line"> - <part class="label"> - <label for="objectid" key="id"></label> - </part> - <part class="input"> - <text var="objectid"></text> - </part> - </part> - </fieldset> - - <fieldset title="message:PROP_USERINFO"> - <part class="line"> - <part class="label"> - <label for="create_user" key="global_created"> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:create_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:create_user"></user> - </part> - </part> - - <part class="line"> - <part class="label"> - <label for="lastchange_user" key="global_lastchange"> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:lastchange_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:lastchange_user"></user> - </part> - </part> - </fieldset> </form> </output> \ No newline at end of file diff --git a/themes/default/templates/link/info.tpl.src.xml b/themes/default/templates/link/info.tpl.src.xml @@ -0,0 +1,68 @@ +<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> + <fieldset title="message:global_prop"> + <part class="line"> + <part class="label"> + <text text="GLOBAL_name"></text> + </part> + <part class="input"> + <text var="name" class="name,focus" /> + </part> + </part> + + <part class="line"> + <part class="label"> + <text text="GLOBAL_description"></text> + </part> + <part class="input"> + <text var="description" class="description" /> + </part> + </part> + </fieldset> + + <fieldset title="message:additional_info"> + <part class="line"> + <part class="label"> + <label for="objectid"> + <text key="id"></text> + </label> + </part> + <part class="input"> + <text var="objectid"></text> + </part> + </part> + </fieldset> + + <fieldset title="message:prop_userinfo"> + <part class="line"> + <part class="label"> + <label for=""> + <text text="global_created"></text> + </label> + </part> + <part class="input"> + <image icon="el_date"></image> + <date date="var:create_date"></date> + <newline></newline> + <image icon="user"></image> + <user user="var:create_user"></user> + </part> + </part> + <part class="line"> + <part class="label"> + <label for=""> + <text text="global_lastchange"></text> + </label> + </part> + <part class="input"> + <image icon="el_date"></image> + <date date="var:lastchange_date"></date> + <newline></newline> + <image icon="user"></image> + <user user="var:lastchange_user"></user> + </part> + </part> + </fieldset> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/link/prop.tpl.src.xml b/themes/default/templates/link/prop.tpl.src.xml @@ -25,48 +25,5 @@ </part> </fieldset> - <fieldset title="message:additional_info"> - <part class="line"> - <part class="label"> - <label for="objectid"> - <text key="id"></text> - </label> - </part> - <part class="input"> - <text var="objectid"></text> - </part> - </part> - </fieldset> - - <fieldset title="message:prop_userinfo"> - <part class="line"> - <part class="label"> - <label for=""> - <text text="global_created"></text> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:create_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:create_user"></user> - </part> - </part> - <part class="line"> - <part class="label"> - <label for=""> - <text text="global_lastchange"></text> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:lastchange_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:lastchange_user"></user> - </part> - </part> - </fieldset> </form> </output> \ No newline at end of file diff --git a/themes/default/templates/page/info.tpl.src.xml b/themes/default/templates/page/info.tpl.src.xml @@ -0,0 +1,122 @@ +<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"> + <header views="changetemplate"></header> + <form> + <fieldset> + <part class="line"> + <part class="label"> + <text text="global_name"></text> + </part> + <part class="input"> + <text var="name" class="name"/> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="global_filename"></text> + </part> + <part class="input"> + <text var="filename"/> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="global_description"></text> + </part> + <part class="input"> + <text var="description" class="description" /> + </part> + </part> + </fieldset> + <if false="mode:edit"> + <fieldset title="message:additional_info"> + <part class="line"> + <part class="label"> + <label for="full_filename"> + <text text="global_full_filename"></text> + </label> + </part> + <part class="input"> + <text var="full_filename" class="filename"></text> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="template_name"> + <text text="global_template"></text> + </label> + </part> + <part class="input"> + <if present="template_url"> + <link url="var:template_url" target="cms_main"> + <image icon="template"></image> + <text var="template_name"></text> + </link> + </if> + <if empty="template_url"> + <image file="icon_template"></image> + <text var="template_name"></text> + </if> + <newline></newline> + <if false="mode:edit"> + <link class="action" action="page" subaction="changetemplate"> + <image icon="template"></image> + <text key="menu_page_changetemplate"></text> + </link> + </if> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="mime_type"> + <text key="FILE_MIMETYPE"></text> + </label> + </part> + <part class="input"> + <text var="mime_type" class="filename"></text> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="objectid"> + <text key="id"></text> + </label> + </part> + <part class="input"> + <text var="objectid"></text> + </part> + </part> + </fieldset> + <fieldset title="message:prop_userinfo"> + <part class="line"> + <part class="label"> + <label for="create_date"> + <text text="global_created"></text> + </label> + </part> + <part class="input"> + <image icon="el_date"></image> + <date date="var:create_date"></date> + <newline></newline> + <image icon="user"></image> + <user user="var:create_user"></user> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="lastchange_date"> + <text text="global_lastchange"></text> + </label> + </part> + <part class="input"> + <image icon="el_date"></image> + <date date="var:lastchange_date"></date> + <newline></newline> + <image icon="user"></image> + <user user="var:lastchange_user"></user> + </part> + </part> + </fieldset> + </if> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/page/prop.tpl.src.php b/themes/default/templates/page/prop.tpl.src.php @@ -1,4 +1,5 @@ dummy + header views:changetemplate form window