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:
@@ -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);
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user