index.tpl 3.53 KB
Newer Older
Clare Lenihan's avatar
Clare Lenihan committed
1
2
3
{include file="header.tpl"}
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
4

5
{if (!$groupid || $caneditgroupview)}
6
<span class="addicon fr">
7
<a href="{$WWWROOT}view/edit.php{if $groupid}?group={$groupid}{/if}">{str tag="createview" section="view"}</a>
8
</span>
9
{/if}
10
<h2>{$heading}</h2>
Clare Lenihan's avatar
Clare Lenihan committed
11

Nigel McNie's avatar
Nigel McNie committed
12
{if $groupid}{include file="group/tabstart.tpl" current="views"}{/if}
Clare Lenihan's avatar
Clare Lenihan committed
13
{if $views}
14
<table id="myviewstable">
Clare Lenihan's avatar
Clare Lenihan committed
15
16
17
18
19

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

</table>

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

{else}
82
<div class="message">{str tag="noviews" section="view"}</div>
Clare Lenihan's avatar
Clare Lenihan committed
83
{/if}
Nigel McNie's avatar
Nigel McNie committed
84
{if $groupid}{include file="group/tabend.tpl"}{/if}
Clare Lenihan's avatar
Clare Lenihan committed
85
86
87
88

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