mirror of
https://github.com/sismics/docs.git
synced 2025-12-21 13:41:37 +00:00
Closes #44: Comments visible from share app
+ metadata-complete="true" in web.xml to skip annotations scanning (second try with Jetty 9)
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
version="3.0"
|
||||
metadata-complete="true">
|
||||
<display-name>Docs</display-name>
|
||||
|
||||
<!-- This filter is used to process a couple things in the request context -->
|
||||
@@ -55,4 +56,6 @@
|
||||
<servlet-name>JerseyServlet</servlet-name>
|
||||
<url-pattern>/api/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<absolute-ordering/>
|
||||
</web-app>
|
||||
|
||||
@@ -20,6 +20,13 @@ angular.module('share').controller('Share', function($scope, $state, $stateParam
|
||||
$scope.files = data.files;
|
||||
});
|
||||
|
||||
// Load comments from server
|
||||
Restangular.one('comment', $stateParams.documentId).get({ share: $stateParams.shareId }).then(function(data) {
|
||||
$scope.comments = data.comments;
|
||||
}, function(response) {
|
||||
$scope.commentsError = response;
|
||||
});
|
||||
|
||||
/**
|
||||
* Navigate to the selected file.
|
||||
*/
|
||||
|
||||
@@ -74,9 +74,7 @@
|
||||
|
||||
<div ng-repeat="comment in comments" class="media" style="overflow: hidden">
|
||||
<div class="pull-left">
|
||||
<a href="#">
|
||||
<img ng-src="http://www.gravatar.com/avatar/{{ comment.creator_gravatar }}?s=40&d=identicon" class="media-object" />
|
||||
</a>
|
||||
<img ng-src="http://www.gravatar.com/avatar/{{ comment.creator_gravatar }}?s=40&d=identicon" class="media-object" />
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<strong>{{ comment.creator }}</strong>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="row">
|
||||
<div class="well col-md-12">
|
||||
<div class="col-md-10">
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
{{ document.title }} <small>{{ document.create_date | date: 'yyyy-MM-dd' }}</small>
|
||||
@@ -26,4 +26,31 @@
|
||||
|
||||
<div ui-view="file"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<p class="page-header">
|
||||
<span class="glyphicon glyphicon-comment"></span>
|
||||
Comments
|
||||
</p>
|
||||
|
||||
<div ng-show="!comments || comments.length == 0" class="text-center text-muted">
|
||||
<h1 class="glyphicon glyphicon-comment"></h1>
|
||||
<p ng-show="!comments && !commentsError">Loading...</p>
|
||||
<p ng-show="comments.length == 0">No comments on this document yet</p>
|
||||
<p ng-show="!comments && commentsError">Error loading comments</p>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="comment in comments" class="media" style="overflow: hidden">
|
||||
<div class="pull-left">
|
||||
<img ng-src="http://www.gravatar.com/avatar/{{ comment.creator_gravatar }}?s=40&d=identicon" class="media-object" />
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<strong>{{ comment.creator }}</strong>
|
||||
<p>
|
||||
{{ comment.content }}<br />
|
||||
<span class="text-muted">{{ comment.create_date | date: 'yyyy-MM-dd' }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user