{* $Id$ *} {title url='tiki-admin_surveys.php' help="Surveys"}{tr}Admin surveys{/tr}{/title}
{button href="tiki-list_surveys.php" class="btn btn-info" _icon_name="list" _text="{tr}List{/tr}"} {button href="tiki-survey_stats.php" class="btn btn-info" _icon_name="chart" _text="{tr}Stats{/tr}"} {button surveyId=0 _anchor='content_admin_surveys1-2' _auto_args="surveyId" class="btn btn-primary" _icon_name="create" _text="{tr}Create{/tr}"}
{tabset} {tab name="{tr}Surveys{/tr}"}

{tr}Surveys{/tr}

{if $channels or ($find ne '')} {include file='find.tpl'} {/if}
{* table-responsive class cuts off css drop-down menus *} {section name=user loop=$channels} {sectionelse} {norecords _colspan=5} {/section}
{self_link _sort_arg='sort_mode' _sort_field='surveyId'}{tr}ID{/tr}{/self_link} {self_link _sort_arg='sort_mode' _sort_field='name'}{tr}Survey{/tr}{/self_link} {self_link _sort_arg='sort_mode' _sort_field='status'}{tr}Status{/tr}{/self_link} {tr}Questions{/tr}
{$channels[user].surveyId} {$channels[user].name|escape}
{wiki}{$channels[user].description}{/wiki}
{if $channels[user].status eq 'o'} {icon name='unlock' class='tips' title=":{tr}Open{/tr}"} {else} {icon name='lock' class='tips' title=":{tr}Closed{/tr}"} {/if} {$channels[user].questions} {actions} {strip} {icon name='list' _menu_text='y' _menu_icon='y' alt="{tr}Questions{/tr}"} {permission_link mode=text type=survey permType=surveys id=$channels[user].surveyId title=$channels[user].name} {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')} {icon name='chart' _menu_text='y' _menu_icon='y' alt="{tr}Stats{/tr}"} {/if} {self_link _icon_name='edit' _anchor='content_admin_surveys1-2' _menu_text='y' _menu_icon='y' surveyId=$channels[user].surveyId} {tr}Edit{/tr} {/self_link} {icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"} {/strip} {/actions}
{pagination_links cant=$cant_pages step=$prefs.maxRecords offset=$offset}{/pagination_links} {/tab} {tab name="{tr}Create/Edit Surveys{/tr}"} {if $info.surveyId > 0}

{tr}Edit this Survey:{/tr} {$info.name}

{else}

{tr}Create New Survey{/tr}

{/if} {if $individual eq 'y'} {permission_link mode=link type=survey permType=surveys id=$info.surveyId title=$info.name label="{tr}There are individual permissions set for this survey{/tr}"} {/if}
{textarea name="description" rows="6" id="description" class="form-control" _toolbars='y' _simple='y' comments='y'}{$info.description}{/textarea}
{include file='categorize.tpl' labelcol='2' inputcol='10'}
{/tab} {/tabset}