Commit 05aad4e5 authored by Maria Sorica's avatar Maria Sorica Committed by Cecilia Vela Gurovic

Bug 1734182: Display all versions of the site privacy statement

The versions are displayed under Administration -> Configure site ->
Privacy statement in order to have a log of when changes were made
by whom.

behatnotneeded

Change-Id: I9a4e72e9ae97453e171e849bff5c4b8f1204e2e1
parent f724afbe
......@@ -22,10 +22,15 @@ if (!is_logged_in()) {
throw new AccessDeniedException();
}
$data = '<div class="no-results"> Site settings here </div>';
$data = get_records_sql_assoc("
SELECT s.id, s.version, u.firstname, u.lastname, u.id AS userid, s.content, s.ctime
FROM {site_content_version} s
LEFT JOIN {usr} u ON s.author = u.id");
krsort($data);
$smarty = smarty();
setpageicon($smarty, 'icon-umbrella');
$smarty->assign('data', $data);
$smarty->assign('results', $data);
$smarty->display('admin/site/privacy.tpl');
......@@ -1321,3 +1321,9 @@ $string['nobehatfeaturefiles'] = 'No behat feature files found';
$string['behatmatchingrows'] = '%s in ';
$string['behatnocore'] = 'Unable to read core behat steps from behat.yml file';
$string['behatstepnotused'] = 'This behat step is not currently used';
// Privacy Statement section
$string['author'] = 'Author';
$string['content'] = 'Content';
$string['creationdate'] = 'Creation date';
$string['version'] = 'Version';
{include file="header.tpl"}
<div class="lead">{str tag="privacypagedescription" section="admin"}</div>
<div class="panel panel-default">
<div id="privacysettingscontainer">
{$data|safe}
<div class="row">
<div class="col-md-12">
<div class="panel panel-default view-container">
<div class="table-responsive">
<table id="adminstitutionslist" class="fullwidth table table-striped">
<thead>
<tr>
<th>{str tag="version" section="admin"}</th>
<th>{str tag="author" section="admin"}</th>
<th>{str tag="content" section="admin"}</th>
<th>{str tag="creationdate" section="admin"}</th>
<th><span class="accessible-hidden sr-only">{str tag=edit}</span></th>
</tr>
</thead>
<tbody>
{foreach from=$results item=result key=key}
<tr>
<td>{$result->version}</td>
<td>{if $result->firstname === NULL}
{str tag=default}
{else}
<a href="{$WWWROOT}user/view.php?id={$result->userid}">
{$result->firstname} {$result->lastname}
</a>
{/if}
</td>
<td>{$result->content|truncate:100:"..."|htmlspecialchars_decode|strip_tags}</td>
<td>{$result->ctime|date_format:'%d %b %Y %H:%I'}</td>
<td class="control-buttons"></td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{include file="footer.tpl"}
......@@ -19,6 +19,7 @@ Scenario: Clicking ID's (Bug 1428456)
And I press "Save"
Then I should see "Buck Mulligan"
And I reload the page
And I wait "1" seconds
And I follow "Text"
And I press "Add"
And I set the following fields to these values:
......
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