tiki-admin_contribution.tpl 6.29 KB
Newer Older
1 2
{* $Id$ *}

3 4
{title help="Contribution"}{tr}Admin Contributions{/tr}{/title}

5
{if $contribution}
6
	<h2>{tr}Edit the contribution:{/tr} {$contribution.name|escape}</h2>
7
	<form enctype="multipart/form-data" action="tiki-admin_contribution.php" method="post" class="form-horizontal" role="form">
8
		<input type="hidden" name="contributionId" value="{$contribution.contributionId}">
9 10 11
		<div class="form-group">
			<label class="col-sm-3 control-label" for="name">{tr}Name{/tr}</label>
			<div class="col-sm-9">
12
					<input type="text" name="name" class="form-control" id="name" {if $contribution.name} value="{$contribution.name|escape}"{/if}>
13 14 15 16 17 18 19 20 21 22
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="description">{tr}Description{/tr}</label>
			<div class="col-sm-9">
				<input type="text" name="description" id="description" class="form-control" maxlength="250"{if $contribution.description} value="{$contribution.description|escape}"{/if}>
			</div>
		</div>
		<div class="form-group text-center">
			<input type="submit" class="btn btn-default btn-sm" name="replace" value="{tr}Save{/tr}">
23
		</div>
24
	</form>
25 26 27
{/if}

<h2>{tr}Settings{/tr}</h2>
28
<form action="tiki-admin_contribution.php?page=features" method="post" class="form-horizontal" role="form">
29

30 31 32
	<div class="form-group">
		<div class="checkbox">
			<label class="col-sm-11 col-sm-offset-1" for=feature_contribution_mandatory">
33
				<input type="checkbox" name="feature_contribution_mandatory" id="feature_contribution_mandatory" {if $prefs.feature_contribution_mandatory eq 'y'}checked="checked"{/if}>
34
				{tr}Contributions are mandatory in wiki pages{/tr}
35
			</label>
36 37 38 39 40 41
		</div>
	</div>
	<div class="form-group">
		<div class="checkbox">
			<label class="col-sm-11 col-sm-offset-1" for="feature_contribution_mandatory_forum">
				<input type="checkbox" name="feature_contribution_mandatory_forum" id="feature_contribution_mandatory_forum" {if $prefs.feature_contribution_mandatory_forum eq 'y'}checked="checked"{/if}>
42
				{tr}Contributions are mandatory in forums{/tr}
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
			</label>
		</div>
	</div>
	<div class="form-group">
		<div class="checkbox">
			<label class="col-sm-11 col-sm-offset-1" for="feature_contribution_mandatory_comment">
				<input type="checkbox" name="feature_contribution_mandatory_comment" id="feature_contribution_mandatory_comment" {if $prefs.feature_contribution_mandatory_comment eq 'y'}checked="checked"{/if}>
				{tr}Contributions are mandatory in comments{/tr}
			</label>
		</div>
	</div>
	<div class="form-group">
		<div class="checkbox">
			<label class="col-sm-11 col-sm-offset-1" for="feature_contribution_mandatory_blog">
				<input type="checkbox" name="feature_contribution_mandatory_blog" id="feature_contribution_mandatory_blog" {if $prefs.feature_contribution_mandatory_blog eq 'y'}checked="checked"{/if}>
				{tr}Contributions are mandatory in blogs{/tr}
			</label>
		</div>
	</div>
	<div class="form-group">
		<div class="checkbox">
			<label class="col-sm-11 col-sm-offset-1" for="feature_contribution_display_in_comment">
				<input type="checkbox" name="feature_contribution_display_in_comment" name="feature_contribution_display_in_comment" {if $prefs.feature_contribution_display_in_comment eq 'y'}checked="checked"{/if}>
				{tr}Contributions are displayed in the comment/post{/tr}
			</label>
		</div>
	</div>
	<div class="form-group">
		<div class="checkbox">
			<label class="col-sm-11 col-sm-offset-1" for="feature_contributor_wiki">
			<input type="checkbox" name="feature_contributor_wiki" name="feature_contributor_wiki" {if $prefs.feature_contributor_wiki eq 'y'}checked="checked"{/if}>
74
			{tr}Contributors{/tr}
75 76 77 78
			</label>
		</div>
	</div>
	<div class="form-group text-center">
79 80
		<input type="submit" class="btn btn-default btn-sm" name="setting" value="{tr}Save{/tr}">
	</div>
81 82 83 84 85
</form>


<h2>{tr}Create a new contribution{/tr}</h2>

86 87
<form enctype="multipart/form-data" action="tiki-admin_contribution.php" method="post" class="form-horizontal" role="form">
	<div class="form-group">
88 89 90 91 92 93 94 95
		<label class="col-sm-3 control-label" for="new_contribution_name">{tr}Name{/tr}</label>
		<div class="col-sm-9">
			<input type="text" name="new_contribution_name" id="new_contribution_name" class="form-control">
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 control-label" for="new_contribution_name">{tr}Description{/tr}</label>
		<div class="col-sm-9">
96 97 98 99 100
			<input type="text" name="description" class="form-control" maxlength="250">
		</div>
	</div>
	<div class="form-group text-center">
		<input type="submit" class="btn btn-default btn-sm" name="add" value="{tr}Add{/tr}">
101
	</div>
102 103
</form>
<h2>{tr}List of contributions{/tr}</h2>
104 105 106 107 108 109 110 111 112 113 114
{* Use css menus as fallback for item dropdown action menu if javascript is not being used *}
{if $prefs.javascript_enabled !== 'y'}
	{$js = 'n'}
	{$libeg = '<li>'}
	{$liend = '</li>'}
{else}
	{$js = 'y'}
	{$libeg = ''}
	{$liend = ''}
{/if}
<div class="{if $js === 'y'}table-responsive{/if}"> {* table-responsive class cuts off css drop-down menus *}
115
	<table class="table table-striped table-hover">
116
		<tr>
117 118
			<th>{tr}Name{/tr}</th>
			<th>{tr}Description{/tr}</th>
119
			<th></th>
120
		</tr>
121 122 123 124 125 126

		{section name=ix loop=$contributions}
			<tr>
				<td class="text">{$contributions[ix].name|escape}</td>
				<td class="text">{$contributions[ix].description|truncate|escape}</td>
				<td class="action">
127 128
					{capture name=contribution_actions}
						{strip}
129
							{$libeg}<a href="tiki-admin_contribution.php?contributionId={$contributions[ix].contributionId}">
130
								{icon name='edit' _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"}
131 132
							</a>{$liend}
							{$libeg}<a href="tiki-admin_contribution.php?remove={$contributions[ix].contributionId}">
133
								{icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"}
134
							</a>{$liend}
135 136
						{/strip}
					{/capture}
137 138 139 140 141
					{if $js === 'n'}<ul class="cssmenu_horiz"><li>{/if}
					<a
						class="tips"
						title="{tr}Actions{/tr}"
						href="#"
142
						{if $js === 'y'}{popup fullhtml="1" center=true text=$smarty.capture.contribution_actions|escape:"javascript"|escape:"html"}{/if}
143 144
						style="padding:0; margin:0; border:0"
					>
145 146
						{icon name='wrench'}
					</a>
147 148 149
					{if $js === 'n'}
						<ul class="dropdown-menu" role="menu">{$smarty.capture.contribution_actions}</ul></li></ul>
					{/if}
150 151 152 153 154 155 156
				</td>
			</tr>
		{sectionelse}
			{norecords _colspan=3}
		{/section}
	</table>
</div>