commit 5e983001c4ef6fd0f978dc3d907633ea72941fa6
parent 0980fb346646b5453bbffe408a36364e805fcb3a
Author: Jan Dankert <devnull@localhost>
Date: Wed, 7 Nov 2012 19:42:08 +0100
Fix: Auswählen von Sprachen und Varianten.
Diffstat:
3 files changed, 22 insertions(+), 52 deletions(-)
diff --git a/action/StartAction.class.php b/action/StartAction.class.php
@@ -945,7 +945,7 @@ class StartAction extends Action
$user = Session::getUser();
if ( ! is_object($user) )
{
- $this->callSubAction('show');
+ Http::serverError('No user in session');
return;
}
@@ -963,8 +963,6 @@ class StartAction extends Action
}
$this->evaluateRequestVars( array(REQ_PARAM_MODEL_ID=>$this->getRequestId()) );
-
- $user = Session::getUser();
}
@@ -1004,7 +1002,7 @@ class StartAction extends Action
{
$object = new Object( $vars[REQ_PARAM_OBJECT_ID] );
$object->objectLoadRaw();
- Session::setObject( $object );
+ // Session::setObject( $object ); // Unnötig
$project = new Project( $object->projectid );
$project->load();
@@ -1036,16 +1034,6 @@ class StartAction extends Action
Session::setProjectModel( $model );
}
- $object = Session::getObject();
- if ( is_object($object) && $object->projectid == $project->projectid )
- {
- $object->objectLoadRaw();
- Session::setObject( $object );
- }
- else
- {
- Session::setObject( '' );
- }
}
elseif ( isset($vars[REQ_PARAM_MODEL_ID]) && Model::available($vars[REQ_PARAM_MODEL_ID]) )
{
@@ -1064,18 +1052,6 @@ class StartAction extends Action
$language->load();
Session::setProjectLanguage( $language );
}
-
- $object = Session::getObject();
- $object->objectLoadRaw();
- if ( is_object($object) && $object->projectid == $project->projectid )
- {
- $object->objectLoadRaw();
- Session::setObject( $object );
- }
- else
- {
- Session::setObject( '' );
- }
}
elseif ( isset($vars[REQ_PARAM_PROJECT_ID])&&Project::available($vars[REQ_PARAM_PROJECT_ID]) )
{
@@ -1091,17 +1067,6 @@ class StartAction extends Action
$model = new Model( isset($vars[REQ_PARAM_MODEL_ID])&& Model::available($vars[REQ_PARAM_MODEL_ID])?$vars[REQ_PARAM_MODEL_ID]:$project->getDefaultModelId() );
$model->load();
Session::setProjectModel( $model );
-
- $object = Session::getObject();
- if ( is_object($object) && $object->projectid == $project->projectid )
- {
- $object->objectLoadRaw();
- Session::setObject( $object );
- }
- else
- {
- Session::setObject( '' );
- }
}
}
diff --git a/themes/default/templates/languagelist/show.tpl.src.xml b/themes/default/templates/languagelist/show.tpl.src.xml
@@ -17,15 +17,17 @@
</row>
<list list="el" extract="true">
<row class="data">
- <column id="var:id" name="var:name" action="language">
+ <column class="clickable">
<image file="icon_language"></image>
- <text var="name" maxlength="25"></text>
+ <link type="open" name="var:name" action="language" id="var:id">
+ <text var="name" maxlength="25"></text>
+ </link>
</column>
<column>
<text var="isocode"></text>
</column>
<if present="default_url">
- <column>
+ <column class="clickable">
<link type="post" action="language" subaction="setdefault" id="var:id">
<text text="GLOBAL_make_default"></text>
</link>
@@ -33,11 +35,11 @@
</if>
<else>
<column>
- <text text="GLOBAL_is_default"></text>
+ <text text="GLOBAL_is_default" type="emphatic" />
</column>
</else>
<if present="select_url">
- <column>
+ <column class="clickable">
<link type="post" action="start" subaction="language" id="var:id">
<text text="GLOBAL_select"></text>
</link>
@@ -45,7 +47,7 @@
</if>
<else>
<column>
- <text text="GLOBAL_selected"></text>
+ <text text="GLOBAL_selected" type="emphatic" />
</column>
</else>
</row>
diff --git a/themes/default/templates/modellist/show.tpl.src.xml b/themes/default/templates/modellist/show.tpl.src.xml
@@ -14,13 +14,16 @@
</row>
<list list="el" extract="true">
<row class="data">
- <column id="var:id" name="var:name" action="model">
- <image file="icon_model"></image>
+ <column class="clickable">
+ <image file="icon_model"></image>
+
+ <link type="open" name="var:name" action="model" id="var:id">
<text var="name" maxlength="25"></text>
+ </link>
</column>
<if present="default_url">
- <column>
+ <column class="clickable">
<link type="post" action="model" subaction="setdefault" id="var:id">
<text text="GLOBAL_make_default"></text>
</link>
@@ -28,13 +31,13 @@
</if>
<else>
<column>
- <text text="GLOBAL_is_default"></text>
+ <text text="GLOBAL_is_default" type="emphatic" />
</column>
</else>
<if present="select_url">
- <column>
+ <column class="clickable">
<link type="post" action="start" subaction="model" id="var:id">
<text text="GLOBAL_select"></text>
</link>
@@ -42,7 +45,7 @@
</if>
<else>
<column>
- <text text="GLOBAL_selected"></text>
+ <text text="GLOBAL_selected" type="emphatic" />
</column>
</else>
</row>
@@ -50,10 +53,10 @@
<set var="default_url"></set>
</list>
<row class="data">
- <column colspan="3">
+ <column colspan="3" class="clickable">
<link type="view" subaction="add">
- <image icon="add"/>
- <text text="new"/>
+ <image icon="add" />
+ <text text="new" />
</link>
</column>
</row>