diff options
author | Wu Cheng-Han | 2016-12-15 14:07:12 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-12-15 14:11:23 +0800 |
commit | 5c7eb483198d0d92dc88c7a7c25cca5c23eb5cf2 (patch) | |
tree | d848b413c53294bc0e2c3d970e1d9ee54ea50c2d /public | |
parent | cf8bae32d162874e4cf4dbd929cc3b9a0383631c (diff) |
Add support of allow anonymous config option with correspond modifications
Diffstat (limited to 'public')
-rw-r--r-- | public/views/body.ejs | 2 | ||||
-rw-r--r-- | public/views/index.ejs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/public/views/body.ejs b/public/views/body.ejs index 79f2544e..5de51f3f 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -15,7 +15,7 @@ <a id="permissionLabel" class="ui-permission-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> </a> <ul class="dropdown-menu" aria-labelledby="permissionLabel"> - <li class="ui-permission-freely"><a><i class="fa fa-leaf fa-fw"></i> Freely - Anyone can edit</a></li> + <li class="ui-permission-freely"<% if(!allowAnonmyous) { %> style="display: none;"<% } %>><a><i class="fa fa-leaf fa-fw"></i> Freely - Anyone can edit</a></li> <li class="ui-permission-editable"><a><i class="fa fa-shield fa-fw"></i> Editable - Signed people can edit</a></li> <li class="ui-permission-locked"><a><i class="fa fa-lock fa-fw"></i> Locked - Only owner can edit</a></li> <li class="ui-permission-private"><a><i class="fa fa-hand-stop-o fa-fw"></i> Private - Only owner can view & edit</a></li> diff --git a/public/views/index.ejs b/public/views/index.ejs index 2bec7de0..8910d83d 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -62,13 +62,17 @@ <br> <a type="button" class="btn btn-lg btn-success ui-signin" data-toggle="modal" data-target=".signin-modal" style="min-width: 170px;"><%= __('Sign In') %></a> </span> + <% }%> + <% if((facebook || twitter || github || gitlab || dropbox || google || email) && allowAnonmyous) { %> <span class="ui-or"><%= __('or') %></span> <% }%> + <% if(allowAnonmyous) { %> <span class="ui-signin"> <a href="<%- url %>/new" class="btn btn-lg btn-default" style="min-width: 170px;"><%= __('New guest note') %></a> <br> <br> </span> + <% }%> <div class="lead row" style="width: 90%; margin: 0 auto;"> <div class="col-md-4 inner"> <a href="<%- url %>/features#share-notes"> |