Commit 7d056ad1 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1681987: Hide artefact owner name from artefact details page"

parents 69b04f36 ef320532
......@@ -220,5 +220,7 @@ if (isset($addfeedbackform)) {
$smarty->assign('objectionform', $objectionform);
$smarty->assign('notrudeform', $notrudeform);
$smarty->assign('viewbeingwatched', $viewbeingwatched);
$smarty->assign('viewtitle', $view->get('title'));
$smarty->assign('viewdisplaytitle', $view->display_title(true, true, $view->display_author()));
$smarty->display('artefact/artefact.tpl');
......@@ -1259,6 +1259,8 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
}
public function render_self($options) {
global $USER;
require_once('license.php');
$options['id'] = $this->get('id');
......@@ -1272,10 +1274,12 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
}
$smarty = smarty_core();
// $smarty->assign('iconpath', $this->get_icon($options));
// $smarty->assign('iconpath', $this->get_icon($options));
$smarty->assign('downloadpath', $downloadpath);
$smarty->assign('filetype', $filetype);
$smarty->assign('ownername', $this->display_owner());
if ($USER->is_logged_in()) {
$smarty->assign('ownername', $this->display_owner());
}
$smarty->assign('created', strftime(get_string('strftimedaydatetime'), $this->get('ctime')));
$smarty->assign('modified', strftime(get_string('strftimedaydatetime'), $this->get('mtime')));
$smarty->assign('size', $this->describe_size() . ' (' . $this->get('size') . ' ' . get_string('bytes', 'artefact.file') . ')');
......
......@@ -25,10 +25,12 @@
<td>{list_tags owner=$owner tags=$tags}</td>
</tr>
{/if}
{if $ownername}
<tr>
<th>{str tag=Owner section=artefact.file}:</th>
<td>{$ownername}</td>
</tr>
{/if}
<tr>
<th>{str tag=Created section=artefact.file}:</th>
<td>{$created}</td>
......
......@@ -24,7 +24,7 @@
<span class="subsection-heading">{$artefacttitle}</span>
{/if}
<span class="metadata">
| {$view->display_title()|safe}
| {$viewdisplaytitle|safe}
{if $hasfeed}
<a href="{$feedlink}">
<span class="icon-rss icon pull-right" role="presentation" aria-hidden="true"></span>
......@@ -51,9 +51,9 @@
{if $artefact}
{if $viewbeingwatched}
{str tag=removefromwatchlistartefact section=view arg1=$view->get('title')}
{str tag=removefromwatchlistartefact section=view arg1=$viewtitle}
{else}
{str tag=addtowatchlistartefact section=view arg1=$view->get('title')}
{str tag=addtowatchlistartefact section=view arg1=$viewtitle}
{/if}
{else}
{if $viewbeingwatched}
......
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