summaryrefslogtreecommitdiff
path: root/core/views/admin_themes.html.php
blob: 5e10a8030c4d239701aa46d8876f9ae93194c348 (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
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
  var load_url = '<?= url::site("admin/themes/__TYPE__") ?>';
  var load = function(type) {
    $("#gThemePane").load(load_url.replace('__TYPE__', type));
  }

  var select_url = "<?= url::site("admin/themes/choose") ?>";
  select = function(type, id) {
    $.post(select_url, {"type": type, "id": id, "csrf": '<?= access::csrf_token() ?>'},
      function() { load(type) });
  }
</script>
<div id="gAdminThemes">
  <h1> <?= t("Theme Administration") ?> </h1>
  <div id="gThemeTabs">
    <?= $menu ?>
  </div>

  <div id="gThemePane">
    <h1> <?= $title ?> </h1>
    <div id="gSelectedTheme">
      <h2> <?= t("Selected theme") ?> </h2>
      <div class="gBlock">
         <img src="<?= url::file("themes/{$active}/thumbnail.png") ?>"
             alt="<?= $themes[$active]->name ?>" />
        <h3> <?= $themes[$active]->name ?> </h3>
        <p>
          <?= $themes[$active]->description ?>
        </p>
      </div>
    </div>

    <div id="gAvailableThemes">
      <h2> <?= t("Available themes") ?> </h2>
      <p><?= t("Change the look of your Gallery with one of the following available themes. Click to preview and activate.") ?></p>
      <? foreach ($themes as $id => $info): ?>
      <? if (!$info->$type) continue ?>
      <? if ($id == $active) continue ?>
      <div class="gBlock">
        <a href="<?= url::site("admin/themes/preview/$type/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: {{theme_name}}", array("theme_name" => $info->name)) ?>">
        <h3> <?= $info->name ?> </h3>
        <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
             alt="<?= $info->name ?>" />
        <p>
          <?= $info->description ?>
        </p>
        </a>
      </div>
      <? endforeach ?>
    </div>
  </div>
</div>