<% #create %>
<h1><% response.title %></h1>
<form class='uk-form uk-form-stacked' method="post" action="<% response.action %>">
   <div class='uk-form-row'>
      <label class='uk-form-label' for='name'>
         <% gettext Name %> <i class='uk-icon uk-icon-info-circle uk-text-muted' data-uk-tooltip title="<% gettext "Please note that you cannot change the name after the site was created." %>"></i>
      </label>
      <div class='uk-form-controls'>
         <% newSite.input name class=uk-form-width-medium maxlength=25 tabindex=1 %>
         <div class='uk-form-help-inline'>
            <% gettext 'The name will be part of the URL of your site.' %>
         </div>
         <div class='uk-form-help-block'>
            <% root.skin Root#urlPreview %>
            <noscript>
               <% gettext 'E.g. if you enter <em>{0}</em> here your site will be reachable via {1}' <% example.name %> <% root.href <% example.name %> prefix=<code> suffix=</code> %> %>
            </noscript>
         </div>
      </div>
   </div>
   <div class='uk-form-row'>
      <label class='uk-form-label' for='title'>
         <% gettext Title %> <i class='uk-icon uk-icon-info-circle uk-text-muted' data-uk-tooltip title='<% gettext "The title will appear in the header of every page of your site. You can change it anytime you want." %>'></i>
      </label>
      <div class='uk-form-controls'>
         <% newSite.input title class=uk-width-1-1 tabindex=2 %>
      </div>
   </div>
   <div class='uk-form-row'>
      <button class='uk-button uk-button-primary' type="submit" id="submit" name="create" value="1"tabindex=3>
         <% gettext Create %>
      </button>
      <a href='<% root.href %>' class="uk-button uk-button-link" tabindex=4><% gettext Cancel %></a>
   </div>
</form>

<% #sites %>
<h1><% response.title %></h1>
<p><% gettext "This is the directory of public sites hosted here, in alphabetical order." %></p>
<% response.pager %>
<table class='uk-table uk-table-striped uk-table-hover uk-table-condensed'>
   <thead>
      <tr>
         <th><% gettext Title %></th>
         <th><% gettext 'Last Update' %></th>
         <th><% gettext Account %></th>
      </tr>
   </thead>
   <tbody>
      <% response.list %>
   </tbody>
</table>
<% response.pager %>

<% #notfound %>
<h1><% gettext Sorry! %></h1>
<p><% gettext "The path you requested was not found."  %></p>
<% param.path encoding="all" prefix=<pre>/ suffix=</pre> %>

<% #error %>
<h1><% gettext Sorry! %></h1>
<p><% gettext "An error occurred while processing your request." %></p>
<div class='uk-alert uk-alert-danger'>
  <p class='uk-text-break'><% response.error %></p>
</div>

<% #health %>
<h1><% response.title %></h1>
<div class='uk-panel uk-panel-header'>
   <h3 class='uk-panel-title'><% gettext Status %></h3>
   <p><% site.skin Root#status %></p>
</div>
<div class='uk-panel uk-panel-header'>
   <h3 class='uk-panel-title'><% gettext Details %></h3>
   <dl class='uk-description-list-horizontal'>
      <dt><% gettext Sessions %></dt>
      <dd><% param.sessions %></dd>
      <dt><% gettext Uptime %></dt>
      <dd><% ngettext '{0} day' '{0} days' <% param.uptime %> %></dd>
      <dt><% gettext Threads %></dt>
      <dd>
         <% gettext '{0} active' <% param.activeThreads %> %>,
         <% gettext '{0} free' <% param.freeThreads %> %>
      </dd>
      <dt><% gettext Requests %></dt>
      <dd>
         <% gettext '{0} total' <% param.requestCount %> %>,
         <% gettext '{0} in the last 5 min.' <% param.requestsPerUnit default=n.a. %> %>
      </dd>
      <dt><% gettext 'Errors' %></dt>
      <dd>
         <% gettext '{0} total' <% param.errorCount %> %>,
         <% gettext '{0} in the last 5 min.' <% param.errorsPerUnit default=n.a. %> %>
      </dd>
      <dt><% gettext 'Error Ratio' %></dt>
      <dd>
         <% gettext '{0}% total' <% param.errorRatio %> %>,
         <% gettext '{0}% in the last 5 min.' <% param.errorRatioPerUnit %> %>
      </dd>
      <dt><% gettext 'Xml-Rpc Count' %></dt>
      <dd><% ngettext '{0} request' '{0} requests' <% param.xmlrpcCount %> %></dd>
      <dt><% gettext 'Cache' %></dt>
      <dd><% gettext '{0} of {1} objects' <% param.cacheusage %> <% param.cacheSize %> %></dd>
      <dt><% gettext 'Memory' %></dt>
      <dd>
         <% gettext '{0} MB total'  <% param.totalMemory %> %>,
         <% gettext '{0} MB free' <% param.freeMemory %> %>
      </dd>
      <dt><% gettext 'Queue' %></dt>
      <dd>
         <% ngettext '{0} request' '{0} requests' <% param.requests %> %>,
         <% ngettext '{0} mail' '{0} mails' <% param.mails %> %>,
         <% ngettext '{0} callback' '{0} callbacks' <% param.callbacks %> %>,
      </dd>
      <dd></dd>
      <dd><% gettext '{0} log entries' <% param.entries %> %></dd>
      <dt><% gettext Version %></dt>
      <dd><% version %></dd>
      <dt><% gettext Build %></dt>
      <dd>
         <% link <% version hash prefix='https://github.com/antville/antville/commit/' %> <% version hash %> %> (<% version date | format date %>)
      </dd>
      <dt><% gettext 'Helma Version' %></dt>
      <dd><% param.helma %></dd>
   </dl>
</div>
