tiki-admin_contribution.tpl 5.71 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 12 13 14 15 16 17 18 19 20 21 22 23
        <div class="form-group">
            <label class="col-sm-3 control-label" for="name">{tr}Name{/tr}</label>
            <div class="col-sm-9">
					<input type="text" name="name" class="form-control" id="name" {if $contribution.name} value="{$contribution.name|escape}"{/if}>
            </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}">
		</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 33
    <div class="form-group">
        <div class="checkbox">
            <label class="col-sm-11 col-sm-offset-1" for=feature_contribution_mandatory">
				<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 36 37 38 39 40 41
			</label>
        </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 74 75 76 77 78 79 80
            </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}>
			{tr}Contributors{/tr}
            </label>
        </div>
    </div>
    <div class="form-group text-center">
		<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 88 89 90 91 92 93 94 95 96 97 98 99 100 101
<form enctype="multipart/form-data" action="tiki-admin_contribution.php" method="post" class="form-horizontal" role="form">
	<div class="form-group">
        <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">
			<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}">
    </div>
102 103 104
</form>

<h2>{tr}List of contributions{/tr}</h2>
105
<div class="table-responsive">
106
<table class="table normal">
107 108 109 110 111
	<tr>
		<th>{tr}Name{/tr}</th>
		<th>{tr}Description{/tr}</th>
		<th>{tr}Actions{/tr}</th>
	</tr>
112

113
	{section name=ix loop=$contributions}
114
		<tr>
115
			<td class="text">{$contributions[ix].name|escape}</td>
116 117
			<td class="text">{$contributions[ix].description|truncate|escape}</td>
			<td class="action">
118 119 120 121 122
				<a class="link" href="tiki-admin_contribution.php?contributionId={$contributions[ix].contributionId}">{icon _id='shape_square_edit'}</a> &nbsp;
				<a class="link" href="tiki-admin_contribution.php?remove={$contributions[ix].contributionId}">{icon _id='cross' alt="{tr}Remove{/tr}"}</a>
			</td>
		</tr>
	{sectionelse}
123
		{norecords _colspan=3}
124
	{/section}
125
</table>
126
</div>