Commit 5397b0c9 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

adding help to view/view and view/artefact

parent f8f4d47c
{include file="header.tpl"} {include file="header.tpl"}
{include file="columnfullstart.tpl"} {include file="columnfullstart.tpl"}
<h3><a href="{$WWWROOT}view/view.php?id={$viewid|escape}">{$viewtitle|escape}</a> {str tag=by section=view} <a href="{$WWWROOT}user/view.php?id={$viewowner}">{$formattedowner|escape}</a>: {foreach name=path from=$artefactpath item=path}{if $path.url}<a href="{$path.url|escape}">{/if}{$path.title|escape}{if $path.url}</a>{/if}{if !$smarty.foreach.path.last}: {/if}{/foreach}</h3>
<div id="view"> <div id="view">
<div id="bottom-pane"> <div id="bottom-pane">
<div id="column-container"> <div id="column-container">
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
</div> </div>
{/if} {/if}
<div id="view"> <div id="view">
<h3>{$viewtitle|escape} {str tag=by section=view} <a href="{$WWWROOT}user/view.php?id={$viewowner}">{$formattedowner|escape}</a></h3>
<p class="view-description">{$viewdescription}</p> <p class="view-description">{$viewdescription}</p>
<div id="bottom-pane"> <div id="bottom-pane">
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'view');
define('SECTION_PAGE', 'artefact');
require(dirname(dirname(__FILE__)) . '/init.php'); require(dirname(dirname(__FILE__)) . '/init.php');
require(get_config('libroot') . 'view.php'); require(get_config('libroot') . 'view.php');
...@@ -83,6 +87,15 @@ $artefactpath[] = array( ...@@ -83,6 +87,15 @@ $artefactpath[] = array(
'title' => $artefact->display_title(), 'title' => $artefact->display_title(),
); );
$heading = '<a href="' . get_config('wwwroot') . 'view/view.php?id=' . $view->get('id') .'">' . hsc($view->get('title')) . '</a> ' . get_string('by', 'view') . ' <a href="' . get_config('wwwroot') .'user/view.php?id=' . $view->get('owner'). '">' . $view->formatted_owner() . '</a>';
foreach ($artefactpath as $item) {
if (empty($item['url'])) {
$heading .= ': ' . $item['title'];
}
else {
$heading .= ': <a href="' . $item['url'] . '">' . $item['title'] . '</a>';
}
}
$tutorfilefeedbackformrow = ''; $tutorfilefeedbackformrow = '';
$submittedgroup = $view->get('submittedto'); $submittedgroup = $view->get('submittedto');
...@@ -292,6 +305,8 @@ $smarty = smarty( ...@@ -292,6 +305,8 @@ $smarty = smarty(
'stylesheets' => array('style/views.css') 'stylesheets' => array('style/views.css')
) )
); );
$smarty->assign('heading', $heading);
$smarty->assign('noheadingescape', true);
$smarty->assign('artefact', $content); $smarty->assign('artefact', $content);
$smarty->assign('artefactpath', $artefactpath); $smarty->assign('artefactpath', $artefactpath);
$smarty->assign('INLINEJAVASCRIPT', $javascript); $smarty->assign('INLINEJAVASCRIPT', $javascript);
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'view');
define('SECTION_PAGE', 'view');
require(dirname(dirname(__FILE__)) . '/init.php'); require(dirname(dirname(__FILE__)) . '/init.php');
require(get_config('libroot') . 'view.php'); require(get_config('libroot') . 'view.php');
...@@ -38,6 +42,8 @@ if (!can_view_view($viewid)) { ...@@ -38,6 +42,8 @@ if (!can_view_view($viewid)) {
} }
define('TITLE', $view->get('title') . ' ' . get_string('by', 'view') . ' ' . $view->formatted_owner()); define('TITLE', $view->get('title') . ' ' . get_string('by', 'view') . ' ' . $view->formatted_owner());
$heading = '<a href="' . get_config('wwwroot') . 'view/view.php?id=' . $view->get('id') .'">' . hsc($view->get('title')) . '</a> ' . get_string('by', 'view') . ' <a href="' . get_config('wwwroot') .'user/view.php?id=' . $view->get('owner'). '">' . $view->formatted_owner() . '</a>';
$tutorfilefeedbackformrow = ''; $tutorfilefeedbackformrow = '';
$submittedgroup = $view->get('submittedto'); $submittedgroup = $view->get('submittedto');
...@@ -253,7 +259,8 @@ $smarty = smarty( ...@@ -253,7 +259,8 @@ $smarty = smarty(
'stylesheets' => array('style/views.css'), 'stylesheets' => array('style/views.css'),
) )
); );
$smarty->assign('heading', $heading);
$smarty->assign('noheadingescape', true);
$smarty->assign('INLINEJAVASCRIPT', $javascript); $smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('viewid', $viewid); $smarty->assign('viewid', $viewid);
$smarty->assign('viewtitle', $view->get('title')); $smarty->assign('viewtitle', $view->get('title'));
......
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