2009-01-01 00:23:29 +00:00
<? php defined ( "SYSPATH" ) or die ( "No direct script access." ) ?>
2009-10-18 20:22:10 -06:00
<div class="g-block ui-helper-clearfix">
2010-01-21 12:57:45 -08:00
<script type="text/javascript">
$("#g-module-update-form").ready(function() {
$("#g-module-update-form").ajaxForm({
dataType: "json",
success: function(data) {
if (data.reload) {
2011-04-21 13:59:03 -07:00
window.location = "<? url::site("/admin/modules") ?>";
2010-01-21 12:57:45 -08:00
} else {
$("body").append('<div id="g-dialog">' + data.dialog + '</div>');
$("#g-dialog").dialog({
bgiframe: true,
autoOpen: true,
autoResize: true,
modal: true,
resizable: false,
height: 400,
width: 500,
position: "center",
2010-08-16 22:03:23 -07:00
title: <?= t("Confirm module activation")->for_js() ?>,
2010-01-21 12:57:45 -08:00
buttons: {
2010-01-21 20:33:26 -08:00
<?= t("Continue")->for_js() ?>: function() {
2010-01-21 12:57:45 -08:00
$("form", this).submit();
2010-01-28 09:35:38 -08:00
$(".ui-dialog-buttonpane button:contains(" + <?= t("Continue")->for_js() ?> + ")")
2010-01-22 12:16:36 -08:00
.attr("disabled", "disabled")
.addClass("ui-state-disabled");
2010-01-21 12:57:45 -08:00
},
2010-01-21 20:33:26 -08:00
<?= t("Cancel")->for_js() ?>: function() {
2010-01-21 12:57:45 -08:00
$(this).dialog("destroy").remove();
}
}
});
if (!data.allow_continue) {
2010-01-28 09:35:38 -08:00
$(".ui-dialog-buttonpane button:contains(" + <?= t("Continue")->for_js() ?> + ")")
2010-01-21 12:57:45 -08:00
.attr("disabled", "disabled")
.addClass("ui-state-disabled");
}
}
}
});
});
</script>
2009-01-08 17:13:06 +00:00
<h1> <?= t("Gallery Modules") ?> </h1>
2008-12-30 04:13:43 +00:00
<p>
2013-01-22 18:39:24 -05:00
<?= t("Power up your Gallery by <a href=\"%url\">adding more modules</a>! Each module provides new cool features.", array("url" => "http://codex.galleryproject.org/Category:Gallery_3:Modules")) ?>
2008-12-30 04:13:43 +00:00
</p>
2013-02-20 17:30:27 +01:00
<? if ($obsolete_modules_message): ?>
<p class="g-warning">
<?= $obsolete_modules_message ?>
</p>
<? endif ?>
2009-10-18 20:22:10 -06:00
<div class="g-block-content">
2010-01-21 12:57:45 -08:00
<form id="g-module-update-form" method="post" action="<?= url::site("admin/modules/confirm") ?>">
2009-10-18 20:22:10 -06:00
<?= access::csrf_form_field() ?>
<table>
<tr>
<th> <?= t("Installed") ?> </th>
2010-06-15 16:11:21 -07:00
<th style="width: 8em"> <?= t("Name") ?> </th>
2009-10-18 20:22:10 -06:00
<th> <?= t("Version") ?> </th>
<th> <?= t("Description") ?> </th>
2011-04-23 15:10:04 -07:00
<th style="width: 60px"> <?= t("Details") ?> </th>
2009-10-18 20:22:10 -06:00
</tr>
<? foreach ($available as $module_name => $module_info): ?>
2009-11-15 19:34:44 -08:00
<tr class="<?= text::alternate("g-odd", "g-even") ?>">
2009-10-18 20:22:10 -06:00
<? $data = array("name" => $module_name); ?>
<? if ($module_info->locked) $data["disabled"] = 1; ?>
<td> <?= form::checkbox($data, '1', module::is_active($module_name)) ?> </td>
<td> <?= t($module_info->name) ?> </td>
<td> <?= $module_info->version ?> </td>
<td> <?= t($module_info->description) ?> </td>
2011-04-23 14:43:33 -07:00
<td style="white-space: nowrap">
<ul class="g-buttonset">
<li>
<a target="_blank"
<? if (isset($module_info->author_url)): ?>
class="ui-state-default ui-icon ui-icon-person ui-corner-left"
href="<?= $module_info->author_url ?>"
<? else: ?>
class="ui-state-disabled ui-icon ui-icon-person ui-corner-left"
href="#"
<? endif ?>
<? if (isset($module_info->author_name)): ?>
title="<?= $module_info->author_name ?>"
<? endif ?>
>
<? if (isset($module_info->author_name)): ?>
<?= $module_info->author_name ?>
<? endif ?>
</a>
</li>
<li>
<a target="_blank"
<? if (isset($module_info->info_url)): ?>
class="ui-state-default ui-icon ui-icon-info"
href="<?= $module_info->info_url ?>"
<? else: ?>
class="ui-state-disabled ui-icon ui-icon-info"
href="#"
<? endif ?>
>
<?= t("info") ?>
</a>
</li>
<li>
<a target="_blank"
<? if (isset($module_info->discuss_url)): ?>
class="ui-state-default ui-icon ui-icon-comment ui-corner-right"
href="<?= $module_info->discuss_url ?>"
<? else: ?>
class="ui-state-disabled ui-icon ui-icon-comment ui-corner-right"
href="#"
<? endif ?>
>
<?= t("discuss") ?>
</a>
</li>
</ul>
</td>
2009-10-18 20:22:10 -06:00
</tr>
<? endforeach ?>
</table>
<input type="submit" value="<?= t("Update")->for_html_attr() ?>" />
</form>
</div>
2008-12-22 03:41:33 +00:00
</div>