Skip to content

Commit

Permalink
Dev: template => theme, in views eT/gT
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Nov 22, 2017
1 parent 8970ef3 commit 2cff408
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 37 deletions.
18 changes: 9 additions & 9 deletions application/views/admin/global_settings/_general.php
Expand Up @@ -10,8 +10,8 @@
$thisadmintheme=getGlobalSetting('admintheme');
$thisdefaulthtmleditormode=getGlobalSetting('defaulthtmleditormode');
$thisdefaultquestionselectormode=getGlobalSetting('defaultquestionselectormode');
$thisdefaultthemeteeditormode=getGlobalSetting('defaultthemeteeditormode');
$dateformatdata=getDateFormatData(Yii::app()->session['dateformat']);
$thisdefaultthemeteeditormode=getGlobalSetting('defaultthemeteeditormode');
$dateformatdata=getDateFormatData(Yii::app()->session['dateformat']);
?>

<div class="container-fluid">
Expand All @@ -31,7 +31,7 @@
<div class="row ls-space margin top-10">
<div class="form-group">
<label class="col-sm-12 text-left control-label" for="defaulttheme">
<?php eT("Default template:"); echo ((Yii::app()->getConfig("demoMode")==true)?'*':'');?>
<?php eT("Default theme:"); echo ((Yii::app()->getConfig("demoMode")==true)?'*':'');?>
</label>
<div class="col-sm-12">
<select class="form-control" name="defaulttheme" id="defaulttheme">
Expand All @@ -48,7 +48,7 @@
<div class="row ls-space margin top-10">
<div class="form-group">
<label class="col-sm-12 text-left control-label" for="admintheme">
<?php eT("Administration template:"); ?>
<?php eT("Administration theme:"); ?>
</label>
<div class="col-sm-12">
<select class="form-control" name="admintheme" id="admintheme">
Expand All @@ -62,7 +62,7 @@
<?php if(Permission::model()->hasGlobalPermission('superadmin','read')):?>
<div class="col-sm-12 control-label ">
<p class="text-info text-left">
<?php eT("You can add your custom templates in upload/admintheme");?>
<?php eT("You can add your custom themes in upload/admintheme");?>
</p>
</div>
<?php endif;?>
Expand Down Expand Up @@ -147,7 +147,7 @@
<div class='col-sm-12'>
<select class='form-control' name='characterset' id='characterset'>
<?php foreach ($aEncodings as $code => $charset): ?>
<option value='<?php echo $code; ?>'
<option value='<?php echo $code; ?>'
<?php if (array_key_exists($thischaracterset, $aEncodings) && $code==$thischaracterset): ?>
selected='selected'
<?php elseif (!array_key_exists($thischaracterset, $aEncodings) && $code == "auto"): ?>
Expand Down Expand Up @@ -204,7 +204,7 @@
));
?>
</div>
</div>
</div>
</div>
<!-- Default question type selector mode -->
<div class="row ls-space margin top-10">
Expand All @@ -226,7 +226,7 @@
</div>
</div>
</div>
<!-- Default template editor mode -->
<!-- Default theme editor mode -->
<div class="row ls-space margin top-10">
<div class="form-group">
<label class="col-sm-12 text-left control-label" for='defaultthemeteeditormode'>
Expand All @@ -253,4 +253,4 @@
<p>
<?php eT("Note: Demo mode is activated. Marked (*) settings can't be changed."); ?>
</p>
<?php endif; ?>
<?php endif; ?>
4 changes: 2 additions & 2 deletions application/views/admin/global_settings/_storage_ajax.php
Expand Up @@ -21,7 +21,7 @@
<td><?php echo $surveySize; ?></td>
</tr>
<tr>
<td><?php eT('Template storage'); ?></td>
<td><?php eT('Themes storage'); ?></td>
<td><?php echo $templateSize; ?></td>
</tr>
<tr>
Expand Down Expand Up @@ -63,7 +63,7 @@ class='fa fa-trash pull-right btn btn-danger btn-xs'
<?php endif; ?>

<?php if ($templates): ?>
<label><?php eT('Template storage'); ?></label>
<label><?php eT('Themes storage'); ?></label>
<table class='table table-striped table-bordered'>
<?php foreach ($templates as $templates): ?>
<tr>
Expand Down
3 changes: 1 addition & 2 deletions application/views/admin/super/welcome.php
Expand Up @@ -20,8 +20,7 @@
gT('Stay safe and up to date');
gT('Label sets');
gT('Edit label sets');
gT('Templates');
gT('View templates list');
gT('Themes');
?>

<!-- Welcome view -->
Expand Down
Expand Up @@ -13,7 +13,7 @@
<div class="col-sm-12" id='carrousel-container'>
<div class="row">
<div class="col-sm-12" id="item-container"> <!-- width defined in css -->
<div class="h4"><?php eT('Select your template:'); ?></div>
<div class="h4"><?php eT('Select your theme:'); ?></div>

<?php foreach($templates as $key=>$template):?>
<?php if (Permission::model()->hasGlobalPermission('superadmin','read') || Permission::model()->hasGlobalPermission('templates','read') || hasTemplateManageRights(Yii::app()->session["loginID"], $key) == 1 || $oSurvey->template==htmlspecialchars($key) ): ?>
Expand Down
16 changes: 4 additions & 12 deletions application/views/admin/survey/surveySummary_view.php
Expand Up @@ -59,14 +59,6 @@
<?php eT('Set below if your questions are shown one at a time, group by group or all on one page.');?>
</div>
<?php endif;?>

<?php /* Commented out for the moment because it is not properly working
if(intval($templateapiversion) < intval(App()->getConfig("versionnumber")) ):?>
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span>&times;</span></button>
<strong><?php eT('This template is out of date.');?></strong> <?php eT('We can not guarantee optimum operation. It would be preferable to use a new template.');?>
</div>
<?php endif; */ ?>
</div>
</div>

Expand Down Expand Up @@ -336,7 +328,7 @@
</div> <!-- row boxes and template-->
</div>
</div>

<script>$(function(){$('#survey-action-chevron').on('click', surveyQuickActionTrigger);});</script>

<div class="row">
Expand Down Expand Up @@ -526,9 +518,9 @@
<?php $templatename = $oSurvey->template;
if (Permission::model()->hasGlobalPermission('templates','read'))
{
$sTemplateOptionsUrl = $this->createUrl("admin/themeoptions/sa/updatesurvey",array('surveyid'=>$oSurvey->sid, "gsid"=>$oSurvey->gsid));
$sTemplateEditorUrl = $this->createUrl("admin/themes/sa/view",array('templatename' => $oSurvey->template));
//$sTemplateEditorUrl = $this->createUrl("admin/themes/sa/view",array('editfile'=>'layout_first_page.twig', "screenname"=>'welcome', 'template' => $oSurvey->template));
$sTemplateOptionsUrl = $this->createUrl("admin/themeoptions/sa/updatesurvey",array('surveyid'=>$oSurvey->sid, "gsid"=>$oSurvey->gsid));
$sTemplateEditorUrl = $this->createUrl("admin/themes/sa/view",array('templatename' => $oSurvey->template));
//$sTemplateEditorUrl = $this->createUrl("admin/themes/sa/view",array('editfile'=>'layout_first_page.twig', "screenname"=>'welcome', 'template' => $oSurvey->template));
?>
<?php echo $templatename; ?>
<a href='<?=$sTemplateOptionsUrl?>' title="<?php eT("Open template options"); ?>" class="btn btn-default btn-xs"><i class="fa fa-paint-brush"></i></a>
Expand Down
3 changes: 1 addition & 2 deletions application/views/admin/surveysgroups/update.php
Expand Up @@ -22,7 +22,7 @@
<ul class="nav nav-tabs" id="surveygrouptabsystem" role="tablist">
<li class="active"><a href="#surveysInThisGroup"><?php eT('Surveys in this group'); ?></a></li>
<li><a href="#settingsForThisGroup"><?php eT('Settings for this survey group'); ?></a></li>
<li><a href="#templateSettingsFortThisGroup"><?php eT('Template options for this survey group'); ?></a></li>
<li><a href="#templateSettingsFortThisGroup"><?php eT('Themes options for this survey group'); ?></a></li>
</ul>
<div class="tab-content">
<div id="surveysInThisGroup" class="tab-pane active">
Expand All @@ -42,7 +42,6 @@
<div id="templateSettingsFortThisGroup" class="tab-pane">
<?php
if (is_a($templateOptionsModel, 'TemplateConfiguration')){
// $this->renderPartial('./themeoptions/update', array('model'=>$templateOptionsModel, 'templateOptionPage'=>$templateOptionPage));
$this->renderPartial('./themeoptions/index', array('model'=>$templateOptionsModel, 'bFromSurveyGroup'=>true));
}
?>
Expand Down
6 changes: 3 additions & 3 deletions application/views/admin/themes/templateeditorbar_view.php
Expand Up @@ -280,10 +280,10 @@ function copyprompt(text, defvalue, copydirectory, action)
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span >&times;</span></button>
<span class="fa fa-info-sign" ></span>&nbsp;&nbsp;&nbsp;
<strong>
<?php eT('Note: This is a standard template.');?>
<?php eT('Note: This is a standard theme.');?>
</strong>
<?php
printf(gT('If you want to modify it %s you can extend it%s.'),"<a href='#' title=\"".gT("Extend template")."\""
printf(gT('If you want to modify it %s you can extend it%s.'),"<a href='#' title=\"".gT("Extend theme")."\""
." onclick=\"javascript: copyprompt('".gT("Please enter the name for the new template:")."', '".gT("extends_")."$templatename', '$templatename', 'copy')\">",'</a>');
?>
</div>
Expand All @@ -293,7 +293,7 @@ function copyprompt(text, defvalue, copydirectory, action)
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span >&times;</span></button>
<div class="h4">
<span class="fa fa-info-sign" ></span>
<?php eT('This template is out of date.');?>
<?php eT('This theme is out of date.');?>
</div>
<?php
printf(gT("We can not guarantee optimum operation. It would be preferable to no longer use it or to make it compatible with the version %s of the LimeSurvey API."),intval(App()->getConfig("versionnumber")));
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/themes/templatesummary_view.php
Expand Up @@ -219,7 +219,7 @@ class = "<?php if($file == $relativePathEditfile ){echo 'text-danger';}else{echo

<div class="">
<a href="#" data-toggle="modal" data-target="#fileHelp" />
<?php eT('Tip: How to embed a picture in your template?'); ?>
<?php eT('Tip: How to embed a picture in your theme?'); ?>
</a>
</div>
</div>
Expand All @@ -230,7 +230,7 @@ class = "<?php if($file == $relativePathEditfile ){echo 'text-danger';}else{echo
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<div class="modal-title h4" id="myModalLabel"><?php eT('Tip: How to display a picture in your template?'); ?></div>
<div class="modal-title h4" id="myModalLabel"><?php eT('Tip: How to display a picture in your theme?'); ?></div>
</div>
<div class="modal-body">
<?php eT('To use a picture in a .twig file:');?><br/>
Expand Down
7 changes: 3 additions & 4 deletions application/views/admin/user/setusertemplates.php
@@ -1,4 +1,4 @@
<div class="pagetitle h3"><?php printf(gT('Edit template permissions for user %s'),"<em>".\CHtml::encode($oUser->users_name)."</em>");?></div>
<div class="pagetitle h3"><?php printf(gT('Edit theme permissions for user %s'),"<em>".\CHtml::encode($oUser->users_name)."</em>");?></div>
<div class="row" style="margin-bottom: 100px">
<div class="col-lg-6 col-lg-offset-3 content-right">

Expand All @@ -7,15 +7,15 @@
<thead>
<tr>
<th>
<?php eT('Template name');?>
<?php eT('Theme name');?>
</th>
<th>
<?php eT('Access');?>
</th>
</tr>
<tr>
<th>
<?php eT('All templates');?>
<?php eT('All themes');?>
</th>
<th>
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
Expand Down Expand Up @@ -67,4 +67,3 @@

</div>
</div>

0 comments on commit 2cff408

Please sign in to comment.