1a0dc96e77
Here's a summary of the changes I made: 1) html::specialchars --> html::chars 2) ORM::orderby() -> ORM::order_by() 3) ORM::where() now takes 3 parameters including a comparator. So ORM::where("a", $b) is now ORM::where("a", "=", $b) and the middle value can be any comparator. 4) ORM::$loaded --> ORM::loaded() 5) Database::instance() --> db::build() (and there are some other subtle differences, like now you always call execute() at the end of the chain) 6) form::close() and form::close_fieldset() are now gone. Use </form> and </fieldset> respectively. 7) Controller::$input is gone. Use Input::instance() instead. I've done very rudimentary testing so far.
56 lines
1.6 KiB
PHP
56 lines
1.6 KiB
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<ul class="g-metadata">
|
|
<? if ($item->owner): ?>
|
|
<li>
|
|
<strong class="caption"><?= t("Owner:") ?></strong>
|
|
<? if ($item->owner->url): ?>
|
|
<a href="<?= $item->owner->url ?>"><?= html::clean($item->owner->display_name()) ?></a>
|
|
<? else: ?>
|
|
<?= html::clean($item->owner->display_name()) ?>
|
|
<? endif ?>
|
|
</li>
|
|
<? endif ?>
|
|
|
|
<? if ($item->is_album()): ?>
|
|
<li>
|
|
<strong class="caption"><?= t("Date:") ?></strong>
|
|
<?= date("F j, Y", $item->created)?>
|
|
</li>
|
|
<? endif ?>
|
|
<? if ($item->captured): ?>
|
|
<li>
|
|
<strong class="caption"><?= t("Date:") ?></strong>
|
|
<?= date("F j, Y h:i:s a", $item->captured)?>
|
|
</li>
|
|
<? endif ?>
|
|
|
|
<? if (!$item->is_album()): ?>
|
|
<li>
|
|
<strong class="caption"><?= t("File name:") ?></strong>
|
|
<?= html::clean($item->name) ?>
|
|
</li>
|
|
<? endif ?>
|
|
|
|
<? if (module::is_active("tag")): ?>
|
|
<?
|
|
$tagsItem = ORM::factory("tag")
|
|
->join("items_tags", "tags.id", "items_tags.tag_id")
|
|
->where("items_tags.item_id", "=", $item->id)
|
|
->find_all();
|
|
?>
|
|
<? if (count($tagsItem) > 0): ?>
|
|
<li>
|
|
<strong class="caption"><?= t("Tags:") ?></strong>
|
|
<? for ($counter=0; $counter<count($tagsItem); $counter++) { ?>
|
|
<? if ($counter < count($tagsItem)-1) { ?>
|
|
<a href="<?= url::site("tags/$tagsItem[$counter]") ?>"><?= html::clean($tagsItem[$counter]->name) ?></a>,
|
|
<? } else {?>
|
|
<a href="<?= url::site("tags/$tagsItem[$counter]") ?>"><?= html::clean($tagsItem[$counter]->name) ?></a>
|
|
<? } ?>
|
|
<? } ?>
|
|
</li>
|
|
<? endif ?>
|
|
<? endif ?>
|
|
|
|
</ul>
|