Skip to content

Commit

Permalink
Dev Working on a new admin style (gringegreen)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Apr 27, 2012
1 parent 6552633 commit e3c9652
Show file tree
Hide file tree
Showing 33 changed files with 231 additions and 215 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/labels.php
Expand Up @@ -192,7 +192,7 @@ public function index($sa, $lid=0)
if ($sa == "newlabelset")
{
$langids = Yii::app()->session['adminlang'];
$tabitem = $clang->gT("Create New Label Set");
$tabitem = $clang->gT("Create new label set");
}
else
$tabitem = $clang->gT("Edit label set");
Expand Down
2 changes: 2 additions & 0 deletions application/core/Survey_Common_Action.php
Expand Up @@ -184,6 +184,8 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $
{
// Gather the data
$aData['clang'] = $clang = Yii::app()->lang;
$aData['sImageURL'] = Yii::app()->getConfig('adminimageurl');

$aData = $this->_addPseudoParams($aData);
$aViewUrls = (array) $aViewUrls;
$sViewPath = '/admin/';
Expand Down
4 changes: 2 additions & 2 deletions application/helpers/admin/htmleditor_helper.php
Expand Up @@ -121,8 +121,8 @@ function getPopupEditor($fieldtype,$fieldname,$fieldtext, $surveyID=null,$gID=nu

$htmlcode .= ""
. "<a href=\"javascript:start_popup_editor('".$fieldname."','".$fieldtext."','".$surveyID."','".$gID."','".$qID."','".$fieldtype."','".$action."')\" id='".$fieldname."_ctrl' title=\"".$clang->gTview("Start HTML Editor in a Popup Window")."\" class='editorLink'>\n"
. "\t<img alt=\"".$clang->gT("Start HTML Editor in a Popup Window")."\" id='".$fieldname."_popupctrlena' name='".$fieldname."_popupctrlena' border='0' src='".Yii::app()->getConfig('imageurl')."/edithtmlpopup.png' $imgopts align='top' class='btneditanswerena' />\n"
. "\t<img alt=\"".$clang->gT("Give focus to the HTML Editor Popup Window")."\" id='".$fieldname."_popupctrldis' name='".$fieldname."_popupctrldis' border='0' src='".Yii::app()->getConfig('imageurl')."/edithtmlpopup_disabled.png' style='display: none' $imgopts align='top' class='btneditanswerdis' />\n"
. "\t<img alt=\"".$clang->gT("Start HTML editor in a popup window")."\" id='".$fieldname."_popupctrlena' name='".$fieldname."_popupctrlena' border='0' src='".Yii::app()->getConfig('adminimageurl')."edithtmlpopup.png' $imgopts align='top' class='btneditanswerena' />\n"
. "\t<img alt=\"".$clang->gT("Give focus to the HTML editor popup window")."\" id='".$fieldname."_popupctrldis' name='".$fieldname."_popupctrldis' border='0' src='".Yii::app()->getConfig('adminimageurl')."edithtmlpopup_disabled.png' style='display: none' $imgopts align='top' class='btneditanswerdis' />\n"
. "</a>\n";

return $htmlcode;
Expand Down
4 changes: 2 additions & 2 deletions application/helpers/replacements_helper.php
Expand Up @@ -367,7 +367,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
// Find out if the user has any saved data
if ($thissurvey['format'] == 'A')
{
if ($thissurvey['tokenanswerspersistence'] != 'Y' || !tableExists('tokens_'.$surveyid))
if ($thissurvey['tokenanswerspersistence'] != 'Y' || !isset($surveyid) || !tableExists('tokens_'.$surveyid))
{
$_saveall = "\t\t\t<input type='submit' name='loadall' value='" . $clang->gT("Load unfinished survey") . "' class='saveall' " . (($thissurvey['active'] != "Y") ? "disabled='disabled'" : "") . "/>"
. "\n\t\t\t<input type='button' name='saveallbtn' value='" . $clang->gT("Resume later") . "' class='saveall' onclick=\"javascript:document.limesurvey.move.value = this.value;addHiddenField(document.getElementById('limesurvey'),'saveall',this.value);document.getElementById('limesurvey').submit();\" " . (($thissurvey['active'] != "Y") ? "disabled='disabled'" : "") . "/>"; // Show Save So Far button
Expand All @@ -379,7 +379,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
}
elseif (!isset(Yii::app()->session['step']) || !Yii::app()->session['step'])
{ //First page, show LOAD
if ($thissurvey['tokenanswerspersistence'] != 'Y' || !tableExists('tokens_'.$surveyid))
if ($thissurvey['tokenanswerspersistence'] != 'Y' || !isset($surveyid) || !tableExists('tokens_'.$surveyid))
{
$_saveall = "\t\t\t<input type='submit' name='loadall' value='" . $clang->gT("Load unfinished survey") . "' class='saveall' " . (($thissurvey['active'] != "Y") ? "disabled='disabled'" : "") . "/>";
}
Expand Down
14 changes: 7 additions & 7 deletions application/views/admin/labels/labelbar_view.php
Expand Up @@ -4,18 +4,18 @@
</div>
<div class='menubar-main'>
<div class='menubar-left'>
<img src='<?php echo $imageurl; ?>blank.gif' width='40' height='20' border='0' hspace='0' align='left' alt='' />
<img src='<?php echo $imageurl; ?>seperator.gif' border='0' hspace='0' align='left' alt='' />
<img src='<?php echo $sImageURL; ?>blank.gif' width='40' height='20' border='0' hspace='0' alt='' />
<img src='<?php echo $sImageURL; ?>seperator.gif' border='0' hspace='0' alt='' />
<a href='<?php echo $this->createUrl("admin/labels/editlabelset/lid/".$lid); ?>' title="<?php $clang->eTview("Edit label set"); ?>" >
<img name='EditLabelsetButton' src='<?php echo $imageurl; ?>edit.png' alt='<?php $clang->eT("Edit label set"); ?>' align='left' /></a>
<img name='EditLabelsetButton' src='<?php echo $sImageURL; ?>edit.png' alt='<?php $clang->eT("Edit label set"); ?>' /></a>
<a href='#' title='<?php $clang->eTview("Delete label set"); ?>' onclick="if (confirm('<?php $clang->eT("Do you really want to delete this label set?","js"); ?>')) { <?php echo convertGETtoPOST($this->createUrl("admin/labels/process")."?action=deletelabelset&amp;lid=$lid"); ?>}" >
<img src='<?php echo $imageurl; ?>delete.png' border='0' alt='<?php $clang->eT("Delete label set"); ?>' align='left' /></a>
<img src='<?php echo $imageurl; ?>seperator.gif' border='0' hspace='0' align='left' alt='' />
<img src='<?php echo $sImageURL; ?>delete.png' border='0' alt='<?php $clang->eT("Delete label set"); ?>' /></a>
<img src='<?php echo $sImageURL; ?>seperator.gif' border='0' hspace='0' alt='' />
<a href='<?php echo $this->createUrl("admin/export/dumplabel/lid/$lid");?>' title="<?php $clang->eTview("Export this label set"); ?>" >
<img src='<?php echo $imageurl; ?>dumplabel.png' alt='<?php $clang->eT("Export this label set"); ?>' align='left' /></a>
<img src='<?php echo $sImageURL; ?>dumplabel.png' alt='<?php $clang->eT("Export this label set"); ?>' /></a>
</div>
<div class='menubar-right'>
<input type='image' src='<?php echo $imageurl; ?>close.png' title='<?php $clang->eT("Close Window"); ?>' href="<?php echo $this->createUrl("admin/labels/view"); ?>" />
<input type='image' src='<?php echo $sImageURL; ?>close.png' title='<?php $clang->eT("Close Window"); ?>' href="<?php echo $this->createUrl("admin/labels/view"); ?>" />
</div>
</div>
</div>
Expand Down
34 changes: 17 additions & 17 deletions application/views/admin/labels/labelsetsbar_view.php
@@ -1,25 +1,25 @@
<div class='menubar'>
<div class='menubar-title ui-widget-header'>
<strong><?php $clang->eT("Label Sets Administration"); ?></strong>
<strong><?php $clang->eT("Label set administration"); ?></strong>
</div>
<div class='menubar-main'>
<div class='menubar-left'>
<a href='<?php echo $this->createUrl("/admin/index"); ?>' title="<?php $clang->eTview("Return to survey administration"); ?>" >
<img name='Administration' src='<?php echo Yii::app()->getConfig('imageurl'); ?>/home.png' align='left' alt='<?php $clang->eT("Return to survey administration"); ?>' /></a>
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/blank.gif' width='11' height='20' align='left' alt='' />
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/seperator.gif' align='left' alt='' />
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/blank.gif' width='76' align='left' height='20' alt='' />
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/seperator.gif' border='0' hspace='0' align='left' alt='' />
<img name='Administration' src='<?php echo $sImageURL; ?>home.png' alt='<?php $clang->eT("Return to survey administration"); ?>' /></a>
<img src='<?php echo $sImageURL; ?>blank.gif' width='11' height='20' alt='' />
<img src='<?php echo $sImageURL; ?>seperator.gif' alt='' />
<img src='<?php echo $sImageURL; ?>blank.gif' width='76' height='20' alt='' />
<img src='<?php echo $sImageURL; ?>seperator.gif' border='0' hspace='0' alt='' />
<a href='<?php echo $this->createUrl("admin/labels/exportmulti");?>' title="<?php $clang->eTview("Export label set"); ?>" >
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/dumplabelmulti.png' alt='<?php $clang->eT("Export multiple label sets"); ?>' align='left' /></a>
<img src='<?php echo $sImageURL; ?>dumplabelmulti.png' alt='<?php $clang->eT("Export multiple label sets"); ?>' /></a>
</div>
<div class='menubar-right'>
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/blank.gif' width='5' height='20' alt='' />
<img src='<?php echo $sImageURL; ?>blank.gif' width='5' height='20' alt='' />
<label for='labelsetchanger'><?php $clang->eT("Label sets:");?> </label>
<select id='labelsetchanger' onchange="window.open(this.options[this.selectedIndex].value,'_top')">
<option value=''
<?php if (!isset($lid) || $lid<1) { ?> selected='selected' <?php } ?>
><?php $clang->eT("Please Choose..."); ?></option>
><?php $clang->eT("Please choose..."); ?></option>

<?php if (count($labelsets)>0)
{
Expand All @@ -34,20 +34,20 @@
</select>
<a href="#" onclick="window.open('<?php echo $this->createUrl("admin/labels/newlabelset") ?>', '_top')"
title="<?php $clang->eTview("Create or import new label set(s)"); ?>">
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/add.png' name='AddLabel' alt='<?php $clang->eT("Create or import new label set(s)"); ?>' /></a>
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/seperator.gif' alt='' />
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/blank.gif' width='5' height='20' alt='' />
<img src='<?php echo $sImageURL; ?>add.png' name='AddLabel' alt='<?php $clang->eT("Create or import new label set(s)"); ?>' /></a>
<img src='<?php echo $sImageURL; ?>seperator.gif' alt='' />
<img src='<?php echo $sImageURL; ?>blank.gif' width='5' height='20' alt='' />

<a href="#" onclick="window.open('<?php echo $this->createUrl("admin/authentication/logout");?>', '_top')"
title="<?php $clang->eTview("Logout"); ?>" >
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/logout.png' name='Logout' alt='<?php $clang->eT("Logout"); ?>' /></a>
<img src='<?php echo $sImageURL; ?>logout.png' name='Logout' alt='<?php $clang->eT("Logout"); ?>' /></a>

<a href="#" onclick="showhelp('show')" title="<?php $clang->eTview("Show Help"); ?>">
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/showhelp.png' name='ShowHelp'
alt='<?php $clang->eT("Show Help"); ?>' /></a>
<a href="#" onclick="showhelp('show')" title="<?php $clang->eTview("Show help"); ?>">
<img src='<?php echo $sImageURL; ?>showhelp.png' name='ShowHelp'
alt='<?php $clang->eT("Show help"); ?>' /></a>
</div>
</div>
</div>
<script type="text/javascript"><!--
var ci_path = '<?php echo Yii::app()->getConfig('imageurl') ?>'; //-->
var sImageURL = '<?php echo $sImageURL ?>'; //-->
</script>
22 changes: 11 additions & 11 deletions application/views/admin/labels/labelview_view.php
@@ -1,12 +1,12 @@
<div class='header ui-widget-header'><?php $clang->eT("Labels") ?></div>
<div id='tabs'>
<ul>
<div id='tabs' class='ui-tabs ui-widget ui-widget-content ui-corner-all'>
<ul class='ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'>
<?php
foreach ($lslanguages as $i => $language)
echo "
<li><a href='#neweditlblset$i'>" . getLanguageNameFromCode($language, false) . "</a></li>";
echo "
<li><a href='#up_resmgmt'>" . $clang->gT("Uploaded Resources Management") . "</a></li>";
<li><a href='#up_resmgmt'>" . $clang->gT("Uploaded resources management") . "</a></li>";
?>
</ul>

Expand Down Expand Up @@ -66,7 +66,7 @@
else
{
?>
<td><img src='<?php echo Yii::app()->getConfig('imageurl') ?>/handle.png' /></td>
<td><img src='<?php echo $sImageURL; ?>handle.png' /></td>
<td>
<input type='hidden' class='hiddencode' value='<?php echo $row['code'] ?>' />
<input type='text' class='codeval'id='code_<?php echo $row['sortorder'] ?>' name='code_<?php echo $row['sortorder'] ?>' maxlength='5' size='6' value='<?php echo $row['code'] ?>'/>
Expand All @@ -89,8 +89,8 @@
{
?>
<td style='text-align:center;'>
<img src='<?php echo Yii::app()->getConfig('imageurl') ?>/addanswer.png' class='btnaddanswer' />
<img src='<?php echo Yii::app()->getConfig('imageurl') ?>/deleteanswer.png' class='btndelanswer' />
<img src='<?php echo $sImageURL; ?>addanswer.png' class='btnaddanswer' />
<img src='<?php echo $sImageURL; ?>deleteanswer.png' class='btndelanswer' />
</td>
<?php
}
Expand All @@ -104,7 +104,7 @@
</tbody>
</table>
<button class='btnquickadd' id='btnquickadd' type='button'><?php $clang->eT('Quick add...') ?></button>
<p><input type='submit' name='method' value='<?php $clang->eT("Save Changes") ?>' id='saveallbtn_<?php echo $lslanguage ?>' /></p>
<p><input type='submit' name='method' value='<?php $clang->eT("Save changes") ?>' id='saveallbtn_<?php echo $lslanguage ?>' /></p>
</div>
<?php
$first=false;
Expand All @@ -119,13 +119,13 @@
<li>
<label>&nbsp;</label>
<?php echo CHtml::dropDownList('type', 'files', array('files' => $clang->gT('Files'), 'flash' => $clang->gT('Flash'), 'images' => $clang->gT('Images'))); ?>
<input type='submit' value="<?php $clang->eT("Browse Uploaded Resources") ?>" />
<input type='submit' value="<?php $clang->eT("Browse uploaded resources") ?>" />
</li>
<li>
<label>&nbsp;</label>
<input type='button'<?php echo hasResources($lid, 'label') === false ? ' disabled="disabled"' : '' ?>
onclick='window.open("<?php echo $this->createUrl("/admin/export/resources/export/label/lid/$lid"); ?>", "_blank")'
value="<?php $clang->eT("Export Resources As ZIP Archive") ?>" />
value="<?php $clang->eT("Export resources as ZIP archive") ?>" />
</li>
</ul>
</form>
Expand All @@ -137,12 +137,12 @@
<input type='hidden' name='action' value='importlabelresources' />
<ul style='list-style-type:none; text-align:center'>
<li>
<label for='the_file'><?php $clang->eT("Select ZIP File:") ?></label>
<label for='the_file'><?php $clang->eT("Select ZIP file:") ?></label>
<input id='the_file' name="the_file" type="file" size="50" />
</li>
<li>
<label>&nbsp;</label>
<input type='button' value='<?php $clang->eT("Import Resources ZIP Archive") ?>'
<input type='button' value='<?php $clang->eT("Import resources ZIP archive") ?>'
<?php echo !function_exists("zip_open") ? "onclick='alert(\"" . $clang->gT("zip library not supported by PHP, Import ZIP Disabled", "js") . "\");'" : "onclick='if (validatefilename(this.form,\"" . $clang->gT('Please select a file to import!', 'js') . "\")) { this.form.submit();}'" ?>/>
</li>
</ul>
Expand Down
Expand Up @@ -23,7 +23,7 @@
var duplicateanswercode='<?php $clang->eT('Error: You are trying to use duplicate answer codes.','js'); ?>';
var strNoLabelSet='<?php $clang->eT('There are no label sets which match the survey default language','js'); ?>';
var langs='<?php echo implode(';',$anslangs); ?>';
var ci_path="<?php echo Yii::app()->getConfig('imageurl'); ?>";
var sImageURL ="<?php echo Yii::app()->getConfig('imageurl'); ?>";
var saveaslabletitle = '<?php $clang->eT('Save as label set','js'); ?>';
var lanameurl = '<?php echo Yii::app()->createUrl('/admin/labels/getAllSets'); ?>';
var lasaveurl = '<?php echo Yii::app()->createUrl('/admin/labels/ajaxSets'); ?>';
Expand Down Expand Up @@ -98,7 +98,7 @@

<?php if ($first)
{ ?>
<img class='handle' src='<?php echo Yii::app()->getConfig('imageurl'); ?>/handle.png' /></td><td><input type='hidden' class='oldcode' id='oldcode_<?php echo $position; ?>_<?php echo $scale_id; ?>' name='oldcode_<?php echo $position; ?>_<?php echo $scale_id; ?>' value="<?php echo $row['code']; ?>" /><input type='text' class='code' id='code_<?php echo $position; ?>_<?php echo $scale_id; ?>' name='code_<?php echo $position; ?>_<?php echo $scale_id; ?>' value="<?php echo $row['code']; ?>" maxlength='5' size='5'
<img class='handle' src='<?php echo $sImageURL; ?>handle.png' /></td><td><input type='hidden' class='oldcode' id='oldcode_<?php echo $position; ?>_<?php echo $scale_id; ?>' name='oldcode_<?php echo $position; ?>_<?php echo $scale_id; ?>' value="<?php echo $row['code']; ?>" /><input type='text' class='code' id='code_<?php echo $position; ?>_<?php echo $scale_id; ?>' name='code_<?php echo $position; ?>_<?php echo $scale_id; ?>' value="<?php echo $row['code']; ?>" maxlength='5' size='5'
onkeypress="return goodchars(event,'1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ_')"
/>
<?php }
Expand Down Expand Up @@ -137,8 +137,8 @@
<?php echo getEditor("editanswer","answer_".$row['language']."_{$row['sortorder']}_{$scale_id}", "[".$clang->gT("Answer:", "js")."](".$row['language'].")",$surveyid,$gid,$qid,'editanswer'); ?>


</td><td><img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/addanswer.png' class='btnaddanswer' />
<img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/deleteanswer.png' class='btndelanswer' />
</td><td><img src='<?php echo $sImageURL; ?>addanswer.png' class='btnaddanswer' />
<img src='<?php echo $sImageURL; ?>deleteanswer.png' class='btndelanswer' />

</td></tr>
<?php $position++;
Expand Down

0 comments on commit e3c9652

Please sign in to comment.