index.tpl 3.25 KB
Newer Older
Clare Lenihan's avatar
Clare Lenihan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{include file="header.tpl"}
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<h2>My Views</h2>

<div class="fr"><span class="addicon"><a href="{$WWWROOT}view/edit.php">{str tag="createview" section="view"}</a></span></div>
<br>

{if $views}
<table>

{foreach from=$views item=view}
    <tr class="{cycle values=r0,r1}">
    <td>
    {if !$view.submittedto}
16
        <a href="{$WWWROOT}view/delete.php?id={$view.id}" class="fr"><strong>{str tag="deletethisview" section="view"}</strong></a>
Clare Lenihan's avatar
Clare Lenihan committed
17
        <a href="{$WWWROOT}view/blocks.php?id={$view.id}" class="fr"><strong>{str tag ="editthisview" section="view"}</strong></a>
Clare Lenihan's avatar
Clare Lenihan committed
18
19
    {/if}
    <h3><a href="{$WWWROOT}view/view.php?id={$view.id}">{$view.title|escape}</a></h3>
Clare Lenihan's avatar
Clare Lenihan committed
20
21
22
23
    <div class="viewitem">
    {if !$view.submittedto}
        <a style="text-decoration:underline" href="{$WWWROOT}view/edit.php?id={$view.id}">{str tag="editviewnameanddescription" section="view"}</a>
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
24
    {if $view.description}
Clare Lenihan's avatar
Clare Lenihan committed
25
        {if !$view.submittedto}<br>{/if}
Clare Lenihan's avatar
Clare Lenihan committed
26
27
        {$view.description}
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
28
29
    </div>
    <div class="viewitem">
Clare Lenihan's avatar
Clare Lenihan committed
30
    {if $view.artefacts}
Clare Lenihan's avatar
Clare Lenihan committed
31
32
        <strong>{str tag="artefacts" section="view"}:</strong>
        {foreach from=$view.artefacts item=artefact name=artefacts}<a href="{$WWWROOT}view/artefact.php?artefact={$artefact.id}&amp;view={$view.id}">{$artefact.title|escape}</a>{if !$smarty.foreach.artefacts.last}, {/if}{/foreach}
Clare Lenihan's avatar
Clare Lenihan committed
33
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
34
35
36
37
    </div>
    <div class="viewitem">
    <a style="text-decoration:underline" href="{$WWWROOT}view/access.php?id={$view.id}">{str tag="editviewaccess" section="view"}</a>
    <br>
Clare Lenihan's avatar
Clare Lenihan committed
38
39
40
41
42
43
44
    {if $view.access}
        {$view.access}
        <br>
    {/if}
    {if $view.accessgroups}
        {str tag="whocanseethisview" section="view"}:
        {foreach from=$view.accessgroups item=accessgroup name=artefacts}
Clare Lenihan's avatar
Clare Lenihan committed
45
        {* this is messy, but is like this so there aren't spaces between links and commas *}
Clare Lenihan's avatar
Clare Lenihan committed
46
47
48
49
50
            {if $accessgroup.accesstype == 'loggedin'}
                {str tag="loggedin" section="view"}{elseif $accessgroup.accesstype == 'public'}
                {str tag="public" section="view"}{elseif $accessgroup.accesstype == 'friends'}
                <a href="{$WWWROOT}user/">{str tag="friends" section="view"}</a>{elseif $accessgroup.accesstype == 'group'}
                <a href="{$WWWROOT}group/view.php?id={$accessgroup.id}">{$accessgroup.name|escape}</a>{elseif $accessgroup.accesstype == 'tutorgroup'}
Clare Lenihan's avatar
Clare Lenihan committed
51
                <a href="{$WWWROOT}group/view.php?id={$accessgroup.id}">{$accessgroup.name|escape}</a> ({str tag="tutors" section="view"}){elseif $accessgroup.accesstype == 'user'}
Clare Lenihan's avatar
Clare Lenihan committed
52
53
54
                <a href="{$WWWROOT}user/view.php?id={$accessgroup.id}">{$accessgroup.id|display_name|escape}</a>{/if}{if !$smarty.foreach.artefacts.last},{/if}
        {/foreach}
    {else}
Clare Lenihan's avatar
Clare Lenihan committed
55
        {str tag="nobodycanseethisview" section="view"}
Clare Lenihan's avatar
Clare Lenihan committed
56
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
57
    </div>
Clare Lenihan's avatar
Clare Lenihan committed
58
    {if $view.submittedto}
Clare Lenihan's avatar
Clare Lenihan committed
59
60
61
        <div class="viewitem">
        {$view.submittedto}
        </div>
Clare Lenihan's avatar
Clare Lenihan committed
62
63
    {/if}
    {if $view.submitto}
Clare Lenihan's avatar
Clare Lenihan committed
64
        <div class="viewitem">
Clare Lenihan's avatar
Clare Lenihan committed
65
        {$view.submitto}
Clare Lenihan's avatar
Clare Lenihan committed
66
        </div>
Clare Lenihan's avatar
Clare Lenihan committed
67
68
69
70
71
72
73
74
75
76
    {/if}
    </td>
    </tr>
{/foreach}

</table>

<div class="center">{$pagination}</div>

{else}
77
<div class="message">{str tag="noviews" section="views"}</div>
Clare Lenihan's avatar
Clare Lenihan committed
78
79
80
81
82
{/if}

{include file="columnleftend.tpl"}
{include file="footer.tpl"}