zine-main / zine / templates / admin / perform_upgrade.html

Full commit
  <title>Zine Upgrade</title>
  <style type="text/css">
    body {
      font-family: 'Times New Roman', sans-serif;
      font-size: 1.1em;
      background-color: #EEF5FA;
      padding: 2em 0 2em 0;
      margin: 0;
      text-align: justify;

    div.msg {
      width: 40em;
      margin: 0 auto 0 auto;
      padding: 20px;
      background-color: white;
      border: 1px solid #316182;

    h1 {
      background-color: #316182;
      font-weight: normal;
      color: white;
      margin: -20px -20px 20px -20px;
      padding: 10px 20px 10px 20px;

    h2 {
      border-top: 5px solid #cfcfcf;
      padding-top: 5px;
      margin-left: -20px;
      margin-bottom: 0;
      margin-right: -20px;
      text-align: center;

    h3 {
      font-weight: normal;
      border-bottom: 1px solid #cfcfcf;

    ul {
      padding-top: 5px;

    li {
      text-align: left;

    div.message {
      border: 1px solid #E8B5B5;
      padding: 8px;
      -moz-border-radius: 3px;
      -webkit-border-radius: 3px;
      border-radius: 3px;
      background-color: #FCF7F7;
    } {
      font-size: 80%;
      margin-top: 10px;
      margin-left: 10px;
      margin-right: 10px;
      background-color: #F7FAFD;
      border-color: #B4D2E7;

    .progress {
      font-size: 80%;
      font-family: 'Consolas', 'Bitstream Vera Sans Mono', 'Monaco', monospace;

    p.finish {
      border-top: 5px solid #cfcfcf;
      padding-top: 5px;
      margin-left: -20px;
      margin-right: -20px;
      text-align: center;


  <div class="msg">
    {%- if in_progress %}
      <h1>{{ _("Upgrade In Progress") }}</h1>
      <p>{% trans %}<b>Database upgrade in progress!</b>{% endtrans %}</p>
    {%- elif live_log is defined %}
      <h1>{{ _("Upgrading...") }}</h1>
      <p>{% trans %}Upgrade in progress.
        <strong>Do not hit cancel!</strong>{% endtrans %}</p>
      {%- for event in live_log %}{{ event }}{%- endfor %}
      <p class="finish">{% trans %}Database upgrade finished.{% endtrans %}</p>
      <div class="message">{% trans %}Zine maintenance mode has been switched on.
          Please <a href="{{ blog_url }}">check your blog</a> to see if the
          blog works fine with the upgraded database.
          Don't forget to <a href="{{ maintenance_url }}">turn maintenance mode
          off again</a> once you finish.
      {% endtrans %}</div>
      {# XXX offer advice in case the upgrade failed? #}
      {{ finish() }}
    {%- else %}
      <h1>{{ _("Upgrade required") }}</h1>
      <p>{% trans %}<b>Zine requires a database upgrade!</b>{% endtrans %}</p>
      <p>{% trans %}A database upgrade can become necessary when a new version
          of Zine or one of your plugins is installed.{% endtrans %}</p>
      <p>{% trans %}When you click “Perform upgrade”, your database will be
          brought in sync with the format the installed software expects.  While
          this is designed not to corrupt your database, you can back it up
          now before clicking “Perform upgrade”.{% endtrans %}</p>
      {%- if repo_ids %}
      <p>{% trans %}Components that need an upgrade:{% endtrans %}
          {{ repo_ids|join(', ') }}</p> 
      {%- endif %}
      <form action="" method="POST">
        <input type="submit" name="upgrade" value="{{ _("Perform upgrade") }}">
    {%- endif %}