some ui improvements
This commit is contained in:
parent
902c18b52c
commit
4f96d670b9
3 changed files with 6 additions and 9 deletions
|
|
@ -215,7 +215,7 @@ sub prepareView {
|
|||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
if ($self->{_viewVars}{showAdmin}) {
|
||||
if ($self->{_viewVars}{showAdmin} && (($self->canEditIfLocked && $self->session->scratch->get("versionTag") eq $self->get("tagId")) || !$self->isLocked)) {
|
||||
# under normal circumstances we don't put HTML stuff in our code, but this will make it much easier
|
||||
# for end users to work with our templates
|
||||
$self->{_viewVars}{"dragger.icon"} = $self->session->icon->drag();
|
||||
|
|
|
|||
|
|
@ -243,8 +243,11 @@ sub www_manageRevisions {
|
|||
left join assetVersionTag on assetData.tagId=assetVersionTag.tagId left join users on assetData.revisedBy=users.userId
|
||||
where assetData.assetId=".$self->session->db->quote($self->getId));
|
||||
while (my ($date,$by,$tag,$tagId) = $sth->array) {
|
||||
$output .= '<tr><td>'.$self->session->icon->delete("func=purgeRevision;revisionDate=".$date,$self->get("url"),$i18n->get("purge revision prompt")).'</td>
|
||||
<td><a href="'.$self->getUrl("func=viewRevision;revisionDate=".$date).'">'.$self->session->datetime->epochToHuman($date).'</a></td>
|
||||
$output .= '<tr><td>'
|
||||
.$self->session->icon->delete("func=purgeRevision;revisionDate=".$date,$self->get("url"),$i18n->get("purge revision prompt"))
|
||||
.$self->session->icon->view("func=viewRevision;revisionDate=".$date)
|
||||
.'</td>
|
||||
<td>'.$self->session->datetime->epochToHuman($date).'</td>
|
||||
<td>'.$by.'</td>
|
||||
<td><a href="'.$self->getUrl("op=manageRevisionsInTag;tagId=".$tagId).'">'.$tag.'</a></td>
|
||||
</tr>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue