diff options
Diffstat (limited to 'templates/web/default/admin')
-rw-r--r-- | templates/web/default/admin/bodies.html | 30 | ||||
-rw-r--r-- | templates/web/default/admin/user-form.html | 18 | ||||
-rw-r--r-- | templates/web/default/admin/user_edit.html | 16 | ||||
-rw-r--r-- | templates/web/default/admin/users.html | 13 |
4 files changed, 54 insertions, 23 deletions
diff --git a/templates/web/default/admin/bodies.html b/templates/web/default/admin/bodies.html index d6c706fce..ccd2e801b 100644 --- a/templates/web/default/admin/bodies.html +++ b/templates/web/default/admin/bodies.html @@ -2,14 +2,31 @@ [% INCLUDE 'admin/edit-league.html' %] +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('Name') %]</th> + [% IF c.cobrand.moniker == 'zurich' %] + <th>[% loc('Email') %]</th> + [% ELSE %] + <th>[% loc('Category') %]</th> + [% END %] + </tr> [%- FOREACH body IN bodies %] [%- SET id = body.id %] - [%- '<ul>' IF loop.first %] [% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %] - <li><a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a> - [%- ', ' _ body.parent.name IF body.parent -%] - [% IF c.cobrand.moniker != 'zurich' %] - – + <tr> + <td> + [% IF c.cobrand.moniker == 'zurich' %] + [% FILTER repeat(4*body.api_key) %] [% END %] + [% END %] + <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a> + [% IF c.cobrand.moniker != 'zurich' %] + [%- ', ' _ body.parent.name IF body.parent -%] + [% END %] + </td> + [% IF c.cobrand.moniker == 'zurich' %] + <td>[% body.endpoint %]</td> + [% ELSE %] [% IF counts.$id %] [% tprintf( loc('%d addresses'), counts.$id.c) IF c.cobrand.moniker != 'emptyhomes' %] [% IF counts.$id.deleted %] @@ -21,8 +38,9 @@ no categories [% END %] [% END %] - [%- '</ul>' IF loop.last %] + </tr> [%- END %] +</table> <h2>[% loc('Add body') %]</h2> [% INCLUDE 'admin/body-form.html', body='' %] diff --git a/templates/web/default/admin/user-form.html b/templates/web/default/admin/user-form.html new file mode 100644 index 000000000..eec54d447 --- /dev/null +++ b/templates/web/default/admin/user-form.html @@ -0,0 +1,18 @@ +<form method="post" action="[% c.uri_for( 'user_edit', user.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <input type="hidden" name="token" value="[% token %]" > + <input type="hidden" name="submit" value="1" > + <ul> + <li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% user.name | html %]'></li> + <li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% user.email | html %]'></li> + <li>[% loc('Body:') %] <select id='body' name='body'> + <option value=''>[% loc('No body') %]</option> + [% FOR body IN bodies %] + <option value="[% body.id %]"[% ' selected' IF body.id == user.from_body.id %]>[% body.name %]</option> + [% END %] + </select> + [% IF c.cobrand.moniker != 'zurich' %] + <li>[% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]></li> + [% END %] + </ul> + <input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" > +</form> diff --git a/templates/web/default/admin/user_edit.html b/templates/web/default/admin/user_edit.html index df1cb221f..d69c873a3 100644 --- a/templates/web/default/admin/user_edit.html +++ b/templates/web/default/admin/user_edit.html @@ -3,20 +3,6 @@ [% status_message %] -<form method="post" action="[% c.uri_for( 'user_edit', user.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <input type="hidden" name="token" value="[% token %]" > - <input type="hidden" name="submit" value="1" > -<ul> -<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% user.name | html %]'></li> -<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% user.email | html %]'></li> -<li>[% loc('Body:') %] <select id='body' name='body'> - <option value=''>[% loc('No body') %]</option> -[% FOR body IN bodies %] - <option value="[% body.id %]"[% ' selected' IF body.id == user.from_body.id %]>[% body.name %]</option> -[% END %] -</select> -<li>[% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]></li> -</ul> -<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form> +[% INCLUDE 'admin/user-form.html' %] [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/users.html b/templates/web/default/admin/users.html index 7e652e559..de0b74746 100644 --- a/templates/web/default/admin/users.html +++ b/templates/web/default/admin/users.html @@ -2,17 +2,19 @@ [% PROCESS 'admin/report_blocks.html' %] <form method="get" action="[% c.uri_for('users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search"> + <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]"> </form> - [% IF searched %] + <table cellspacing="0" cellpadding="2" border="1"> <tr> <th>[% loc('Name') %]</th> <th>[% loc('Email') %]</th> <th>[% loc('Body') %]</th> + [% IF c.cobrand.moniker != 'zurich' %] <th>[% loc('Flagged') %]</th> + [% END %] <th>*</th> </tr> [%- FOREACH user IN users %] @@ -20,12 +22,19 @@ <td>[% PROCESS value_or_nbsp value=user.name %]</td> <td><a href="[% c.uri_for( 'reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></td> <td>[% PROCESS value_or_nbsp value=user.from_body.name %]</td> + [% IF c.cobrand.moniker != 'zurich' %] <td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : ' ' %]</td> + [% END %] <td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td> </tr> [%- END -%] </table> +[% ELSE %] + +<h2>[% loc('Add user') %]</h2> +[% INCLUDE 'admin/user-form.html' %] + [% END %] [% INCLUDE 'admin/footer.html' %] |