Commit a59ab28b authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review

Merge "Restoring lost part of template from moving to bootstrap"

parents b17baa5e 9e1ecebf
......@@ -4,6 +4,11 @@
</div>
{else}
<ul id="watchlistblock" class="viewlist list-group">
{*
I wanted to put author_link_index in templates/author.tpl, but its
state is non-persistent. So until Dwoo gets smarter...
*}
{assign var='author_link_index' value=1}
{foreach $views as item=view}
<li class="{cycle values='r0,r1'} list-group-item">
<h4 class="title list-group-item-heading">
......@@ -11,6 +16,32 @@
{$view->title}
</a>
</h4>
{if $view->sharedby}
<div class="groupuserdate text-small">
{if $view->group && $loggedin}
<a class="text-link" href="{group_homepage_url($view->groupdata)}">{$view->sharedby}</a>
{elseif $view->owner && $loggedin}
{if $view->anonymous}
{if $view->staff_or_admin}
{assign var='realauthor' value=$view->sharedby}
{assign var='realauthorlink' value=profile_url($view->user)}
{/if}
{assign var='author' value=get_string('anonymoususer')}
{include file=author.tpl}
{if $view->staff_or_admin}
{assign var='author_link_index' value=$author_link_index+1}
{/if}
{else}
<a class="text-link" href="{profile_url($view->user)}">{$view->sharedby}</a>
{/if}
{else}
{$view->sharedby}
{/if}
<span class="postedon text-midtone">
- {if $view->mtime == $view->ctime}{str tag=Created}{else}{str tag=Updated}{/if}
{$view->mtime|strtotime|format_date:'strftimedate'}</span>
</div>
{/if}
</li>
{/foreach}
</ul>
......
......@@ -36,4 +36,5 @@ Scenario: Viewing last updated time on watchlist items (Bug 1444784)
| B's Page 02 | UserB's page 02 | user | userA |
And I am on homepage
Then I should not see "D's Page 01"
And I should see "Admin User" in the "ul#watchlistblock" "css_element"
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