openrat-cms

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

commit e56ab29ddbdaa8387b1ca9177a9d103e8a94fc50
parent 53ef8d4249798ef84f4b938854a35fa9180d71a8
Author: Jan Dankert <devnull@localhost>
Date:   Tue,  6 Mar 2012 23:06:17 +0100

\"Neu\"-Funktion über die Liste (passt semantisch hier besser als in untergeordneten Elementen)

Diffstat:
action/GroupAction.class.php | 23-----------------------
action/GrouplistAction.class.php | 31+++++++++++++++++++++++++++++--
action/ProjectAction.class.php | 49-------------------------------------------------
action/ProjectlistAction.class.php | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
action/UserAction.class.php | 22----------------------
action/UserlistAction.class.php | 24++++++++++++++++++++++++
themes/default/images/icon/memberships.png | 0
themes/default/templates/group/add.tpl.src.php | 23++++++++---------------
themes/default/templates/group/add.tpl.src.xml | 4----
themes/default/templates/group/edit.tpl.src.xml | 21+++++++++++++++++----
themes/default/templates/grouplist/add.tpl.src.xml | 4++++
themes/default/templates/grouplist/show.tpl.src.xml | 27+++++++++++++++++++++++++++
themes/default/templates/project/add.tpl.src.xml | 34----------------------------------
themes/default/templates/project/edit.tpl.src.xml | 2+-
themes/default/templates/project/export.tpl.src.xml | 24++++++++++++++++++++----
themes/default/templates/project/info.tpl.src.xml | 20++++++++++++++++----
themes/default/templates/project/maintenance.tpl.src.xml | 27+++++++++++++++++++++++----
themes/default/templates/projectlist/add.tpl.src.xml | 34++++++++++++++++++++++++++++++++++
themes/default/templates/projectlist/show.tpl.src.xml | 30++++++++++++++++++++++++++----
themes/default/templates/user/edit.tpl.src.xml | 2+-
themes/default/templates/userlist/add.tpl.src.xml | 4++++
themes/default/templates/userlist/show.tpl.src.xml | 44++++++++++++++++++++++++++++++++++++++++----
22 files changed, 325 insertions(+), 175 deletions(-)

diff --git a/action/GroupAction.class.php b/action/GroupAction.class.php @@ -94,29 +94,6 @@ class GroupAction extends Action } - function addView() - { - } - - - function addPost() - { - if ( $this->getRequestVar('name') != '') - { - $this->group = new Group(); - $this->group->name = $this->getRequestVar('name'); - $this->group->add(); - $this->addNotice('group',$this->group->name,'ADDED','ok'); - $this->callSubAction('listing'); - } - else - { - $this->addValidationError('name'); - $this->callSubAction('add'); - } - } - - function adduser() { $this->setTemplateVar('users',$this->group->getOtherUsers()); diff --git a/action/GrouplistAction.class.php b/action/GrouplistAction.class.php @@ -23,7 +23,7 @@ /** * Action-Klasse zum Bearbeiten einer Benutzergruppe. - * + * * @author $Author$ * @version $Revision$ * @package openrat.actions @@ -59,5 +59,32 @@ class GrouplistAction extends Action { $this->nextSubAction('show'); } - + + + + function addView() + { + } + + + function addPost() + { + if ( $this->getRequestVar('name') != '') + { + $this->group = new Group(); + $this->group->name = $this->getRequestVar('name'); + $this->group->add(); + $this->addNotice('group',$this->group->name,'ADDED','ok'); + $this->callSubAction('listing'); + } + else + { + $this->addValidationError('name'); + $this->callSubAction('add'); + } + } + + + + } \ No newline at end of file diff --git a/action/ProjectAction.class.php b/action/ProjectAction.class.php @@ -69,55 +69,6 @@ class ProjectAction extends Action - function addView() - { - $this->setTemplateVar( 'projects',Project::getAll() ); - } - - - /** - * Projekt hinzufuegen. - * - */ - function addPost() - { - if ( !$this->hasRequestVar('type') ) - { - $this->addValidationError('type'); - $this->callSubAction('add'); - return; - } - else - { - switch( $this->getRequestVar('type') ) - { - case 'empty': - if ( !$this->hasRequestVar('name') ) - { - $this->addValidationError('name'); - $this->callSubAction('add'); - return; - } - $this->project = new Project(); - $this->project->name = $this->getRequestVar('name'); - $this->project->add(); - $this->addNotice('project',$this->project->name,'ADDED'); - break; - case 'copy': - $db = db_connection(); - $project = new Project($this->getRequestVar('projectid')); - $project->load(); - $project->export($db->id); - $this->addNotice('project',$project->name,'DONE'); - break; - default: - Http::serverError('Unknown type while adding project '.$this->getRequestVar('type') ); - } - - } - } - - /** * Liste aller Projekte anzeigen. * diff --git a/action/ProjectlistAction.class.php b/action/ProjectlistAction.class.php @@ -56,4 +56,55 @@ class ProjectlistAction extends Action } $this->setTemplateVar('el',$list); } + + + + function addView() + { + $this->setTemplateVar( 'projects',Project::getAll() ); + } + + + /** + * Projekt hinzufuegen. + * + */ + function addPost() + { + if ( !$this->hasRequestVar('type') ) + { + $this->addValidationError('type'); + $this->callSubAction('add'); + return; + } + else + { + switch( $this->getRequestVar('type') ) + { + case 'empty': + if ( !$this->hasRequestVar('name') ) + { + $this->addValidationError('name'); + $this->callSubAction('add'); + return; + } + $this->project = new Project(); + $this->project->name = $this->getRequestVar('name'); + $this->project->add(); + $this->addNotice('project',$this->project->name,'ADDED'); + break; + case 'copy': + $db = db_connection(); + $project = new Project($this->getRequestVar('projectid')); + $project->load(); + $project->export($db->id); + $this->addNotice('project',$project->name,'DONE'); + break; + default: + Http::serverError('Unknown type while adding project '.$this->getRequestVar('type') ); + } + + } + } + } \ No newline at end of file diff --git a/action/UserAction.class.php b/action/UserAction.class.php @@ -100,28 +100,6 @@ class UserAction extends Action } - function addView() - { - } - - - - function addPost() - { - if ( $this->getRequestVar('name') != '' ) - { - $this->user = new User(); - $this->user->add( $this->getRequestVar('name') ); - $this->addNotice('user',$this->user->name,'ADDED','ok'); - } - else - { - $this->addValidationError('name'); - $this->callSubAction('add'); - } - } - - function addgrouptouser() { $this->user->addGroup( $this->getRequestVar('groupid') ); diff --git a/action/UserlistAction.class.php b/action/UserlistAction.class.php @@ -57,5 +57,29 @@ class UserlistAction extends Action } + + function addView() + { + } + + + + function addPost() + { + if ( $this->getRequestVar('name') != '' ) + { + $this->user = new User(); + $this->user->add( $this->getRequestVar('name') ); + $this->addNotice('user',$this->user->name,'ADDED','ok'); + } + else + { + $this->addValidationError('name'); + $this->callSubAction('add'); + } + } + + + } \ No newline at end of file diff --git a/themes/default/images/icon/memberships.png b/themes/default/images/icon/memberships.png Binary files differ. diff --git a/themes/default/templates/group/add.tpl.src.php b/themes/default/templates/group/add.tpl.src.php @@ -1,14 +1,8 @@ -dummy - form method:post - - window icon:group name:GLOBAL_GROUPS width:70% - row - cell - text text:name - cell - input name:name - row - cell colspan:2 class:act - button type:ok - - focus field:name- \ No newline at end of file +header back:true + form + part class:line + part class:label + label for:name key:name + + part class:input + input name:name class:focus diff --git a/themes/default/templates/group/add.tpl.src.xml b/themes/default/templates/group/add.tpl.src.xml @@ -1,3 +0,0 @@ -<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 back="true"><form><part class="line"><part class="label"><label for="name" key="name"></label></part><part class="input"><input name="name" class="focus"></input></part></part></form></header></output>- \ No newline at end of file diff --git a/themes/default/templates/group/edit.tpl.src.xml b/themes/default/templates/group/edit.tpl.src.xml @@ -1,3 +1,16 @@ -<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="remove,add"></header><form method="post"><part class="line"><part class="label"><label for="name"><text text="GLOBAL_NAME"></text></label></part><part class="input"><input name="name" class="focus"></input></part></part></form></output>- \ No newline at end of file +<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="remove"></header> + <form method="post"> + <part class="line"> + <part class="label"> + <label for="name"> + <text text="GLOBAL_NAME"></text> + </label> + </part> + <part class="input"> + <input name="name" class="focus"></input> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/grouplist/add.tpl.src.xml b/themes/default/templates/grouplist/add.tpl.src.xml @@ -0,0 +1,3 @@ +<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 back="true"><form><part class="line"><part class="label"><label for="name" key="name"></label></part><part class="input"><input name="name" class="focus"></input></part></part></form></header></output>+ \ No newline at end of file diff --git a/themes/default/templates/grouplist/show.tpl.src.xml b/themes/default/templates/grouplist/show.tpl.src.xml @@ -0,0 +1,26 @@ +<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="add" /> + <table> + <row class="headline"> + <cell> + <text key="name"></text> + </cell> + </row> + <list list="el" extract="true"> + <row class="data"> + <cell url="var:url"> + <image file="icon_group"></image> + <text var="name"></text> + </cell> + </row> + </list> + <row> + <cell> + <link class="action" action="group" subaction="add"> + <text key="menu_group_add"></text> + </link> + </cell> + </row> + </table> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/project/add.tpl.src.xml b/themes/default/templates/project/add.tpl.src.xml @@ -1,33 +0,0 @@ -<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 back="true"></header> - <form method="post"> - <part class="line"> - <part class="label"> - <text text="message:name"></text> - </part> - <part class="input"> - - <input name="name"></input> - </part> - </part> - <fieldset title="message:options"> - <part class="line"> - <part class="label"> - <radio name="type" value="empty"></radio> - <label for="type_empty"> - <text key="empty"></text> - </label> - <part class="input"> - <radio name="type" value="copy"></radio> - <label for="type_copy"> - <text key="copy"></text> - </label> - <selectbox name="projectid" list="projects"></selectbox> - </part> - </part> - </part> - </fieldset> - </form> - <focus field="name"></focus> -</output>- \ No newline at end of file diff --git a/themes/default/templates/project/edit.tpl.src.xml b/themes/default/templates/project/edit.tpl.src.xml @@ -1,6 +1,6 @@ <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="remove,add"></header> + <header views="remove,export,maintenance"></header> <form> <fieldset title="message:NAME"> <part class="line"> diff --git a/themes/default/templates/project/export.tpl.src.xml b/themes/default/templates/project/export.tpl.src.xml @@ -1,3 +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"><dummy><form><window icon="project" name="GLOBAL_PROJECT" widths="30%,70%"><row><cell width="50%"><text key="GLOBAL_DATABASE"></text></cell><cell width="50%"><selectbox name="dbid" list="dbids" default="actdbid"></selectbox></cell></row><row><cell colspan="2" class="act"><button></button></cell></row></window></form></dummy></output>- \ No newline at end of file +<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 back="true"/> + <form> + <row> + <cell width="50%"> + <text key="GLOBAL_DATABASE"></text> + </cell> + <cell width="50%"> + <selectbox name="dbid" list="dbids" default="actdbid"></selectbox> + </cell> + </row> + <row> + <cell colspan="2" class="act"> + <button></button> + </cell> + </row> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/project/info.tpl.src.xml b/themes/default/templates/project/info.tpl.src.xml @@ -1,3 +1,15 @@ -<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"><dummy><window icon="project" name="GLOBAL_PROJECT" widths="20%,80%"><list list="info"><row><cell colspan="2"><label for=""><text key="var:list_key" prefix="project_info_"></text></label><text type="strong" var="list_value"></text></cell></row></list></window></dummy></output>- \ No newline at end of file +<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"> + <list list="info"> + <part class="line"> + <part class="label"> + <label for=""> + <text key="var:list_key" prefix="project_info_"></text> + </label> + </part> + <part class="input"> + <text type="strong" var="list_value"></text> + </part> + </part> + </list> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/project/maintenance.tpl.src.xml b/themes/default/templates/project/maintenance.tpl.src.xml @@ -1,3 +1,22 @@ -<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"><dummy><form><dummy><row><cell colspan="2"><fieldset title="message:options"><part><text value=""></text><radio name="type" value="check_limit"></radio><label for="type_check_limit"><text key="project_check_limit"></text></label></part><part><text value=""></text><radio name="type" value="check_files"></radio><label for="type_check_files"><text key="project_check_files"></text></label></part></fieldset></cell></row></dummy></form></dummy></output>- \ No newline at end of file +<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 back="true" /> + <form> + <fieldset title="message:options"> + <part> + <text value=""></text> + <radio name="type" value="check_limit"></radio> + <label for="type_check_limit"> + <text key="project_check_limit"></text> + </label> + </part> + <part> + <text value=""></text> + <radio name="type" value="check_files"></radio> + <label for="type_check_files"> + <text key="project_check_files"></text> + </label> + </part> + </fieldset> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/projectlist/add.tpl.src.xml b/themes/default/templates/projectlist/add.tpl.src.xml @@ -0,0 +1,33 @@ +<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 back="true"></header> + <form method="post"> + <part class="line"> + <part class="label"> + <text text="message:name"></text> + </part> + <part class="input"> + + <input name="name"></input> + </part> + </part> + <fieldset title="message:options"> + <part class="line"> + <part class="label"> + <radio name="type" value="empty"></radio> + <label for="type_empty"> + <text key="empty"></text> + </label> + <part class="input"> + <radio name="type" value="copy"></radio> + <label for="type_copy"> + <text key="copy"></text> + </label> + <selectbox name="projectid" list="projects"></selectbox> + </part> + </part> + </part> + </fieldset> + </form> + <focus field="name"></focus> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/projectlist/show.tpl.src.xml b/themes/default/templates/projectlist/show.tpl.src.xml @@ -1,3 +1,25 @@ -<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"><dummy><window icon="project" name="GLOBAL_PROJECTS" width="70%"><table><row class="headline"><cell><text key="name"></text></cell><cell><text key="GLOBAL_SELECT"></text></cell></row><list list="el" extract="true"><row class="data"><cell url="var:url"><image file="icon_project"></image><text value="var:name" maxlength="30"></text></cell><cell url="var:use_url"><text key="GLOBAL_SELECT"></text></cell></row></list></table></window></dummy></output>- \ No newline at end of file +<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="add" /> + <table> + <row class="headline"> + <cell> + <text key="name"></text> + </cell> + <cell> + <text key="GLOBAL_SELECT"></text> + </cell> + </row> + <list list="el" extract="true"> + <row class="data"> + <cell url="var:url"> + <image file="icon_project"></image> + <text value="var:name" maxlength="30"></text> + </cell> + <cell url="var:use_url"> + <text key="GLOBAL_SELECT"></text> + </cell> + </row> + </list> + </table> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/user/edit.tpl.src.xml b/themes/default/templates/user/edit.tpl.src.xml @@ -1,6 +1,6 @@ <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="remove,add"></header> + <header views="remove"></header> <form> <fieldset title="message:NAME"> <part class="line"> diff --git a/themes/default/templates/userlist/add.tpl.src.xml b/themes/default/templates/userlist/add.tpl.src.xml @@ -0,0 +1,3 @@ +<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 back="true"><form method="post"><part class="line"><part class="label"><label for="name" key="user_username"></label></part><part class="input"><input name="name" class="focus"></input></part></part></form></header></output>+ \ No newline at end of file diff --git a/themes/default/templates/userlist/show.tpl.src.xml b/themes/default/templates/userlist/show.tpl.src.xml @@ -1,3 +1,39 @@ -<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"><dummy><window icon="user" name="GLOBAL_USERS" width="70%"><table><row class="headline"><cell><image type="user"></image><text key="name"></text></cell><cell><text raw=""></text></cell><cell><text key="LOGIN"></text></cell></row><list list="el" extract="true"><row class="data"><cell url="var:url"><image type="user"></image><text var="name"></text></cell><cell url="var:url"><text value="var:fullname"></text><if true="var:isAdmin"><text raw="_("></text><text key="USER_ADMIN"></text><text raw=")"></text></if></cell><cell><link target="_top" action="index" subaction="switchuser" id="var:userid"><text key="LOGIN"></text></link></cell></row></list></table></window></dummy></output>- \ No newline at end of file +<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="add" /> + <table> + <row class="headline"> + <cell> + <image type="user"></image> + <text key="name"></text> + </cell> + <cell> + <text raw=""></text> + </cell> + <cell> + <text key="LOGIN"></text> + </cell> + </row> + <list list="el" extract="true"> + <row class="data"> + <cell url="var:url"> + <image type="user"></image> + <text var="name"></text> + </cell> + <cell url="var:url"> + <text value="var:fullname"></text> + <if true="var:isAdmin"> + <text raw="_("></text> + <text key="USER_ADMIN"></text> + <text raw=")"></text> + </if> + </cell> + <cell> + <link target="_top" action="index" subaction="switchuser" id="var:userid"> + <text key="LOGIN"></text> + </link> + </cell> + </row> + </list> + </table> +</output>+ \ No newline at end of file