1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-21 13:41:37 +00:00

#13: Display the document's creator

This commit is contained in:
jendib
2015-05-09 16:21:59 +02:00
parent fc1bb22d8d
commit 82ba0b5761
5 changed files with 12 additions and 6 deletions

View File

@@ -117,6 +117,7 @@ angular.module('docs').controller('DocumentView', function ($scope, $state, $sta
// Display the new share ACL and add it to the local ACLs
$scope.showShare(acl);
$scope.document.acls.push(acl);
$scope.document.acls = angular.copy($scope.document.acls);
})
});
};

View File

@@ -6,7 +6,9 @@
angular.module('docs').controller('Login', function($scope, $rootScope, $state, $dialog, User) {
$scope.login = function() {
User.login($scope.user).then(function() {
$rootScope.userInfo = User.userInfo(true);
User.userInfo(true).then(function(data) {
$rootScope.userInfo = data;
});
$state.transitionTo('document.default');
}, function() {
var title = 'Login failed';

View File

@@ -10,7 +10,7 @@
<div class="page-header">
<h1>
{{ document.title }} <small>{{ document.create_date | date: 'yyyy-MM-dd' }}</small>
{{ document.title }} <small>{{ document.create_date | date: 'yyyy-MM-dd' }} by {{ document.creator }}</small>
<img ng-if="document" ng-src="img/flag/{{ document.language }}.png" title="{{ document.language }}" />
<a ng-href="../api/file/zip?id={{ document.id }}" class="btn btn-default" title="Download all files">
<span class="glyphicon glyphicon-download-alt"></span>
@@ -92,7 +92,7 @@
<td>
<span class="label label-default" style="margin-right: 6px;" ng-repeat="a in acl | orderBy: 'perm'">
{{ a.perm }}
<span ng-show="document.creator != a.id && document.writable"
<span ng-show="document.creator != a.name && a.type == 'USER' && document.writable"
class="glyphicon glyphicon-remove pointer"
ng-click="deleteAcl(a)"></span>
</span>