<% #welcome %>
<p>
   <% gettext "The 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}">preferences</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 create <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 Antville’s wonderful customization possibilities by having 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><% gettext "Have a lot of fun!" %></p>

<% #subscriptions %>
<h1><% response.title %></h1>
<div class="ample">
   <% 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>
         <td><% gettext Site %></td>
         <td><% gettext Role %></td>
         <td><% gettext 'Last Update' %></td>
         <td></td>
      </tr>
   </thead>
   <tbody>
      <% response.list %>
   </tbody>
</table>
<% response.pager %>

<% #edit %>
<h1><% response.title %></h1>
<form class='uk-form uk-form-stacked' method="post" action="<% response.action %>">
   <input type="hidden" name="digest" id="digest">
   <input type="hidden" name="hash" id="hash">
   <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-1-2' %>
         <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-1-2' %>
         <a href='<% user.url %>'><i class='uk-icon-globe'></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-1-2'>
         <input type="password" name="password" id="password" class='uk-width-1-1'>
         <a href='' class='uk-form-password-toggle' data-uk-form-password="{
            lblHide: '<% gettext Hide %>'
         }"><% gettext Show %></a>
      </div>
   </div>
   <% user.skin $User#admin restricted=true %>
   <div class='uk-form-row uk-margin-top'>
      <fieldset>
         <legend><% gettext Connections %></legend>
         <% trail Connect context=profile default=— %>
      </fieldset>
   </div>
   <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>
      <a href="" class="uk-button uk-button-link cancel"><% gettext Cancel %></a>
   </div>
</form>
<script type="text/javascript">
$(function () {
   $("#submit").click(function (event) {
      //event.preventDefault();
      var token = "<% session.token %>";
      var salt = "<% session.salt %>";
      var password = $("#password").val();
      if (password) {
         var hash = $.md5(password + token);
         $("#hash").val(hash);
         $("#password").val("");
         //$("#digest").val($.md5($.md5(password + salt) + token));
      }
      return true;
   });
});
</script>

<% #admin %>
<a name='admin' id='admin'></a>
<fieldset class='uk-margin-top'>
   <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>
   <div class='uk-form-row'>
      <a style='color: #fff;' href='<% this.href delete %>' class='uk-button uk-button-danger'>
         <i class='uk-icon-trash-o'></i>
         Delete this account
      </a>
   </div>
</fieldset>


<% #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 %>
