Commit 99e18933 authored by Robert Lyon's avatar Robert Lyon
Browse files

Hiding author name when page is anonymous on page lists (Bug 1386010)



Some places that were still showing the author's name:
- in elasticsearch
- on shared with me pages
- in 'latest pages' block on dashboard.

To test: see bug report

Change-Id: I106b7d506c2dc3d104f74ea884ff4285e5856483
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 76c35fdf
......@@ -26,6 +26,7 @@ $string['bypassindexnamedescription'] = '(Optional) If provided, Mahara will loa
$string['collection'] = 'Collection';
$string['confignotset'] = '(not set)';
$string['createdby'] = 'Created by %s';
$string['createdbyanon'] = 'Created by (Author\'s name hidden)';
$string['cronlimit'] = 'Cron record limit';
$string['cronlimitdescription'] = 'Maximum number of records to be passed from the queue to the Elasticsearch server on each cron run (Empty or 0 for unlimited).';
$string['dateoldestfirst'] = 'Date (oldest first)';
......
......@@ -4,7 +4,11 @@
<h3 class="title"><a href="{$WWWROOT}view/view.php?id={$record->id}">{$record->title}</a> <span class="artefacttype">({str tag=page section=search.elasticsearch})</span></h3>
{if $record->createdbyname}
<div class="createdby">
{str tag=createdby section=search.elasticsearch arg1='<a href="`$record->createdby|profile_url`">`$record->createdbyname|safe`</a>'}
{if $record->anonymise}
{str tag=createdbyanon section=search.elasticsearch}
{else}
{str tag=createdby section=search.elasticsearch arg1='<a href="`$record->createdby|profile_url`">`$record->createdbyname|safe`</a>'}
{/if}
</div>
{/if}
<div class="detail">{$record->description|str_shorten_html:140:true|safe}</div>
......
......@@ -7,7 +7,11 @@
{if $view.group}
<a href="{group_homepage_url($view.groupdata)}">{$view.sharedby}</a>
{elseif $view.owner}
<a href="{profile_url($view.user)}">{$view.sharedby}</a>
{if $view.anonymous}
{str tag=anonymoususer section=mahara}
{else}
<a href="{profile_url($view.user)}">{$view.sharedby}</a>
{/if}
{else}
{$view.sharedby}
{/if}
......
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