1
0
Fork 0

Admin site page

This commit is contained in:
Fabio Comuni 2011-06-13 18:03:06 +02:00
commit ab27f1393e
10 changed files with 347 additions and 32 deletions

View file

@ -1,4 +1,4 @@
<h4>Admin</h4>
<h4><a href="$admurl">Admin</a></h4>
<ul>
<li class='admin link $admin.site.2'><a href='$admin.site.0'>$admin.site.1</a></li>
<li class='admin link $admin.users.2'><a href='$admin.users.0'>$admin.users.1</a></li>

45
view/admin_site.tpl Normal file
View file

@ -0,0 +1,45 @@
<div id='adminpage'>
<h1>$title - $page</h1>
<form action="$baseurl/admin/site" method="post">
{{ inc field_input.tpl with $field=$sitename }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$banner }}{{ endinc }}
{{ inc field_select.tpl with $field=$language }}{{ endinc }}
{{ inc field_select.tpl with $field=$theme }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>Upload</h3>
{{ inc field_input.tpl with $field=$maximagesize }}{{ endinc }}
<h3>Corporate/Edu</h3>
{{ inc field_input.tpl with $field=$allowed_sites }}{{ endinc }}
{{ inc field_input.tpl with $field=$allowed_email }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$block_public }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$force_publish }}{{ endinc }}
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
{{ inc field_input.tpl with $field=$global_search_url }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>Registration</h3>
{{ inc field_checkbox.tpl with $field=$no_multi_reg }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_openid }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_gravatar }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_regfullname }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_utf }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>Advanced</h3>
{{ inc field_checkbox.tpl with $field=$rino_enc }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$verifyssl }}{{ endinc }}
{{ inc field_input.tpl with $field=$proxy }}{{ endinc }}
{{ inc field_input.tpl with $field=$proxyuser }}{{ endinc }}
{{ inc field_input.tpl with $field=$timeout }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
</form>
</div>

View file

@ -1,33 +1,36 @@
<h1>$title - $page</h1>
<div id='adminpage'>
<h1>$title - $page</h1>
<dl>
<dt>$users.0</dt>
<dd>$users.1</dd>
</dl>
{{ for $accounts as $p }}
<dl>
<dt>$p.0</dt>
<dd>$p.1</dd>
<dt>$pending.0</dt>
<dd>$pending.1</dt>
</dl>
{{ endfor }}
<dl>
<dt>$pending.0</dt>
<dd>$pending.1</dt>
</dl>
<dl>
<dt>$version.0</dt>
<dd>$version.1 - $build</dt>
</dl>
<dl>
<dt>$plugins.0</dt>
{{ for $plugins.1 as $p }}
<dd>$p</dd>
<dl>
<dt>$users.0</dt>
<dd>$users.1</dd>
</dl>
{{ for $accounts as $p }}
<dl>
<dt>$p.0</dt>
<dd>$p.1</dd>
</dl>
{{ endfor }}
</dl>
<dl>
<dt>$plugins.0</dt>
{{ for $plugins.1 as $p }}
<dd>$p</dd>
{{ endfor }}
</dl>
<dl>
<dt>$version.0</dt>
<dd>$version.1 - $build</dt>
</dl>
</div>

4
view/field.tpl Normal file
View file

@ -0,0 +1,4 @@
{{ if $field.0==select }}
{{ inc field_select.tpl }}{{ endinc }}
{{ endif }}

6
view/field_checkbox.tpl Normal file
View file

@ -0,0 +1,6 @@
<div class='field checkbox'>
<label for='id_$field.0'>$field.1</label>
<input type="checkbox" name='$field.0' id='id_$field.0' {{ if $field.2 }}checked="true"{{ endif }}>
<span class='field_help'>$field.3</span>
</div>

6
view/field_input.tpl Normal file
View file

@ -0,0 +1,6 @@
<div class='field input'>
<label for='id_$field.0'>$field.1</label>
<input name='$field.0' id='id_$field.0' value="$field.2">
<span class='field_help'>$field.3</span>
</div>

8
view/field_select.tpl Normal file
View file

@ -0,0 +1,8 @@
<div class='field select'>
<label for='id_$field.0'>$field.1</label>
<select name='$field.0' id='id_$field.0'>
{{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }}
</select>
<span class='field_help'>$field.3</span>
</div>

6
view/field_textarea.tpl Normal file
View file

@ -0,0 +1,6 @@
<div class='field textarea'>
<label for='id_$field.0'>$field.1</label>
<textarea name='$field.0' id='id_$field.0'>$field.2</textarea>
<span class='field_help'>$field.3</span>
</div>

View file

@ -2468,6 +2468,58 @@ a.mail-list-link {
filter:alpha(opacity=100);
}
/**
* ADMIN
*/
#adminpage dl {
clear: left;
margin-bottom: 2px;
padding-bottom: 2px;
border-bottom: 1px solid black;
}
#adminpage dt {
width: 200px;
float: left;
font-weight: bold;
}
#adminpage dd {
margin-left: 200px;
}
#adminpage .field {
clear: left;
margin-bottom: 5px;
padding-bottom: 5px;
}
#adminpage .field label {
float: left;
width: 200px;
font-weight: bold;
}
#adminpage .field input,
#adminpage .field textarea {
width: 400px;
}
#adminpage .field textarea { height: 100px; }
#adminpage .field_help {
display: block;
margin-left: 200px;
color: #666666;
}
#adminpage h3 {
border-bottom: 1px solid #cccccc;
}
#adminpage .submit {
clear:left;
text-align: right;
}
/**
* ICONS