Skip to content

Commit

Permalink
Fixed missing notification in label setSession
Browse files Browse the repository at this point in the history
Renamed 'Attribute control' in CPDB to 'Attribute management'
Fixed a small bug in template editor
Fixed a quotation bug when adding a new attribute in cpdb
Replaced draft icons in cpdb with real ones
Removed obsolete icons


git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12121 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Jan 19, 2012
1 parent 5eb8be8 commit 2ad5e5d
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 8 deletions.
7 changes: 7 additions & 0 deletions application/controllers/admin/labels.php
Expand Up @@ -335,14 +335,21 @@ public function process()
$lid = returnglobal('lid');

if ($action == "updateset")
{
updateset($lid);
Yii::app()->session['flashmessage'] = Yii::app()->lang->gT("Label set properties sucessfully updated.");
}
if ($action == "insertlabelset")
$lid = insertlabelset();
if (($action == "modlabelsetanswers") || ($action == "ajaxmodlabelsetanswers"))
modlabelsetanswers($lid);
if ($action == "deletelabelset")
if (deletelabelset($lid))
{
Yii::app()->session['flashmessage'] = Yii::app()->lang->gT("Label set sucessfully deleted.");
$lid = 0;
}


if ($lid)
$this->getController()->redirect($this->getController()->createUrl("admin/labels/view/lid/" . $lid));
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/participantsaction.php
Expand Up @@ -243,7 +243,7 @@ function attributeControl()

/**
* Sends the attributes info using JSON encoding
* Called after the attribute control grid is loaded
* Called after the Attribute management grid is loaded
* @return JSON encoded string containg sharing information
*/
function getAttributeInfo_json()
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/templates.php
Expand Up @@ -926,7 +926,7 @@ protected function _initialise($templatename, $screenname, $editfile, $showsumma
$files[] = array("name" => $qs);

$myoutput[] = templatereplace("$templatedir/startpage.pstpl", array(), $aData);
$myoutput[] = templatereplace("$templatedir/clear.pstpl", array(), $aData);
$myoutput[] = templatereplace("$templatedir/clearall.pstpl", array(), $aData);
$myoutput[] = templatereplace("$templatedir/endpage.pstpl", array(), $aData);
$myoutput[] = "\n";
break;
Expand Down
9 changes: 7 additions & 2 deletions application/models/ParticipantAttributeNames.php
Expand Up @@ -110,7 +110,12 @@ function getVisibleAttributes()

function getAllAttributes()
{
return Yii::app()->db->createCommand()->select('{{participant_attribute_names}}.*,{{participant_attribute_names}}_lang.*')->from('{{participant_attribute_names}}')->order('{{participant_attribute_names}}.attribute_id', 'desc')->join('{{participant_attribute_names}}_lang', '{{participant_attribute_names}}_lang.attribute_id = {{participant_attribute_names}}.attribute_id')->where('{{participant_attribute_names}}_lang.lang = "'.Yii::app()->session['adminlang'].'"')->queryAll();
return Yii::app()->db->createCommand()->select('{{participant_attribute_names}}.*,{{participant_attribute_names}}_lang.*')
->from('{{participant_attribute_names}}')
->order('{{participant_attribute_names}}.attribute_id', 'desc')
->join('{{participant_attribute_names}}_lang', '{{participant_attribute_names}}_lang.attribute_id = {{participant_attribute_names}}.attribute_id')
->where('{{participant_attribute_names}}_lang.lang = "'.Yii::app()->session['adminlang'].'"')
->queryAll();
}

function getAllAttributesValues()
Expand Down Expand Up @@ -176,7 +181,7 @@ function storeAttribute($data)
Yii::app()->db->createCommand()->insert('{{participant_attribute_names}}',$insertnames);
$attribute_id = Yii::app()->db->getLastInsertID();
$insertnameslang = array('attribute_id' => intval($attribute_id),
'attribute_name'=> Yii::app()->db->quoteValue($data['attribute_name']),
'attribute_name'=> $data['attribute_name'],
'lang' => Yii::app()->session['adminlang']);
Yii::app()->db->createCommand()->insert('{{participant_attribute_names_lang}}',$insertnameslang);

Expand Down
Expand Up @@ -7,7 +7,7 @@
var attributeEditUrl = "<?php echo Yii::app()->getController()->createUrl("admin/participants/viewAttribute/aid"); ?>";
</script>

<div class='header ui-widget-header'><strong><?php $clang->eT("Attribute control"); ?></strong></div>
<div class='header ui-widget-header'><strong><?php $clang->eT("Attribute management"); ?></strong></div>

<br/>

Expand Down
Expand Up @@ -53,9 +53,9 @@
'style' => 'margin-left:5px',
'style' => 'margin-right:1px');

$attributecontrol = array('src' => Yii::app()->getConfig('imageurl') . '/tag_green.png',
'alt' => 'Attribute control',
'title' => 'Attribute control',
$attributecontrol = array('src' => Yii::app()->getConfig('imageurl') . '/tag.png',
'alt' => $clang->gT("Attribute management"),
'title' => $clang->gT("Attribute management"),
'width' => 50,
'height' => 35,
'style' => 'margin-left:0px',
Expand Down
Binary file removed images/handle-left.png
Binary file not shown.
Binary file removed images/handle-right.png
Binary file not shown.
Binary file modified images/share.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/tag_green.png
Binary file not shown.

0 comments on commit 2ad5e5d

Please sign in to comment.