tiki-list_surveys.tpl 2.44 KB
Newer Older
1
{* $Id$ *}
2
{title help="Surveys"}{tr}Surveys{/tr}{/title}
dgdaniels's avatar
dgdaniels committed
3

nyloth's avatar
nyloth committed
4
<div class="navbar">
5 6 7 8 9 10
	{if $tiki_p_view_survey_stats eq 'y'}
		{button href="tiki-survey_stats.php" _text="{tr}Survey stats{/tr}"}
	{/if}
	{if $tiki_p_admin_surveys eq 'y'}
		{button href="tiki-admin_surveys.php" _text="{tr}Create New Survey{/tr}"}
	{/if}
nyloth's avatar
nyloth committed
11
</div>
12

lrargerich's avatar
lrargerich committed
13
<table class="normal">
14 15 16 17 18 19 20 21 22 23
	<tr>
		<th>
			<a href="tiki-list_surveys.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'name_desc'}name_asc{else}name_desc{/if}">{tr}Name{/tr}</a>
		</th>
		<th>{tr}Questions{/tr}</th>
		<th>{tr}Actions{/tr}</th>
	</tr>
	{cycle values="odd,even" print=false}
	{section name=user loop=$channels}
		{if ($tiki_p_admin eq 'y') or ($channels[user].individual eq 'n' and $tiki_p_take_survey eq 'y') or ($channels[user].individual_tiki_p_take_survey eq 'y')}
24
			<tr class="{cycle}">
25
				<td class="text">
26
					{if ($tiki_p_admin_surveys eq 'y') or ($channels[user].status eq 'o' and $channels[user].taken_survey eq 'n')}
chealer's avatar
chealer committed
27
						<a class="tablename" href="tiki-take_survey.php?surveyId={$channels[user].surveyId}">{$channels[user].name|escape}</a>
28
					{else}
chealer's avatar
chealer committed
29
						<a class="link" href="tiki-survey_stats_survey.php?surveyId={$channels[user].surveyId}">{$channels[user].name|escape}</a>
30
					{/if}
31
					<div class="subcomment">{wiki}{$channels[user].description|escape}{/wiki}</div>
32
				</td>
33
				<td class="text">
34 35
					{$channels[user].questions}
				</td>
36
				<td class="action">
37
					{if ($tiki_p_admin eq 'y') or ($channels[user].individual eq 'n' and $tiki_p_admin_surveys eq 'y') or ($channels[user].individual_tiki_p_admin_surveys eq 'y')}
38
						<a href="tiki-admin_surveys.php?surveyId={$channels[user].surveyId}">{icon _id='page_edit' alt="{tr}Edit this Survey{/tr}"}</a>
39 40
					{/if}
					
41
					{if ($tiki_p_admin_surveys eq 'y') or ($channels[user].status eq 'o' and $channels[user].taken_survey eq 'n')}
42
						<a href="tiki-take_survey.php?surveyId={$channels[user].surveyId}">{icon _id='control_play' alt="{tr}Take Survey{/tr}"}</a>
43
					{/if}
dgdaniels's avatar
dgdaniels committed
44

45
					{if ($tiki_p_admin eq 'y') or ($channels[user].individual eq 'n' and $tiki_p_view_survey_stats eq 'y') or ($channels[user].individual_tiki_p_view_survey_stats eq 'y')}
46
						<a href="tiki-survey_stats_survey.php?surveyId={$channels[user].surveyId}">{icon _id='chart_curve' alt="{tr}Stats{/tr}"}</a>
47 48 49 50 51
					{/if}
				</td>
			</tr>
		{/if}
	{sectionelse}
52
		{norecords _colspan=3}
53
	{/section}
lrargerich's avatar
lrargerich committed
54
</table>
dgdaniels's avatar
dgdaniels committed
55

56
{pagination_links cant=$cant_pages step=$maxRecords offset=$offset}{/pagination_links}