fix: move paste Edit button around a bit.

This commit is contained in:
Floorb 2023-02-27 05:48:53 -05:00
parent 547e0fb30b
commit c19139ed6e

View file

@ -205,7 +205,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<?php endif; ?>
</div>
<!-- Guests -->
<?php if ($totalpastes !== 0 && ($current_user === null || $current_user->id !== $paste_owner_id)) { ?>
<?php if ($totalpastes !== 0 && !can('edit', $paste)) { ?>
<hr>
<label class="label">More from this Author </label>
<?php foreach ($recommended_pastes as $paste) { ?>
@ -217,7 +217,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<p class="subtitle is-7">by <i><?= pp_html_escape($paste->user->username) ?></i></p>
</header>
<?php } ?>
<?php } else { ?>
<?php } else if (can('edit', $paste)) { ?>
<!-- Paste Panel -->
<hr>
<h1 class="title is-6 mx-1">Edit Paste</h1>
@ -254,6 +254,13 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
onclick="highlight(document.getElementById('code')); return false;"><i
class="fa fa-indent"></i>&nbsp;Highlight</a>
</div>
<div class="level-item">
<?php if (isset($csrf_token)): ?>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" />
<?php endif; ?>
<input class="button is-info" type="submit" name="edit" id="edit"
value="Save Changes" />
</div>
</div>
</nav>
<!-- Text area -->
@ -341,7 +348,6 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
</div>
</nav>
<br>
<nav>
<div class="level-left">
<!-- Encrypted -->
<div class="b-checkbox is-info is-inline">
@ -350,19 +356,9 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<label for="encrypt">
Encrypt on server (always enabled)
</label>
<?php
if (can('edit', $paste)) {
?>
<?php if (isset($csrf_token)): ?>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" />
<?php endif; ?>
<input class="button is-info" type="submit" name="edit" id="edit"
value="Edit"/>
<?php
} ?>
</div>
</div>
<br/>
</nav>
</form>
<?php } ?>