index.tpl 3.26 KB
Newer Older
Clare Lenihan's avatar
Clare Lenihan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
{include file="header.tpl"}
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<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}
14
        <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
15
        <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
16
17
    {/if}
    <h3><a href="{$WWWROOT}view/view.php?id={$view.id}">{$view.title|escape}</a></h3>
Clare Lenihan's avatar
Clare Lenihan committed
18
19
20
21
    <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
22
    {if $view.description}
Clare Lenihan's avatar
Clare Lenihan committed
23
        {if !$view.submittedto}<br>{/if}
Clare Lenihan's avatar
Clare Lenihan committed
24
25
        {$view.description}
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
26
27
    </div>
    <div class="viewitem">
Clare Lenihan's avatar
Clare Lenihan committed
28
    {if $view.artefacts}
Clare Lenihan's avatar
Clare Lenihan committed
29
30
        <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
31
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
32
33
34
35
    </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
36
37
38
39
40
41
42
    {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
43
        {* this is messy, but is like this so there aren't spaces between links and commas *}
Clare Lenihan's avatar
Clare Lenihan committed
44
            {if $accessgroup.accesstype == 'loggedin'}
45
46
                {str tag="loggedinlower" section="view"}{elseif $accessgroup.accesstype == 'public'}
                {str tag="publiclower" section="view"}{elseif $accessgroup.accesstype == 'friends'}
47
                <a href="{$WWWROOT}user/myfriends.php">{str tag="friendslower" section="view"}</a>{elseif $accessgroup.accesstype == 'group'}
Clare Lenihan's avatar
Clare Lenihan committed
48
                <a href="{$WWWROOT}group/view.php?id={$accessgroup.id}">{$accessgroup.name|escape}</a>{elseif $accessgroup.accesstype == 'tutorgroup'}
Clare Lenihan's avatar
Clare Lenihan committed
49
                <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
50
51
52
                <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
53
        {str tag="nobodycanseethisview" section="view"}
Clare Lenihan's avatar
Clare Lenihan committed
54
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
55
    </div>
Clare Lenihan's avatar
Clare Lenihan committed
56
    {if $view.submittedto}
Clare Lenihan's avatar
Clare Lenihan committed
57
58
59
        <div class="viewitem">
        {$view.submittedto}
        </div>
Clare Lenihan's avatar
Clare Lenihan committed
60
61
    {/if}
    {if $view.submitto}
Clare Lenihan's avatar
Clare Lenihan committed
62
        <div class="viewitem">
Clare Lenihan's avatar
Clare Lenihan committed
63
        {$view.submitto}
Clare Lenihan's avatar
Clare Lenihan committed
64
        </div>
Clare Lenihan's avatar
Clare Lenihan committed
65
66
67
68
69
70
71
72
73
74
    {/if}
    </td>
    </tr>
{/foreach}

</table>

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

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

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