index.tpl 3.73 KB
Newer Older
Clare Lenihan's avatar
Clare Lenihan committed
1
{include file="header.tpl"}
2

Nigel McNie's avatar
Nigel McNie committed
3
<div class="page-buttons">
4
5
6
  {$createviewform}
  <form method="post" action="{$WWWROOT}view/choosetemplate.php">
    <input type="submit" class="submit" value="{str tag="copyaview" section="view"}">
7
{if $GROUP}
8
    <input type="hidden" name="group" value="{$GROUP->id}" />
9
{elseif $institution}
10
    <input type="hidden" name="institution" value="{$institution}">
11
{/if}
12
  </form>
13
</div>
14
<div>
Clare Lenihan's avatar
Clare Lenihan committed
15

16
{if $institution}
17
  {$institutionselector}
18
{/if}
19

Clare Lenihan's avatar
Clare Lenihan committed
20
{if $views}
21
<table id="myviewstable" class="fullwidth">
22
  <tbody>
Clare Lenihan's avatar
Clare Lenihan committed
23
24
25
26
{foreach from=$views item=view}
    <tr class="{cycle values=r0,r1}">
    <td>
    {if !$view.submittedto}
27
        <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
28
    {/if}
29
    <h3><a href="{$WWWROOT}view/view.php?id={$view.id}">{$view.title|escape}</a></h3>
30
    
31
32
33
    {if $view.submittedto}
    <div class="viewitem submitted-viewitem">{$view.submittedto}</div>
	{else}
34
35
36
37
38
39
	<div class="viewitem">
        <a href="{$WWWROOT}view/edit.php?id={$view.id}" id="editviewdetails">{str tag="editviewnameanddescription" section="view"}</a> 
		{if $view.description}
			<div class="viewitemdesc">{if !$view.submittedto}{/if}
			{$view.description}</div>
		{/if}
40
    </div>
41
42
43
44
45
46
47
	<div class="viewitem">
		<a href="{$WWWROOT}view/blocks.php?id={$view.id}" id="editthisview">{str tag ="editthisview" section="view"}</a>
    	{if $view.artefacts}
        	<div class="viewitemdesc">{str tag="artefacts" section="view"}:
        	{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}</div>
		{/if}
	</div>
48
49
    {/if}

Clare Lenihan's avatar
Clare Lenihan committed
50
    <div class="viewitem">
51
    <a href="{$WWWROOT}view/access.php?id={$view.id}" id="editviewaccess">{str tag="editviewaccess" section="view"}</a>
Clare Lenihan's avatar
Clare Lenihan committed
52
    <br>
Clare Lenihan's avatar
Clare Lenihan committed
53
    {if $view.access}
54
       <div class="viewitemdesc"> {$view.access}
Clare Lenihan's avatar
Clare Lenihan committed
55
        <br>
56
	   </div>
Clare Lenihan's avatar
Clare Lenihan committed
57
    {/if}
58
	
Clare Lenihan's avatar
Clare Lenihan committed
59
    {if $view.accessgroups}
60
        <div class="viewitemdesc">{str tag="whocanseethisview" section="view"}:
Clare Lenihan's avatar
Clare Lenihan committed
61
        {foreach from=$view.accessgroups item=accessgroup name=artefacts}
Clare Lenihan's avatar
Clare Lenihan committed
62
        {* this is messy, but is like this so there aren't spaces between links and commas *}
Clare Lenihan's avatar
Clare Lenihan committed
63
            {if $accessgroup.accesstype == 'loggedin'}
64
65
                {str tag="loggedinlower" section="view"}{elseif $accessgroup.accesstype == 'public'}
                {str tag="publiclower" section="view"}{elseif $accessgroup.accesstype == 'friends'}
66
                <a href="{$WWWROOT}user/myfriends.php" id="link-myfriends">{str tag="friendslower" section="view"}</a>{elseif $accessgroup.accesstype == 'group'}
67
                <a href="{$WWWROOT}group/view.php?id={$accessgroup.id}">{$accessgroup.name|escape}</a>{if !empty($accessgroup.role)}
68
                    ({$accessgroup.roledisplay}){/if}{elseif $accessgroup.accesstype == 'user'}
Clare Lenihan's avatar
Clare Lenihan committed
69
70
                <a href="{$WWWROOT}user/view.php?id={$accessgroup.id}">{$accessgroup.id|display_name|escape}</a>{/if}{if !$smarty.foreach.artefacts.last},{/if}
        {/foreach}
71
72
        {if $view.template} {str tag=thisviewmaybecopied section=view}{/if}
		</div>
Clare Lenihan's avatar
Clare Lenihan committed
73
    {else}
74
75
76
        <div class="viewitemdesc">
		{str tag="nobodycanseethisview2" section="view"}
		</div>
Clare Lenihan's avatar
Clare Lenihan committed
77
    {/if}
Clare Lenihan's avatar
Clare Lenihan committed
78
    </div>
79
	
Clare Lenihan's avatar
Clare Lenihan committed
80
    {if $view.submitto}
81
        <div class="viewitem submit-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
    {/if}
    </td>
    </tr>
{/foreach}
88
  </tbody>
Clare Lenihan's avatar
Clare Lenihan committed
89
90
</table>

91
{$pagination}
Clare Lenihan's avatar
Clare Lenihan committed
92
93

{else}
94
<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
95
96
{/if}

97
98
</div>

Clare Lenihan's avatar
Clare Lenihan committed
99
100
{include file="footer.tpl"}