blob: 0c985c6b0f6b632709193cca169601caa57f3d31 (
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
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
<html>
<head>
<title><?= t("Gallery 3 upgrader") ?></title>
<link rel="stylesheet" type="text/css" href="<?= url::file("modules/gallery/css/upgrader.css") ?>"
media="screen,print,projection" />
<script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script>
</head>
<body>
<div id="outer">
<img src="<?= url::file("modules/gallery/images/gallery.png") ?>" />
<div id="inner">
<? if ($can_upgrade): ?>
<? if ($done): ?>
<div id="dialog">
<a onclick="$('#dialog').fadeOut(); return false;" href="#" class="close">[x]</a>
<div>
<h1> <?= t("That's it!") ?> </h1>
<p>
<?= t("Your <a href=\"%url\">Gallery</a> is up to date.",
array("url" => html::mark_clean(item::root()->url()))) ?>
</p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("#dialog").css("left", Math.round(($(window).width() - $("#dialog").width()) / 2));
$("#dialog").css("top", Math.round(($(window).height() - $("#dialog").height()) / 2));
});
</script>
<? endif ?>
<p class="<?= $done ? "muted" : "" ?>">
<?= t("Welcome to the Gallery upgrader. One click and you're done!") ?>
</p>
<table>
<tr class="<?= $done ? "muted" : "" ?>">
<th> <?= t("Module name") ?> </th>
<th> <?= t("Installed version") ?> </th>
<th> <?= t("Available version") ?> </th>
</tr>
<? foreach ($available as $id => $module): ?>
<? if ($module->active): ?>
<tr class="<?= $module->version == $module->code_version ? "current" : "upgradeable" ?>" >
<td class="name <?= $id ?>">
<?= t($module->name) ?>
</td>
<td>
<?= $module->version ?>
</td>
<td>
<?= $module->code_version ?>
</td>
</tr>
<? else: ?>
<? @$inactive++ ?>
<? endif ?>
<? endforeach ?>
</table>
<? if ($done): ?>
<div class="button muted">
<?= t("Upgrade all") ?>
</div>
<? else: ?>
<div class="button button-active">
<a href="<?= url::site("upgrader/upgrade") ?>">
<?= t("Upgrade all") ?>
</a>
</div>
<? endif ?>
<? if (@$inactive): ?>
<p class="<?= $done ? "muted" : "" ?>">
<?= t("The following modules are inactive and don't require an upgrade.") ?>
</p>
<ul class="<?= $done ? "muted" : "" ?>">
<? foreach ($available as $module): ?>
<? if (!$module->active): ?>
<li>
<?= t($module->name) ?>
</li>
<? endif ?>
<? endforeach ?>
</p>
<? endif ?>
<? else: // can_upgrade ?>
<h1> <?= t("Who are you?") ?> </h1>
<p>
<?= t("You're not logged in as an administrator, so we have to verify you to make sure it's ok for you to do an upgrade. To prove you can run an upgrade, create a file called <br/><b>%name</b> in your <b>gallery3/var/tmp</b> directory.", array("name" => "$upgrade_token")) ?>
</p>
<a href="<?= url::site("upgrader?") ?>"><?= t("Ok, I've done that") ?></a>
<? endif // can_upgrade ?>
</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>.",
array("faq_url" => "http://codex.gallery2.org/Gallery3:FAQ",
"forums_url" => "http://gallery.menalto.com/forum")) ?>
</i>
</p>
</div>
</div>
</body>
</html>
|