Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: Fix some issue in template editor : save/load review
- Loading branch information
Showing
4 changed files
with
128 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
application/views/admin/templates/templateeditor_question_answertext_view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
<?php | ||
App()->getController()->renderPartial('/survey/questions/longfreetext/answer', array( | ||
App()->getController()->renderPartial('/survey/questions/answer/longfreetext/answer', array( | ||
'extraclass' => 'col-sm-12', | ||
'coreClass' =>"ls-answers answer-item text-item", | ||
'withColumn' =>true, | ||
'kpclass' => '', | ||
'name' => '1234X56X78', | ||
'basename' => '1234X56X78', | ||
'drows' => 5, | ||
'dispVal' => gT('Some text in this answer'), | ||
'tiwidth' => 40, | ||
'maxlength' => '', | ||
'checkconditionFunction' => '', | ||
'inputsize' => null | ||
)); | ||
?> |
152 changes: 91 additions & 61 deletions
152
application/views/admin/templates/templateeditor_surveylist_view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,95 @@ | ||
<ul class="surveys-list"> | ||
<li> | ||
<a class="surveytitle btn btn-primary" href="/LimeSurveyNext/index.php/282267?lang=en"> | ||
Survey Number 1 | ||
</a> | ||
<?php | ||
$outputSurveys = 0; | ||
$list = "<div class='surveys-list-container'>"; | ||
$list .= "<ul class='list-unstyled surveys-list'>"; | ||
|
||
<a class="view-stats btn btn-success" title="" data-toggle="tooltip" href="#" data-original-title="View statistics"> | ||
<span class="fa fa-bar-chart" aria-hidden="true"></span><span class="sr-only"><?php eT("View statistics");?></span> | ||
</a> | ||
</li> | ||
foreach($publicSurveys as $survey) | ||
{ | ||
$outputSurveys++; | ||
/* get final lang of survey */ | ||
if(!in_array(App()->language,$survey->getAllLanguages())){ | ||
$surveylang=$survey->language; | ||
}else{ | ||
$surveylang=App()->language; | ||
} | ||
/* get the col class for with (src : http://encosia.com/using-btn-block-bootstrap-3-dropdown-button-groups) */ | ||
if ($survey->publicstatistics == "Y"){ | ||
$colClass="col-xs-10 col-md-11"; | ||
}else{ | ||
$colClass="col-xs-12"; | ||
} | ||
$surveyLine = CHtml::link( | ||
$survey->localizedTitle, | ||
array( | ||
'survey/index', | ||
'sid' => $survey->sid, | ||
'lang' => $surveylang, | ||
), | ||
array( | ||
'class' => "surveytitle btn btn-primary {$colClass}", | ||
'title'=>gT('Start survey'), | ||
'lang'=>$surveylang // Must add dir ? | ||
) | ||
); | ||
if ($survey->publicstatistics == "Y"){ | ||
$surveyLine .= CHtml::link('<span class="fa fa-bar-chart" aria-hidden="true"></span><span class="sr-only">'. gT('View statistics') .'</span>', | ||
array('statistics_user/action', 'surveyid' => $survey->sid,'language' => $surveylang), | ||
array( | ||
'class'=>'view-stats btn btn-success col-xs-2 col-md-1', | ||
'title'=>gT('View statistics'), | ||
) | ||
); | ||
} | ||
$list .= CHtml::tag("li", | ||
array("class"=>"btn-group btn-block"), | ||
$surveyLine | ||
); | ||
} | ||
|
||
<li> | ||
<a class="surveytitle btn btn-primary" href="/LimeSurveyNext/index.php/282267?lang=en"> | ||
Survey Number 2 | ||
</a> | ||
<a class="view-stats btn btn-success" title="" data-toggle="tooltip" href="#" data-original-title="View statistics"> | ||
<span class="fa fa-bar-chart" aria-hidden="true"></span><span class="sr-only"><?php eT("View statistics");?></span> | ||
</a> | ||
</li> | ||
$list .= "</ul>"; | ||
$list .= "</div>"; | ||
|
||
<li> | ||
<a class="surveytitle btn btn-primary" href="/LimeSurveyNext/index.php/282267?lang=en"> | ||
Survey Number 3 | ||
</a> | ||
<a class="view-stats btn btn-success" title="" data-toggle="tooltip" href="#" data-original-title="View statistics"> | ||
<span class="fa fa-bar-chart" aria-hidden="true"></span><span class="sr-only"><?php eT("View statistics");?></span> | ||
</a> | ||
</li> | ||
if (!empty($futureSurveys)) /* Dis someone use it ? */ | ||
{ | ||
$list .= "<div class=\"survey-list-heading\">". gT("Following survey(s) are not yet active but you can register for them.")."</div>"; | ||
$list .= "<div class='surveys-list-container futuresurveys-list-container'>"; | ||
$list .= "<ul class='list-unstyled surveys-list'>"; | ||
foreach($futureSurveys as $survey) | ||
{ | ||
$outputSurveys++; | ||
if(!in_array(App()->language,$survey->getAllLanguages())){ | ||
$surveylang=$survey->language; | ||
}else{ | ||
$surveylang=App()->language; | ||
} | ||
$surveyLine = CHtml::link( | ||
$survey->localizedTitle, | ||
array( | ||
'survey/index', | ||
'sid' => $survey->sid, | ||
'lang' => $surveylang, | ||
), | ||
array( | ||
'class' => "surveytitle btn btn-primary col-xs-12", | ||
'title'=>gT('Start survey'), | ||
// broken : jquery-ui tooltip replace bs tooltip 'data-toggle'=>'tooltip', | ||
'lang'=>$surveylang // Must add dir ? | ||
) | ||
); | ||
$surveyLine .= CHtml::tag('div', array( | ||
'data-regformsurvey' => $survey->sid, | ||
'class' => 'col-xs-12' | ||
)); | ||
} | ||
$list .= "</ul>"; | ||
$list .= "</div>"; | ||
} | ||
|
||
<li> | ||
<a class="surveytitle btn btn-primary" href="/LimeSurveyNext/index.php/282267?lang=en"> | ||
Survey Number 4 | ||
</a> | ||
<a class="view-stats btn btn-success" title="" data-toggle="tooltip" href="#" data-original-title="View statistics"> | ||
<span class="fa fa-bar-chart" aria-hidden="true"></span><span class="sr-only"><?php eT("View statistics");?></span> | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a class="surveytitle btn btn-primary" href="/LimeSurveyNext/index.php/282267?lang=en"> | ||
Survey Number 5 | ||
</a> | ||
<a class="view-stats btn btn-success" title="" data-toggle="tooltip" href="#" data-original-title="View statistics"> | ||
<span class="fa fa-bar-chart" aria-hidden="true"></span><span class="sr-only"><?php eT("View statistics");?></span> | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a class="surveytitle btn btn-primary" href="/LimeSurveyNext/index.php/282267?lang=en"> | ||
Survey Number 6 | ||
</a> | ||
<a class="view-stats btn btn-success" title="" data-toggle="tooltip" href="#" data-original-title="View statistics"> | ||
<span class="fa fa-bar-chart" aria-hidden="true"></span><span class="sr-only"><?php eT("View statistics");?></span> | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a class="surveytitle btn btn-primary" href="/LimeSurveyNext/index.php/282267?lang=en"> | ||
Survey Number 7 | ||
</a> | ||
<a class="view-stats btn btn-success" title="" data-toggle="tooltip" href="#" data-original-title="View statistics"> | ||
<span class="fa fa-bar-chart" aria-hidden="true"></span><span class="sr-only"><?php eT("View statistics");?></span> | ||
</a> | ||
</li> | ||
</ul> | ||
$listheading="<div class='h3 '> | ||
".gT("The following surveys are available:")." | ||
</div>"; | ||
if( $outputSurveys==0) | ||
{ | ||
$list=CHtml::openTag('div',array('class'=>'col-xs-12')).gT("No available surveys").CHtml::closeTag('div'); | ||
} | ||
echo $list; |
9c7012d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still the 2 print views ....