Commit 35849995 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Show updated or created in latest views block


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 92441fe4
......@@ -11,7 +11,10 @@
{else}
{$view.sharedby|escape}
{/if}
<span class="postedon">{$view.mtime|strtotime|format_date:'strftimedate'}</span>
<span class="postedon">
{if $view.mtime == $view.ctime}{str tag=Created}{else}{str tag=Updated}{/if}
{$view.mtime|strtotime|format_date:'strftimedate'}
</span>
</div>
{/if}
{/foreach}
......
......@@ -874,6 +874,7 @@ $string['backto'] = 'Back to %s';
$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
$string['formatpostbbcode'] = 'You can format your post using BBCode. %sLearn more%s';
$string['Created'] = 'Created';
$string['Updated'] = 'Updated';
$string['Total'] = 'Total';
$string['Visits'] = 'Visits';
......
......@@ -2331,9 +2331,12 @@ class View {
$viewdata = get_records_sql_array('
SELECT * FROM (
SELECT
v.id, v.title, v.description, v.owner, v.ownerformat, v.group, v.institution, v.template, v.mtime
v.id, v.title, v.description, v.owner, v.ownerformat, v.group, v.institution,
v.template, v.mtime, v.ctime
' . $from . $where . '
GROUP BY v.id, v.title, v.description, v.owner, v.ownerformat, v.group, v.institution, v.template, v.mtime
GROUP BY
v.id, v.title, v.description, v.owner, v.ownerformat, v.group, v.institution,
v.template, v.mtime, v.ctime
) a
ORDER BY a.' . $orderby . ', a.id ASC',
$ph, $offset, $limit
......
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