Commit 5b3df34a authored by Son Nguyen's avatar Son Nguyen
Browse files

Remove 'Add one' link if user don't have permission to edit


group collections

(Bug #1033315)

Change-Id: Ie8c7c2378b756dcfc871e72ab33f2a6fd7073831
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent bd45e121
......@@ -131,7 +131,9 @@ $urlparamsstr = '';
if ($urlparams) {
$urlparamsstr = '&' . http_build_query($urlparams);
}
$smarty->assign('addonelink', get_config('wwwroot') . 'collection/edit.php?new=1' . $urlparamsstr);
if ($canedit) {
$smarty->assign('addonelink', get_config('wwwroot') . 'collection/edit.php?new=1' . $urlparamsstr);
}
if (!empty($institutionname) && ($institutionname != 'mahara')) {
$smarty->assign('institution', $institutionname);
......
......@@ -56,6 +56,6 @@
</table>
{$pagination|safe}
{else}
<div class="message">{str tag=nocollections section=collection} <a href={$addonelink}>{str tag=addone}</a></div>
<div class="message">{str tag=nocollections section=collection}{if $addonelink}<a href={$addonelink}>{str tag=addone}</a>{/if}</div>
{/if}
{include file="footer.tpl"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment