Commit 1a69eaa6 authored by BigBlueHat's avatar BigBlueHat

Prevent annotation attempts when not signed in

Simply hides the annotation form--which implied you could
use the thing...--and instead tells the user to sign in,
so they can do what they came to do.
parent c464e564
<header class="annotation-header"> <header class="annotation-header" ng-if="!vm.annotation.user">
<strong>You must be signed in to create annotations.</strong>
</header>
<div ng-if="vm.annotation.user">
<header class="annotation-header">
<!-- Deletion notice --> <!-- Deletion notice -->
<span ng-if="!vm.editing && vm.annotation.deleted">Annotation deleted.</span> <span ng-if="!vm.editing && vm.annotation.deleted">Annotation deleted.</span>
...@@ -35,7 +40,6 @@ ...@@ -35,7 +40,6 @@
<!-- / Editing controls --> <!-- / Editing controls -->
</span> </span>
<span ng-if="!vm.annotation.user">Sign in to save this annotation.</span>
<span class="annotation-collapsed-replies"> <span class="annotation-collapsed-replies">
<a class="reply-count small" href="" <a class="reply-count small" href=""
...@@ -51,10 +55,10 @@ ...@@ -51,10 +55,10 @@
ng-if="!vm.editing && vm.annotation.updated" ng-if="!vm.editing && vm.annotation.updated"
ng-href="{{vm.baseURI}}a/{{vm.annotation.id}}" ng-href="{{vm.baseURI}}a/{{vm.annotation.id}}"
>{{vm.timestamp}}</a> >{{vm.timestamp}}</a>
</header> </header>
<!-- Excerpts --> <!-- Excerpts -->
<section class="annotation-section" <section class="annotation-section"
ng-repeat="target in vm.annotation.target track by $index"> ng-repeat="target in vm.annotation.target track by $index">
<blockquote class="annotation-quote" <blockquote class="annotation-quote"
ng-hide="target.diffHTML && vm.showDiff" ng-hide="target.diffHTML && vm.showDiff"
...@@ -71,21 +75,21 @@ ...@@ -71,21 +75,21 @@
ng-model="vm.showDiff" ng-model="vm.showDiff"
ng-click="$event.stopPropagation()"> Show differences</input> ng-click="$event.stopPropagation()"> Show differences</input>
</div> </div>
</section> </section>
<!-- / Excerpts -- > <!-- / Excerpts -- >
<!-- Body --> <!-- Body -->
<section name="text" <section name="text"
class="annotation-body" class="annotation-body"
ng-model="vm.annotation.text" ng-model="vm.annotation.text"
ng-readonly="!vm.editing" ng-readonly="!vm.editing"
markdown> markdown>
</section> </section>
<!-- / Body --> <!-- / Body -->
<!-- Tags --> <!-- Tags -->
<div class="annotation-body form-field" ng-if="vm.editing"> <div class="annotation-body form-field" ng-if="vm.editing">
<tags-input ng-model="vm.annotation.tags" <tags-input ng-model="vm.annotation.tags"
name="tags" name="tags"
class="tags" class="tags"
...@@ -97,19 +101,19 @@ ...@@ -97,19 +101,19 @@
min-length="1" min-length="1"
max-results-to-show="10"></auto-complete> max-results-to-show="10"></auto-complete>
</tags-input> </tags-input>
</div> </div>
<div class="annotation-section tags tags-read-only" <div class="annotation-section tags tags-read-only"
ng-if="vm.annotation.tags.length && !vm.editing"> ng-if="vm.annotation.tags.length && !vm.editing">
<ul class="tag-list"> <ul class="tag-list">
<li class="tag-item" ng-repeat="tag in vm.annotation.tags"> <li class="tag-item" ng-repeat="tag in vm.annotation.tags">
<a href="/stream?q=tag:'{{tag.text|urlencode}}'" target="_blank">{{tag.text}}</a> <a href="/stream?q=tag:'{{tag.text|urlencode}}'" target="_blank">{{tag.text}}</a>
</li> </li>
</ul> </ul>
</div> </div>
<!-- / Tags --> <!-- / Tags -->
<footer class="annotation-footer"> <footer class="annotation-footer">
<div class="small" ng-if="vm.editing"> <div class="small" ng-if="vm.editing">
<p ng-show="vm.privacyLevel.text == 'Only Me'"> <p ng-show="vm.privacyLevel.text == 'Only Me'">
<i class="h-icon-lock"></i> This annotation is visible only to you.</p> <i class="h-icon-lock"></i> This annotation is visible only to you.</p>
...@@ -175,4 +179,5 @@ ...@@ -175,4 +179,5 @@
ng-click="vm.delete()" ng-click="vm.delete()"
><i class="h-icon-delete btn-icon"></i> Delete…</button> ><i class="h-icon-delete btn-icon"></i> Delete…</button>
</div> </div>
</footer> </footer>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment