diff options
Diffstat (limited to 'src/application/views/view_topic_start.php')
-rw-r--r-- | src/application/views/view_topic_start.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/application/views/view_topic_start.php b/src/application/views/view_topic_start.php index 37e8cf8..fc54623 100644 --- a/src/application/views/view_topic_start.php +++ b/src/application/views/view_topic_start.php @@ -32,6 +32,32 @@ $canDelete = ($GLOBALS["currentUser"]?->id === $topicAuthor->id && $topicAuthor- </form> </div> <?php endif; ?> +<?php if ($GLOBALS["currentUser"] === null): ?> + <div class="modal fade" tabindex="-1" role="dialog" id="diag-cant-view-attachment"> + <div class="modal-dialog modal-danger" role="document"> + <div class="modal-content panel-danger"> + <div class="modal-header panel-heading"> + <h4 class="modal-title"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> Permission denied</h4> + </div> + <div class="modal-body"> + You must be logged in to view attachments + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Close</button> + <a href="?_action=auth&next=<?= htmlentities(urlencode($_SERVER["REQUEST_URI"])) ?>" class="btn btn-success"><span class="glyphicon glyphicon-user" aria-hidden="true"></span> Log in</a> + </div> + </div> + </div> + </div> + <script> + $(function() { + $(".attachment").click(function(e) { + e.preventDefault(); + $("#diag-cant-view-attachment").modal(); + }); + }); + </script> +<?php endif; ?> <div class="page-header margin-top-0 clearfix"> <div id="displayHeading"> |