index.tpl 3.74 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">
Richard Mansfield's avatar
Richard Mansfield committed
6
7
{$createviewform}
<a href="{$WWWROOT}view/choosetemplate.php{if $groupid}?group={$groupid}{elseif $institution}?institution={$institution}{/if}">{str tag="copyaview" section="view"}</a>
8
</span>
9
<h2>{$heading}</h2>
Clare Lenihan's avatar
Clare Lenihan committed
10

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

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

</table>

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

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

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