diff options
author | Aaron Parecki <aaron@parecki.com> | 2018-07-20 17:59:18 -0500 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2018-07-20 17:59:18 -0500 |
commit | b749bc6c124a02a6949dc67ea703d880e1acd2ac (patch) | |
tree | e6695ac1a3a2cb59977d77434179908295e93029 /views/layout.php | |
parent | 33796f7bd5def85a5753cc3b4430769379b60475 (diff) |
disable post type buttons if the server doesn't support them
Diffstat (limited to 'views/layout.php')
-rw-r--r-- | views/layout.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/views/layout.php b/views/layout.php index 0850537..450d982 100644 --- a/views/layout.php +++ b/views/layout.php @@ -77,10 +77,18 @@ <ul class="nav navbar-nav"> <?php if(session('me')) { ?> - <li><a href="/editor">📄 Editor</a></li> - <li><a href="/new">✏️ Note</a></li> - <li><a href="/bookmark">🔖 Bookmark</a></li> - <li><a href="/favorite">👍 Favorite</a></li> + <?php if(supports_post_type($this->user, 'article')): ?> + <li><a href="/editor">📄 Editor</a></li> + <?php endif; ?> + <?php if(supports_post_type($this->user, 'note')): ?> + <li><a href="/new">✏️ Note</a></li> + <?php endif; ?> + <?php if(supports_post_type($this->user, 'bookmark')): ?> + <li><a href="/bookmark">🔖 Bookmark</a></li> + <?php endif; ?> + <?php if(supports_post_type($this->user, 'like')): ?> + <li><a href="/favorite">👍 Favorite</a></li> + <?php endif; ?> <?php } ?> <li><a href="/docs">Docs</a></li> |