Skip to content

Commit

Permalink
New feature: Link template name to template editor if user has suffic…
Browse files Browse the repository at this point in the history
…ient permissions.

New feature: Link template name to template editor if user has
sufficient permissions.
Dev: Please review and check if there is anything I may have missed.
Dev: Sorry for adding new features to 2.06 but this adjustment only
affects a single view and hopefully doesn't cause any problems.
  • Loading branch information
maziminke committed Aug 19, 2015
1 parent 6ae330f commit f094eed
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion application/views/admin/survey/surveySummary_view.php
Expand Up @@ -106,7 +106,19 @@
<strong><?php eT("Template:");?></strong>
</td>
<td>
<?php echo $surveyinfo['template'];?>
<?php $templatename = $surveyinfo['template'];
if (Permission::model()->hasGlobalPermission('templates','read'))
{
$templateurl_url = $this->createAbsoluteUrl("admin/templates/sa/view/editfile/startpage.pstpl/screenname/welcome/templatename/$templatename"); ?>
<a href='<?php echo $templateurl_url?>' target='_blank'><?php echo $templatename; ?></a>
<?php
}
else
{
echo $templatename;
}
?>

</td>
</tr>
<tr>
Expand Down

1 comment on commit f094eed

@maziminke
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Denis/Carsten, I tested using different user rights but feel free to revert if there is anything I forgot to take into account.

Please sign in to comment.