index.tpl 3.88 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
<span class="addicon fr">
6
<a href="{$WWWROOT}view/edit.php{if $groupid}?group={$groupid}{/if}">{str tag="createview" section="view"}</a>
7
</span>
8
<h2>{$heading}</h2>
Clare Lenihan's avatar
Clare Lenihan committed
9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{if $groupid}
  {include file="group/tabstart.tpl" current="views"}
  <ul>
    <li>
    {if $shared}<a href="groupviews.php?group={$groupid}">{str tag="viewsownedbygroup" section="view"}</a>
    {else}{str tag="viewsownedbygroup" section="view"}
    {/if}
    </li>
    <li>
    {if $shared}{str tag="viewssharedtogroup" section="view"}
    {else}<a href="groupviews.php?group={$groupid}&shared=1">{str tag="viewssharedtogroup" section="view"}</a>
    {/if}
    </li>
  </ul>
{/if}
Clare Lenihan's avatar
Clare Lenihan committed
25
{if $views}
26
<table id="myviewstable">
Clare Lenihan's avatar
Clare Lenihan committed
27
28
29
30
31

{foreach from=$views item=view}
    <tr class="{cycle values=r0,r1}">
    <td>
    {if !$view.submittedto}
32
33
        <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
34
35
    {/if}
    <h3><a href="{$WWWROOT}view/view.php?id={$view.id}">{$view.title|escape}</a></h3>
Clare Lenihan's avatar
Clare Lenihan committed
36
37
    <div class="viewitem">
    {if !$view.submittedto}
38
        <a href="{$WWWROOT}view/edit.php?id={$view.id}" id="editviewdetails">{str tag="editviewnameanddescription" section="view"}</a>
Clare Lenihan's avatar
Clare Lenihan committed
39
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
40
    {if $view.description}
Clare Lenihan's avatar
Clare Lenihan committed
41
        {if !$view.submittedto}<br>{/if}
Clare Lenihan's avatar
Clare Lenihan committed
42
43
        {$view.description}
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
44
45
    </div>
    <div class="viewitem">
Clare Lenihan's avatar
Clare Lenihan committed
46
    {if $view.artefacts}
47
48
        <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
49
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
50
51
    </div>
    <div class="viewitem">
52
    <a href="{$WWWROOT}view/access.php?id={$view.id}" id="editviewaccess">{str tag="editviewaccess" section="view"}</a>
Clare Lenihan's avatar
Clare Lenihan committed
53
    <br>
Clare Lenihan's avatar
Clare Lenihan committed
54
55
56
57
58
59
60
    {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
61
        {* this is messy, but is like this so there aren't spaces between links and commas *}
Clare Lenihan's avatar
Clare Lenihan committed
62
            {if $accessgroup.accesstype == 'loggedin'}
63
64
                {str tag="loggedinlower" section="view"}{elseif $accessgroup.accesstype == 'public'}
                {str tag="publiclower" section="view"}{elseif $accessgroup.accesstype == 'friends'}
65
                <a href="{$WWWROOT}user/myfriends.php" id="link-myfriends">{str tag="friendslower" section="view"}</a>{elseif $accessgroup.accesstype == 'group'}
66
67
68
                <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
69
70
71
                <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
72
        {str tag="nobodycanseethisview" section="view"}
Clare Lenihan's avatar
Clare Lenihan committed
73
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
74
    </div>
Clare Lenihan's avatar
Clare Lenihan committed
75
    {if $view.submittedto}
Clare Lenihan's avatar
Clare Lenihan committed
76
77
78
        <div class="viewitem">
        {$view.submittedto}
        </div>
Clare Lenihan's avatar
Clare Lenihan committed
79
80
    {/if}
    {if $view.submitto}
Clare Lenihan's avatar
Clare Lenihan committed
81
        <div class="viewitem">
Clare Lenihan's avatar
Clare Lenihan committed
82
        {$view.submitto}
Clare Lenihan's avatar
Clare Lenihan committed
83
        </div>
Clare Lenihan's avatar
Clare Lenihan committed
84
85
86
87
88
89
90
91
92
93
    {/if}
    </td>
    </tr>
{/foreach}

</table>

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

{else}
94
<div class="message">{str tag="noviews" section="view"}</div>
Clare Lenihan's avatar
Clare Lenihan committed
95
{/if}
Nigel McNie's avatar
Nigel McNie committed
96
{if $groupid}{include file="group/tabend.tpl"}{/if}
Clare Lenihan's avatar
Clare Lenihan committed
97
98
99
100

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