index.tpl 3.76 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
  {$createviewform}
7
  {$createtemplateform}
8
9
  <form method="post" action="{$WWWROOT}view/choosetemplate.php">
    <input type="submit" class="submit" value="{str tag="copyaview" section="view"}">
10
{if $GROUP}
11
    <input type="hidden" name="group" value="{$GROUP->id}" />
12
{elseif $institution}
13
    <input type="hidden" name="institution" value="{$institution}">
14
{/if}
15
  </form>
16
</span>
17
<div>
Clare Lenihan's avatar
Clare Lenihan committed
18

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

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

{else}
91
<div class="message" id="noviews">{if $GROUP}{str tag="noviewstosee" section="group"}{elseif $institution}{str tag="noviews" section="view"}{else}{str tag="youhavenoviews" section="view"}{/if}</div>
Clare Lenihan's avatar
Clare Lenihan committed
92
93
{/if}

94
95
</div>

Clare Lenihan's avatar
Clare Lenihan committed
96
97
98
{include file="columnleftend.tpl"}
{include file="footer.tpl"}