Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the 'saved' admin controller - GCI Task #7228219 by gautamgupta
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@11681 b72ed6b6-b9f8-46b5-92b4-906544132732
- Loading branch information
1 parent
b663408
commit bdee7b6
Showing
3 changed files
with
118 additions
and
149 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div class='menubar'> | ||
<div class='menubar-title ui-widget-header'> | ||
<span style='font-weight:bold;'><?php $clang->eT('Saved Responses'); ?></span> | ||
<?php echo $sSurveyName . ' ' . sprintf($clang->gT('ID: %s'), $iSurveyId); ?> | ||
</div> | ||
<div class='menubar-main'> | ||
<div class='menubar-left'> | ||
|
||
<a href="<?php echo $this->createUrl("admin/survey/sa/view/surveyid/{$iSurveyId}"); ?>" title="<?php $clang->eT('Return to survey administration'); ?>"> | ||
<img name="<?php $clang->eT('Administration'); ?>" src="<?php echo Yii::app()->getConfig('imageurl'); ?>/home.png" alt="<?php echo $clang->eT('Return to survey administration'); ?>" align='left'> | ||
</a> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div class='header ui-widget-header'> | ||
<?php $clang->eT('Saved Responses:'); ?> <?php echo getSavedCount($iSurveyId); ?> | ||
</div> |
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,35 +1,44 @@ | ||
<table class='browsetable' align='center'> | ||
<thead><tr><th>SCID</th><th> | ||
<?php echo $clang->gT("Actions"); ?></th><th> | ||
<?php echo $clang->gT("Identifier"); ?></th><th> | ||
<?php echo $clang->gT("IP address"); ?></th><th> | ||
<?php echo $clang->gT("Date Saved"); ?></th><th> | ||
<?php echo $clang->gT("Email address"); ?></th> | ||
</tr></thead><tbody> | ||
<?php foreach($result->readAll() as $row) | ||
{ ?> | ||
<tr> | ||
<td><?php echo $row['scid']; ?></td> | ||
<td align='center'> | ||
|
||
<?php if (bHasSurveyPermission($surveyid,'responses','update')) | ||
{ ?> | ||
<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='image' src='<?php echo Yii::app()->getConfig('imageurl'); ?>/token_edit.png' title=' | ||
<?php echo $clang->gT("Edit entry"); ?>' onclick="window.open('<?php echo $_SERVER['PHP_SELF']."?action=dataentry&subaction=edit&id={$row['srid']}&sid={$surveyid}"?>', '_top')" /> | ||
<?php } | ||
if (bHasSurveyPermission($surveyid,'responses','delete')) | ||
{ ?> | ||
<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='image' src='<?php echo Yii::app()->getConfig('imageurl'); ?>/token_delete.png' title=' | ||
<?php echo $clang->gT("Delete entry"); ?>' onclick="if (confirm('<?php echo $clang->gT("Are you sure you want to delete this entry?","js"); ?>')) { <?php echo get2post($this->createUrl("admin/saved/sa/delete?action=saved&sid=$surveyid&subaction=delete&scid={$row['scid']}&srid={$row['srid']}")); ?>}" /> | ||
<?php } ?> | ||
|
||
</td> | ||
<td> <?php echo $row['identifier']; ?></td> | ||
<td> <?php echo $row['ip']; ?></td> | ||
<td> <?php echo $row['saved_date']; ?></td> | ||
<td><a href='mailto: <?php echo $row['email']; ?>'> <?php echo $row['email']; ?></td> | ||
|
||
</tr> | ||
<?php } ?> | ||
</tbody></table><br />  | ||
|
||
<p> | ||
<table class='browsetable' align='center'> | ||
<thead> | ||
<tr> | ||
<th><?php $clang->eT('ID'); ?></th> | ||
<th><?php $clang->eT('Actions'); ?></th> | ||
<th><?php $clang->eT('Identifier'); ?></th> | ||
<th><?php $clang->eT('IP address'); ?></th> | ||
<th><?php $clang->eT('Date Saved'); ?></th> | ||
<th><?php $clang->eT('Email address'); ?></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<?php foreach($aResults as $oResult) | ||
{ ?> | ||
<tr> | ||
<td><?php echo $oResult->scid; ?></td> | ||
<td align='center'> | ||
|
||
<?php if (bHasSurveyPermission($iSurveyId,'responses','update')) | ||
{ ?> | ||
<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='image' src='<?php echo Yii::app()->getConfig('imageurl'); ?>/token_edit.png' | ||
title='<?php $clang->eT('Edit entry'); ?>' onclick="window.open('<?php echo $this->createUrl("admin/dataentry/sa/editdata/subaction/edit/surveyid/{$iSurveyId}/id/{$oResult->srid}"); ?>', '_top')" /> | ||
<?php } | ||
if (bHasSurveyPermission($iSurveyId,'responses','delete')) | ||
{ ?> | ||
<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='image' src='<?php echo Yii::app()->getConfig('imageurl'); ?>/token_delete.png' | ||
title='<?php $clang->eT('Delete entry'); ?>' onclick="if (confirm('<?php $clang->eT('Are you sure you want to delete this entry?', 'js'); ?>')) { window.open('<?php echo $this->createUrl("admin/saved/sa/delete/surveyid/{$iSurveyId}/srid/{$oResult->srid}/scid/{$oResult->scid}"); ?>', '_top'); }" /> | ||
<?php } ?> | ||
|
||
</td> | ||
|
||
<td><?php echo $oResult->identifier; ?></td> | ||
<td><?php echo $oResult->ip; ?></td> | ||
<td><?php echo $oResult->saved_date; ?></td> | ||
<td><a href='mailto: <?php echo $oResult->email; ?>'> <?php echo $oResult->email; ?></td> | ||
|
||
</tr> | ||
<?php } ?> | ||
</tbody> | ||
</table> | ||
<br />  | ||
</p> |