index.tpl 3.64 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}{else if $institution}?institution={$institution}{/if}">{str tag="createview" section="view"}</a>
7
</span>
8
<h2>{$heading}</h2>
Clare Lenihan's avatar
Clare Lenihan committed
9

10
11
{if $groupid}
  {include file="group/tabstart.tpl" current="views"}
12
13
{else if $institution}
  {$institutionselector}
14
{/if}
Clare Lenihan's avatar
Clare Lenihan committed
15
{if $views}
16
<table id="myviewstable" class="groupviews">
Clare Lenihan's avatar
Clare Lenihan committed
17
18
19
20
21

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

</table>

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

{else}
83
<table id="myviewstable"{if $member} class="groupviews"{/if}>
84
  <tr>
85
    <td>{if $groupid}{str tag="noviewstosee" section="group"}{elseif $institution}{str tag="noviews"}{else}{str tag="noviews" section="view"}{/if}</td>
86
87
  </tr>
</table>
Clare Lenihan's avatar
Clare Lenihan committed
88
{/if}
Nigel McNie's avatar
Nigel McNie committed
89
{if $groupid}{include file="group/tabend.tpl"}{/if}
Clare Lenihan's avatar
Clare Lenihan committed
90
91
92
93

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