mirror of
https://github.com/danpros/htmly.git
synced 2026-04-21 13:06:22 +05:30
Improve the editor
This commit is contained in:
parent
4138142368
commit
ce4d6e4b93
20 changed files with 146 additions and 917 deletions
|
|
@ -1029,10 +1029,10 @@ function tab($p)
|
|||
$role = user('role', $user);
|
||||
if (isset($p->author)) {
|
||||
if ($user === $p->author || $role === 'admin') {
|
||||
echo '<div class="tab" style="margin-bottom:30px;"><ul class="nav nav-tabs"><li role="presentation" class="active"><a href="' . $p->url . '">View</a></li><li><a href="' . $p->url . '/edit?destination=post">Edit</a></li></ul></div>';
|
||||
echo '<div class="tab"><ul class="nav nav-tabs"><li role="presentation" class="active"><a href="' . $p->url . '">View</a></li><li><a href="' . $p->url . '/edit?destination=post">Edit</a></li></ul></div>';
|
||||
}
|
||||
} else {
|
||||
echo '<div class="tab" style="margin-bottom:30px;><ul class="nav nav-tabs"><li role="presentation" class="active"><a href="' . $p->url . '">View</a><a href="' . $p->url . '/edit?destination=post">Edit</a></li></ul></div>';
|
||||
echo '<div class="tab"><ul class="nav nav-tabs"><li role="presentation" class="active"><a href="' . $p->url . '">View</a><a href="' . $p->url . '/edit?destination=post">Edit</a></li></ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue