PhotoPage: move edit button from old admin bar to widget
This commit is contained in:
parent
277611e0ac
commit
c6902150f0
@ -27,10 +27,6 @@ class ViewPhoto extends HTMLController
|
|||||||
$this->handleConfirmDelete($user, $author, $photo);
|
$this->handleConfirmDelete($user, $author, $photo);
|
||||||
else
|
else
|
||||||
$this->handleViewPhoto($user, $author, $photo);
|
$this->handleViewPhoto($user, $author, $photo);
|
||||||
|
|
||||||
// Add an edit button to the admin bar.
|
|
||||||
if ($user->isAdmin())
|
|
||||||
$this->admin_bar->appendItem(BASEURL . '/editasset/?id=' . $photo->getId(), 'Edit this photo');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handleConfirmDelete(User $user, User $author, Asset $photo)
|
private function handleConfirmDelete(User $user, User $author, Asset $photo)
|
||||||
|
@ -250,7 +250,8 @@ class PhotoPage extends Template
|
|||||||
echo '
|
echo '
|
||||||
<div id="user_actions_box" class="content-box">
|
<div id="user_actions_box" class="content-box">
|
||||||
<h3>Actions</h3>
|
<h3>Actions</h3>
|
||||||
<a class="btn btn-danger" href="', BASEURL, '/', $this->photo->getSlug(), '?confirm_delete">Delete</a>
|
<a class="btn btn-primary" href="', BASEURL, '/editasset/?id=', $this->photo->getId(), '?confirm_delete">Edit photo</a>
|
||||||
|
<a class="btn btn-danger" href="', BASEURL, '/', $this->photo->getSlug(), '?confirm_delete">Delete photo</a>
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user