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

Mark templates on my views page

parent 09c48dcf
......@@ -1321,21 +1321,21 @@ class View {
if ($groupid) {
$count = count_records('view', 'group', $groupid);
$viewdata = get_records_sql_array('SELECT v.id,v.title,v.startdate,v.stopdate,v.description
$viewdata = get_records_sql_array('SELECT v.id,v.title,v.startdate,v.stopdate,v.description, v.template
FROM {view} v
WHERE v.group = ' . $groupid . '
ORDER BY v.title, v.id', '', $offset, $limit);
}
else if ($institution) {
$count = count_records('view', 'institution', $institution);
$viewdata = get_records_sql_array('SELECT v.id,v.title,v.startdate,v.stopdate,v.description
$viewdata = get_records_sql_array('SELECT v.id,v.title,v.startdate,v.stopdate,v.description, v.template
FROM {view} v
WHERE v.institution = ?
ORDER BY v.title, v.id', array($institution), $offset, $limit);
}
else {
$count = count_records('view', 'owner', $userid);
$viewdata = get_records_sql_array('SELECT v.id,v.title,v.startdate,v.stopdate,v.description, g.id AS groupid, g.name
$viewdata = get_records_sql_array('SELECT v.id,v.title,v.startdate,v.stopdate,v.description, v.template, g.id AS groupid, g.name
FROM {view} v
LEFT OUTER JOIN {group} g ON (v.submittedto = g.id AND g.deleted = 0)
WHERE v.owner = ' . $userid . '
......@@ -1388,6 +1388,7 @@ class View {
else if ($viewdata[$i]->stopdate) {
$data[$i]['access'] = get_string('accessuntildate', 'view', format_date(strtotime($viewdata[$i]->stopdate), 'strftimedate'));
}
$data[$i]['template'] = $viewdata[$i]->template;
}
// Go through all the artefact records and put them in with the
// views they belong to.
......
......@@ -1378,6 +1378,11 @@ fieldset.collapsed .mceEditor td {
#myviewstable h3 a {
color: #1e6297 !important;
}
#myviewstable .template {
color: #000;
font-weight: normal;
font-size: 13px;
}
#myviewstable .viewitem {
margin-bottom: 5px;
font-size: 11px;
......
......@@ -21,7 +21,7 @@
{if !$view.submittedto}
<a href="{$WWWROOT}view/delete.php?id={$view.id}" class="fr" id="btn-deletethisview">{str tag="deletethisview" section="view"}</a>
{/if}
<h3><a href="{$WWWROOT}view/view.php?id={$view.id}">{$view.title|escape}</a></h3>
<h3><a href="{$WWWROOT}view/view.php?id={$view.id}">{$view.title|escape}</a>{if $view.template} <span class="template">({str tag=Template section=view})</span>{/if}</h3>
<div class="viewitem">
{if !$view.submittedto}
<a href="{$WWWROOT}view/edit.php?id={$view.id}" id="editviewdetails">{str tag="editviewnameanddescription" section="view"}</a>
......
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