Skip to content

Commit

Permalink
Fixed issue #07772: Useless icons appear on the IHM
Browse files Browse the repository at this point in the history
Removed unused icons in survey bar (when user doesn't have permissions)
  • Loading branch information
tpartner committed Apr 24, 2013
1 parent 2017a69 commit 0d77a92
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions application/views/admin/survey/surveybar_view.php
Expand Up @@ -50,7 +50,9 @@
</ul></li>
</ul></li>
<?php } ?>
<?php } ?>
<?php } ?>

<?php if($surveylocale || $surveysettings || $surveysecurity || $quotas || $assessments || $surveycontent) { ?>
<li><a href='#'>
<img src='<?php echo $sImageURL;?>edit.png' alt='<?php $clang->eT("Survey properties");?>' width="<?php echo $iIconSize;?>" height="<?php echo $iIconSize;?>"/></a><ul>
<?php if($surveylocale) { ?>
Expand Down Expand Up @@ -93,7 +95,11 @@
</li>
<?php } ?>
<?php } ?>
</ul></li>
</ul>
</li>
<?php } ?>

<?php if($surveydelete || $surveytranslate || hasSurveyPermission($surveyid,'surveycontent','update')) { ?>
<li><a href="#">
<img src='<?php echo $sImageURL;?>tools.png' alt='<?php $clang->eT("Tools");?>' width="<?php echo $iIconSize;?>" height="<?php echo $iIconSize;?>"/></a><ul>
<?php if ($surveydelete) { ?>
Expand Down Expand Up @@ -135,14 +141,19 @@
</ul>
</li>
<?php } ?>
</ul></li>
</ul>
</li>
<?php } ?>

<?php if($surveyexport || hasSurveyPermission($surveyid,'surveycontent','read')) { ?>
<li><a href='#'>
<img src='<?php echo $sImageURL;?>display_export.png' alt='<?php $clang->eT("Display / Export");?>' width="<?php echo $iIconSize;?>" height="<?php echo $iIconSize;?>"/></a><ul>
<img src='<?php echo $sImageURL;?>display_export.png' alt='<?php $clang->eT("Display / Export");?>' width="<?php echo $iIconSize;?>" height="<?php echo $iIconSize;?>"/></a>
<ul>
<?php if($surveyexport) { ?>
<li><a href='#'>
<img src='<?php echo $sImageURL;?>export_30.png' alt='' /> <?php $clang->eT("Export...");?></a>
<?php } ?>
<ul>
<ul>
<?php if($surveyexport) { ?>
<li><a href='<?php echo $this->createUrl("admin/export/sa/survey/action/exportstructurexml/surveyid/$surveyid");?>' >
<img src='<?php echo $sImageURL;?>export_30.png' alt='' /> <?php $clang->eT("Survey structure (.lss)");?></a>
Expand Down Expand Up @@ -198,8 +209,13 @@
</ul></li>
<?php }
} ?>
</ul></li>
<li><a href='#'><img src='<?php echo $sImageURL;?>responses.png' alt='<?php $clang->eT("Responses");?>' width="<?php echo $iIconSize;?>" height="<?php echo $iIconSize;?>"/></a><ul>
</ul>
</li>
<?php } ?>

<?php if($respstatsread || $responsescreate || $responsesread) { ?>
<li><a href='#'><img src='<?php echo $sImageURL;?>responses.png' alt='<?php $clang->eT("Responses");?>' width="<?php echo $iIconSize;?>" height="<?php echo $iIconSize;?>"/></a>
<ul>
<?php if($respstatsread) {
if($activated) { ?>
<li><a href='<?php echo $this->createUrl("admin/responses/sa/index/surveyid/$surveyid/");?>' >
Expand Down Expand Up @@ -227,7 +243,9 @@
<img src='<?php echo $sImageURL;?>saved_disabled_30.png' alt='' /> <?php $clang->eT("Partial (saved) responses");?></a></li>
<?php }
} ?>
</ul></li>
</ul>
</li>
<?php } ?>

<?php if($surveycontent)
{
Expand Down

0 comments on commit 0d77a92

Please sign in to comment.