mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-30 06:45:47 -04:00
feat: option to disable note creation
The abuse of the demo instance required us to disallow note creation Signed-off-by: Erik Michelson <github@erik.michelson.eu> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
c85b11463d
commit
858d7bf5d1
9 changed files with 20 additions and 2 deletions
|
@ -22,8 +22,10 @@
|
|||
<i class="fa fa-caret-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu list" role="menu" aria-labelledby="menu">
|
||||
<% if (!disableNoteCreation) { %>
|
||||
<li role="presentation"><a role="menuitem" class="ui-new" tabindex="-1" href="<%- serverURL %>/new" target="_blank" rel="noopener"><i class="fa fa-plus fa-fw"></i> <%= __('New') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li role="presentation"><a role="menuitem" class="ui-publish" tabindex="-1" href="#" target="_blank" rel="noopener"><i class="fa fa-share-square-o fa-fw"></i> <%= __('Publish') %></a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
|
@ -112,11 +114,13 @@
|
|||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right" style="padding:0;">
|
||||
<% if (!disableNoteCreation) { %>
|
||||
<li>
|
||||
<a href="<%- serverURL %>/new" target="_blank" rel="noopener" class="ui-new">
|
||||
<i class="fa fa-plus"></i> <%= __('New') %>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li>
|
||||
<a href="#" target="_blank" rel="noopener" class="ui-publish">
|
||||
<i class="fa fa-share-square-o"></i> <%= __('Publish') %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<li class="ui-history<% if(signin) { %> active<% } %>"><a href="#"><%= __('History') %></a>
|
||||
</li>
|
||||
<div class="ui-signin" style="float: right; margin-top: 8px;<% if(signin) { %> display: none;<% } %>">
|
||||
<% if (allowAnonymous) { %>
|
||||
<% if (allowAnonymous && !disableNoteCreation) { %>
|
||||
<a type="button" href="<%- serverURL %>/new" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> <%= __('New guest note') %></a>
|
||||
<% } %>
|
||||
<% if (authProviders.facebook || authProviders.twitter || authProviders.github || authProviders.gitlab || authProviders.mattermost || authProviders.dropbox || authProviders.google || authProviders.ldap || authProviders.saml || authProviders.oauth2 || authProviders.email) { %>
|
||||
|
@ -20,7 +20,9 @@
|
|||
<% } %>
|
||||
</div>
|
||||
<div class="ui-signout" style="float: right; margin-top: 8px;<% if(!signin) { %> display: none;<% } %>">
|
||||
<% if (!disableNoteCreation) { %>
|
||||
<a type="button" href="<%- serverURL %>/new" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> <%= __('New note') %></a>
|
||||
<% } %>
|
||||
<span class="ui-profile dropdown pull-right">
|
||||
<button id="profileLabel" class="btn btn-sm btn-link ui-profile-label" style="padding-right: 0;" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="ui-avatar" width="20" height="20"><span class="hidden-xs hidden-sm"> <span class="ui-name"></span></span> <i class="fa fa-caret-down"></i>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue