summaryrefslogtreecommitdiff
path: root/modules/gallery/views/upgrader.html.php
blob: ecf2e26528e71b7c80782a3825eea2e7a5c04e21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php defined("SYSPATH") or die("No direct script access.") ?>
<html>
  <head>
    <title><?= t("Gallery3 Upgrader") ?></title>
  </head>
  <style>
    body {
      background: #eee;
      font-family: Trebuchet MS;
      font-size: 1.1em;
    }
    div#outer {
      width: 650px;
      background: white;
      border: 1px solid #999;
      margin: 0 auto;
        padding: -10px;
    }
    div#inner {
      padding: 0 1em 0 1em;
      margin: 0px;
    }
    div#footer {
      border-top: 1px solid #ccc;
      margin: 1em;
    }
    td.name {
      text-align: left;
      padding-left: 30px;
    }
    td {
      text-align: center;
      border-bottom: 1px solid #eee;
    }
    tr.current td {
      color: #999;
      font-style: italic;
    }
    tr.upgradeable td {
      font-weight: bold;
    }
    table {
      width: 600px;
      margin-bottom: 10px;
    }
    p {
      font-size: .9em;
    }
    ul {
      font-size: .9em;
      list-style: none;
    }
    li {
      display: inline;
    }
    li:before {
      content: "\00BB \0020";
    }
    div.button {
      margin: 0 auto;
      width: 120px;
      text-align: center;
      border: 1px solid #999;
      background: #eee;
    }
    div.button:hover {
      background: #ccc;
    }
  </style>
  <body>
    <div id="outer">
      <img src="<?= url::file("modules/gallery/images/gallery.png") ?>" />
      <div id="inner">
        <p>
          <?= t("Welcome to the Gallery upgrader.  One click and you're done!") ?>
        </p>
        <table>
          <tr>
            <th> <?= t("Module name") ?> </th>
            <th> <?= t("Installed version") ?> </th>
            <th> <?= t("Available version") ?> </th>
          </tr>

          <? foreach (module::available() as $module): ?>
          <? if ($module->active): ?>
          <tr class="<?= $module->version == $module->code_version ? "current" : "upgradeable" ?>" >
            <td class="name">
              <?= $module->name ?>
            </td>
            <td>
              <?= $module->version ?>
            </td>
            <td>
              <?= $module->code_version ?>
            </td>
          </tr>
          <? else: ?>
          <? @$inactive++ ?>
          <? endif ?>
          <? endforeach ?>
        </table>

        <div class="button">
          <a href="<?= url::site("upgrader/upgrade") ?>">
            <?= t("Upgrade all") ?>
          </a>
        </div>

        <? if (@$inactive): ?>
        <p>
          <?= t("The following modules are inactive and don't require an upgrade.") ?>
        </p>
        <ul>
          <? foreach (module::available() as $module): ?>
          <? if (!$module->active): ?>
          <li>
            <?= $module->name ?>
          </li>
          <? endif ?>
          <? endforeach ?>
        </p>
        <? endif ?>
      </div>
      <div id="footer">
        <p>
          <i>
            <?= t("Did something go wrong? Try the <a href=\"%faq_url\">FAQ</a> or ask in the <a href=\"%forums_url\">Gallery forums</a>.</i>",
                array("faq_url" => "http://codex.gallery2.org/Gallery3:FAQ",
                      "forums_url" => "http://gallery.menalto.com/forum")) ?>
          </i>
        </p>
      </div>
    </div>
  </body>
</html>