Commit 6d9490ca authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't display owner column when listing views by one owner

parent 7300bd94
...@@ -270,7 +270,7 @@ $string['selectaviewtocopy'] = 'Select the View you wish to copy:'; ...@@ -270,7 +270,7 @@ $string['selectaviewtocopy'] = 'Select the View you wish to copy:';
$string['listviews'] = 'List Views'; $string['listviews'] = 'List Views';
$string['nocopyableviewsfound'] = 'No Views that you can copy'; $string['nocopyableviewsfound'] = 'No Views that you can copy';
$string['noownersfound'] = 'No owners found'; $string['noownersfound'] = 'No owners found';
$string['displayingviewsby'] = 'Displaying Views by %s'; $string['viewsby'] = 'Views by %s';
$string['Preview'] = 'Preview'; $string['Preview'] = 'Preview';
$string['closepreview'] = 'Close Preview'; $string['closepreview'] = 'Close Preview';
......
...@@ -2038,7 +2038,7 @@ class View { ...@@ -2038,7 +2038,7 @@ class View {
} }
} }
} }
$smarty->assign('ownername', get_string('displayingviewsby', 'view', $ownername)); $smarty->assign('ownername', get_string('viewsby', 'view', $ownername));
} }
$search->html = $smarty->fetch('view/templatesearchresults.tpl'); $search->html = $smarty->fetch('view/templatesearchresults.tpl');
$search->count = $results->count; $search->count = $results->count;
......
<table class="templateresults tablerenderer"> <table class="templateresults tablerenderer">
<thead> <thead>
{if ($ownername)}<tr><td colspan="3">{$ownername}</td></tr>{/if} {if ($ownername)}
<tr><th colspan="3">{$ownername}</th></tr>
{else}
<tr> <tr>
<th>{str tag=name}</th> <th>{str tag=name}</th>
<th>{str tag=Owner section=view}</th> <th>{str tag=Owner section=view}</th>
<th></th> <th></th>
</tr> </tr>
{/if}
</thead> </thead>
<tbody> <tbody>
{if !empty($results)} {if !empty($results)}
{foreach from=$results item=row} {foreach from=$results item=row}
<tr class="r{cycle values=0,1}"> <tr class="r{cycle values=0,1}">
<td> <td{if ($ownername)} colspan="2"{/if}>
<a class="viewlink" href="{$WWWROOT}view/view.php?id={$row.id|escape}" target="_blank">{$row.title|escape}</a> <a class="viewlink" href="{$WWWROOT}view/view.php?id={$row.id|escape}" target="_blank">{$row.title|escape}</a>
</td> </td>
<td> {if (!$ownername)}
{$row.sharedby|escape} <td>{$row.sharedby|escape}</td>
</td> {/if}
<td> <td>
{$row.form} {$row.form}
</td> </td>
......
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