antville/code/User/$User.skin

178 lines
7.5 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% #welcome %>
<p>
<% gettext "This site is currently {0}." <% gettext <% site.mode %> %> %>
<% if <% site.mode %> is closed then
<% gettext "This means that only you and other {0} of this site have access to it. You can safely start to customize it or to fill it with all the content you have in mind." <% site.members.link owners <% gettext owners %> %> %>
else <% if <% site.mode %> is restricted then "" else
<% gettext "Thus, it is publicly accessible for every visitor." %> %>
%>
</p>
<p>
<% gettext 'The easiest way to customize your site is to change its <a href="{0}">settings</a>. You can change the language and time zone or the main title of your site, open or close it and much more.' <% site.href edit %> %>
</p>
<p>
<% gettext 'Of course, you can now also start to add <a href="{0}">stories</a>, upload some <a href="{1}">images</a> or <a href="{2}">files</a>, create your first <a href="{3}">poll</a> or get a glimpse of Antvilles wonderful customization possibilities; just take a look at the <a href="{4}">layout section</a> where you can modify the appearance of your site according to your needs.' <% site.stories.href create %> <% site.images.href create %> <% site.files.href create %> <% site.polls.href create %> <% layout.href %> %>
</p>
<p class='uk-text-bold'>
<% gettext 'Have a lot of fun!' %>
</p>
<p>
<% image /favicon.png width=50 height=auto %>
</p>
<% #subscriptions %>
<h1><% response.title %></h1>
<div>
<% members.link updates <% gettext "Updates" %> %>
<% members.link subscriptions <% gettext Subscriptions %> prefix="| " %>
</div>
<% response.pager %>
<table class='uk-table uk-table-striped uk-table-hover uk-table-condensed'>
<thead>
<tr>
<th><% gettext Site %></th>
<th><% gettext Role %></th>
<th class='uk-text-nowrap'><% gettext 'Last Update' %></th>
<th></th>
</tr>
</thead>
<tbody>
<% response.list %>
</tbody>
</table>
<% response.pager %>
<% #edit %>
<h1><% response.title %></h1>
<div class='uk-article-meta'>
<% gettext 'Created by {0} on {1}' <% user.name %> <% user.created short %> %>
<% if <% user.created %> is <% user.modified %> then '' else
<% gettext 'Last modified by {0} on {1}' <% user.name %> <% this.modified short %> prefix=<br> %>
%>
</div>
<div class='uk-margin-top uk-margin-bottom'>
<% context.link export <% gettext Export %> %>
</div>
<form id='edit' class='uk-form uk-form-stacked uk-margin-top' method="post">
<input type="hidden" name="digest" id="digest">
<input type="hidden" name="hash" id="hash">
<figure class='uk-float-right' style='height: 0'>
<a href='https://gravatar.com'>
<img alt='' src='<% user.gravatar suffix="?s=160&amp;d=mm" %> 'style='border: 1px solid #ddd; border-radius: 4px;'>
<figcaption class='uk-text-center'>
<% gettext 'Account Image' %></a>
</figcaption>
</a>
</figure>
<div class='uk-width-2-3'>
<div class='uk-form-row'>
<label class='uk-form-label' for='email'>
<% gettext E-mail %>
</label>
<div class='uk-form-controls'>
<% user.input email type=email class='uk-form uk-width-2-3' %>
<a href='mailto:<% user.email %>'><i class='uk-icon-envelope'></i></a>
</div>
</div>
<div class='uk-form-row'>
<label class='uk-form-label' for='url'>
<% gettext "Personal URL" %>
<i class='uk-icon-info-circle uk-text-muted' title='<% gettext "If you enter a URL here your user name will appear as link next to your posted items." %>' data-uk-tooltip="{pos: 'right'}"></i>
</label>
<div class='uk-form-controls'>
<% user.input url type=url class='uk-form uk-width-2-3' %>
<a href='<% user.url %>'><i class='uk-icon-link'></i></a>
</div>
</div>
<div class='uk-form-row'>
<label class='uk-form-label' for='password'>
<% gettext "Password" %>
</label>
<div class='uk-form-controls uk-form-password uk-width-2-3'>
<input type="password" name="password" id="password" class='uk-width-1-1'>
<a href='javascript:' class='uk-form-password-toggle' data-uk-form-password="{
lblHide: '<% gettext Hide %>',
lblShow: '<% gettext Show %>'
}"><% gettext Show %></a>
</div>
</div>
</div>
<% user.skin $User#admin restricted=true %>
<div class='uk-form-row uk-margin-top'>
<button class='uk-button uk-button-primary' type="submit" id="submit" name="save" value="1">
<% gettext Save %>
</button>
<% user.link delete <% gettext 'Delete' %> class='uk-button' %>
<a href='<% site.href %>' class="uk-button uk-button-link"><% gettext Cancel %></a>
</div>
</form>
<script type="text/javascript">
$("#submit").on('click', function (event) {
var token = "<% session.token %>";
var salt = "<% session.salt %>";
var password = $("#password").val();
if (password) {
var hash = $.md5(password + token);
$("#hash").val(hash);
$("#password").val("");
}
});
</script>
<% #admin %>
<fieldset class='uk-margin-top uk-margin-bottom'>
<legend><% gettext Administration %></legend>
<div class='uk-form-row'>
<label class='uk-form-label' for='status'>
<% gettext Status %>
</label>
<div class='uk-form-controls'>
<% user.select status %>
</div>
</div>
<div class='uk-form-row'>
<label class='uk-form-label' for='status'>
<% gettext Information %>
</label>
<div><% ngettext "{0} Site" "{0} Sites" <% count <% user.self sites %> %> %></div>
<div><% ngettext "{0} Story" "{0} Stories" <% count <% user.self stories %> %> %></div>
<div><% ngettext "{0} Comment" "{0} Comments" <% count <% user.self comments %> %> %></div>
<div><% ngettext "{0} Image" "{0} Images" <% count <% user.self images %> %> %></div>
<div><% ngettext "{0} File" "{0} Files" <% count <% user.self files %> %> %></div>
</div>
<div class='uk-form-row'>
<label class='uk-form-label' for='notes'>
<% gettext Notes %>
</label>
<div class='uk-form-controls'>
<% user.textarea notes class='uk-width-1-1' rows=5 %>
</div>
</div>
</fieldset>
<% #export %>
<h1><% gettext "Export Account Data" %></h1>
<p>
<% if <% param.status %> is null then <% if <% this.export %> is null then '' else <% gettext "{0}Download the archive{1} or click “Export” to create a new one." <% this.export prefix="<a href='" suffix="'>" %> "</a>" %> %> else <% param.status %> %>
</p>
<form action="<% context.href export %>" method="post">
<button type="submit" name="submit" value="<% if <% param.status %> is null then export else cancel %>" class='uk-button uk-button-primary'>
<% if <% param.status %> is null then <% gettext Export %> else <% gettext Cancel %> %>
</button>
<a href='<% context.href edit %>' class='uk-button uk-button-link'><% gettext Account %></a>
</form>
<% #notify_reset %>
<% gettext 'Hello {0}.' <% user.name %> %>
<% gettext "You (or someone pretending to be you) requested to reset your
account password for the site {0} at {1}." <% site.title %> <% site.href %> %>
<% gettext "To confirm the request please click the link below." %>
<% gettext "You will then be asked to change your password." %>
<% param.href %>?user=<% user.id %>&token=<% param.token %>
<% gettext "Best regards." %>
<% gettext "The Management" %>
<% // This comment simply adds a linebreak to format the message nicely %>