diff options
| author | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-16 17:31:20 +0200 | 
|---|---|---|
| committer | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-16 17:31:20 +0200 | 
| commit | 7f5030ac208c30a7dc576a57cd9e665022ccbde5 (patch) | |
| tree | 6b23e78aa8cc2dd363def46e083217e3c9b52f1b /modules/info | |
| parent | 923732ca4dca6db218f6252a7133cd72f98fa086 (diff) | |
| parent | 85b0f580291e375a2c5ec21b8210e59023ee24c2 (diff) | |
Merge commit 'upstream/master'
Diffstat (limited to 'modules/info')
| -rw-r--r-- | modules/info/helpers/info_theme.php | 6 | ||||
| -rw-r--r-- | modules/info/module.info | 4 | ||||
| -rw-r--r-- | modules/info/views/info_block.html.php | 75 | 
3 files changed, 40 insertions, 45 deletions
| diff --git a/modules/info/helpers/info_theme.php b/modules/info/helpers/info_theme.php index 151885b7..51378e54 100644 --- a/modules/info/helpers/info_theme.php +++ b/modules/info/helpers/info_theme.php @@ -37,7 +37,11 @@ class info_theme_Core {      }      if ($item->owner) {        $results .= "<li>"; -      $results .= t("By: %owner_name", array("owner_name" => "<a href=\"#\">{$item->owner->name}</a>")); +      if ($item->owner->url) { +        $results .= t("By: %owner_name", array("owner_name" => "<a href=\"{$item->owner->url}\">{$item->owner->full_name}</a>")); +      } else { +        $results .= t("By: %owner_name", array("owner_name" => "{$item->owner->full_name}")); +      }        $results .= "</li>";      }      return $results; diff --git a/modules/info/module.info b/modules/info/module.info index ce03473e..e352213c 100644 --- a/modules/info/module.info +++ b/modules/info/module.info @@ -1,3 +1,3 @@ -name = Info -description = Display extra information about photos and albums +name = "Info" +description = "Display extra information about photos and albums"  version = 1 diff --git a/modules/info/views/info_block.html.php b/modules/info/views/info_block.html.php index 9f9ec5df..9f544376 100644 --- a/modules/info/views/info_block.html.php +++ b/modules/info/views/info_block.html.php @@ -1,44 +1,35 @@  <?php defined("SYSPATH") or die("No direct script access.") ?> -<table class="gMetadata"> -  <tbody> -    <tr> -      <th><?= t("Title:") ?></th> -      <td><?= p::clean($item->title) ?></td> -    </tr> -    <? if ($item->description): ?> -    <tr> -      <th><?= t("Description:") ?></th> -      <td><?= p::clean($item->description) ?></td> -    </tr> +<ul class="gMetadata"> +  <li> +    <strong class="caption"><?= t("Title:") ?></strong> +    <?= p::purify($item->title) ?> +  </li> +  <? if ($item->description): ?> +  <li> +    <strong class="caption"><?= t("Description:") ?></strong> +     <?= nl2br(p::purify($item->description)) ?> +  </li> +  <? endif ?> +  <? if ($item->id != 1): ?> +  <li> +    <strong class="caption"><?= t("Folder name:") ?></strong> +    <?= p::clean($item->name) ?> +  </li> +  <? endif ?> +  <? if ($item->captured): ?> +  <li> +    <strong class="caption"><?= t("Captured:") ?></strong> +    <?= date("M j, Y H:i:s", $item->captured)?> +  </li> +  <? endif ?> +  <? if ($item->owner): ?> +  <li> +    <strong class="caption"><?= t("Owner:") ?></strong> +    <? if ($item->owner->url): ?> +    <a href="<?= $item->owner->url ?>"><?= p::clean($item->owner->full_name) ?></a> +    <? else: ?> +    <?= p::clean($item->owner->name) ?>      <? endif ?> -    <? if ($item->id != 1): ?> -    <tr> -      <th><?= t("Name:") ?></th> -      <td><?= p::clean($item->name) ?></td> -    </tr> -    <? endif ?> -    <? if ($item->id != 1): ?> -    <? $parent = $item->parent(); ?> -    <tr> -      <th><?= t("Album: ") ?></th> -      <td> -        <a href="<?= url::site("albums/{$parent->id}?show=$item->id") ?>"> -          <?= p::clean($parent->title) ?> -        </a> -      </td> -    </tr> -    <? endif ?> -    <? if ($item->captured): ?> -    <tr> -      <th><?= t("Captured:") ?></th> -      <td><?= gallery::date_time($item->captured) ?></td> -    </tr> -    <? endif ?> -    <? if ($item->owner): ?> -    <tr> -      <th><?= t("Owner:") ?></th> -      <td><a href="#"><?= p::clean($item->owner->name) ?></a></td> -    </tr> -    <? endif ?> -  </tbody> -</table> +  </li> +  <? endif ?> +</ul> | 
