mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-06 15:10:44 -04:00
Create permanent owner_id column in the item table, and use a soft
relationship to bind the two. To do this, I overrode __get in Item_Model so that $item->owner returns the appropriate User_Model.
This commit is contained in:
@@ -2,21 +2,23 @@
|
||||
<table class="gMetadata">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Title:</th>
|
||||
<th><?= _("Title:") ?></th>
|
||||
<td><?= $item->title; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description:</th>
|
||||
<th><?= _("Description:") ?></th>
|
||||
<td><?= $item->description; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name:</th>
|
||||
<th><?= _("Name:") ?></th>
|
||||
<td><?= $item->name; ?></td>
|
||||
</tr>
|
||||
<? if ($item->owner): ?>
|
||||
<tr>
|
||||
<th>Owner:</th>
|
||||
<td><a href="#"><?= isset($item->user_id) ? $item->user->name : "anonymous"?></a></td>
|
||||
<th><?= _("Owner:") ?></th>
|
||||
<td><a href="#"><?= $item->owner->name ?></a></td>
|
||||
</tr>
|
||||
<? endif ?>
|
||||
<tr>
|
||||
<td colspan="2" class="toggle">
|
||||
<a href="#">more \/</a>
|
||||
|
||||
Reference in New Issue
Block a user