<!-- bucket info header -->
<div class="row">
<div class="col-md-6">
- [% INCLUDE 'staff/cat/bucket/copy/t_bucket_info.tt2' %]
+ [% INCLUDE 'staff/cat/bucket/share/t_bucket_info.tt2' %]
</div>
</div>
+++ /dev/null
-<!-- edit bucket dialog -->
-<form class="form-validated" novalidate ng-submit="ok(args)" name="form">
- <div>
- <div class="modal-header">
- <button type="button" class="close"
- ng-click="cancel()" aria-hidden="true">×</button>
- <h4 class="modal-title">[% l('Edit Bucket') %]</h4>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <label for="edit-bucket-name">[% l('Name') %]</label>
- <input type="text" class="form-control" focus-me='focusMe' required
- id="edit-bucket-name" ng-model="args.name" placeholder="[% l('Name...') %]"/>
- </div>
- <div class="form-group">
- <label for="edit-bucket-desc">[% l('Description') %]</label>
- <input type="text" class="form-control" id="edit-bucket-desc"
- ng-model="args.desc" placeholder="[% l('Description...') %]"/>
- </div>
- <div class="checkbox">
- <label>
- <input ng-model="args.pub" type="checkbox">
- [% l('Publicly Visible?') %]
- </label>
- </div>
- </div>
- <div class="modal-footer">
- <input type="submit" class="btn btn-primary"
- ng-disabled="form.$invalid" value="[% l('Apply Changes') %]"/>
- <button class="btn btn-warning" ng-click="cancel()"
- ng-class="{disabled : actionPending}">[% l('Cancel') %]</button>
- </div>
- </div> <!-- modal-content -->
-</form>
+++ /dev/null
-
-<div ng-show="bucket()">
- <strong>[% l('Bucket: {{bucket().name()}}') %]</strong>
- <span>
- <ng-pluralize count="bucketSvc.currentBucket.items().length"
- when="{'one': '[% l("1 item") %]', 'other': '[% l("{} items") %]'}">
- </ng-pluralize>
- </span>
- <span> / [% l('Created {{bucket().create_time() | date}}') %]</span>
- <span ng-show="bucket().description()"> / {{bucket().description()}}</span>
-</div>
-
-<div ng-show="!bucket()">
- <strong>[% l('No Bucket Selected') %]</strong>
-</div>
-
<!-- bucket info header -->
<div class="row">
<div class="col-md-6">
- [% INCLUDE 'staff/cat/bucket/record/t_bucket_info.tt2' %]
+ [% INCLUDE 'staff/cat/bucket/share/t_bucket_info.tt2' %]
</div>
</div>
+++ /dev/null
-<!-- edit bucket dialog -->
-
-<!-- use <form> so we get submit-on-enter for free -->
-<form class="form-validated" novalidate name="form" ng-submit="ok(args)">
- <div>
- <div class="modal-header">
- <button type="button" class="close"
- ng-click="cancel()" aria-hidden="true">×</button>
- <h4 class="modal-title">[% l('Create Bucket') %]</h4>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <label for="edit-bucket-name">[% l('Name') %]</label>
- <input type="text" class="form-control" focus-me='focusMe' required
- id="edit-bucket-name" ng-model="args.name" placeholder="[% l('Name...') %]"/>
- </div>
- <div class="form-group">
- <label for="edit-bucket-desc">[% l('Description') %]</label>
- <input type="text" class="form-control" id="edit-bucket-desc"
- ng-model="args.desc" placeholder="[% l('Description...') %]"/>
- </div>
- <div class="checkbox">
- <label>
- <input ng-model="args.pub" type="checkbox"/>
- [% l('Publicly Visible?') %]
- </label>
- </div>
- </div>
- <div class="modal-footer">
- <input type="submit" ng-disabled="form.$invalid"
- class="btn btn-primary" value="[% l('Create Bucket') %]"/>
- <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
- </div>
- </div> <!-- modal-content -->
-</form>
+++ /dev/null
-<div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close"
- ng-click="cancel()" aria-hidden="true">×</button>
- <h4 class="modal-title">[% l('Confirm Bucket Delete') %]</h4>
- </div>
- <div class="modal-body">
- <p>[% l('Delete bucket {{bucket().name()}}?') %]</p>
- </div>
- <div class="modal-footer">
- <button class="btn btn-primary" ng-click="ok()">[% l('Delete Bucket') %]</button>
- <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
- </div>
- </div> <!-- modal-content -->
-</div> <!-- modal-dialog -->
+++ /dev/null
-<div class="btn-group text-left" uib-dropdown>
- <button type="button" class="btn btn-default" uib-dropdown-toggle>
- [% l('Buckets') %]<span class="caret"></span>
- </button>
- <ul uib-dropdown-menu>
- <li>
- <a href='' ng-click="openCreateBucketDialog()">[% l('New Bucket') %]</a>
- </li>
- <li ng-class="{disabled : !bucket()}">
- <a href='' ng-click="openEditBucketDialog()">[% l('Edit Bucket') %]</a>
- </li>
- <li ng-class="{disabled : !bucket()}">
- <a href='' ng-click="openDeleteBucketDialog()">[% l('Delete Bucket') %]</a>
- </li>
- <li>
- <a href='' ng-click="openSharedBucketDialog()">[% l('Load Shared Bucket') %]</a>
- </li>
- <li role="presentation" class="divider"></li>
-
- <!-- list all of this user's buckets -->
- <li ng-repeat="bkt in bucketSvc.allBuckets"
- ng-class="{disabled : bkt.id() == bucket().id()}">
- <a href='' ng-click="loadBucket(bkt.id())">{{bkt.name()}}</a>
- </li>
- </ul>
-</div>
-
</div>
<div class="checkbox">
<label>
- <input ng-model="args.pub" type="checkbox"/>
+ <input ng-model="args.pub" type="checkbox"/>
[% l('Publicly Visible?') %]
</label>
</div>
</div>
<div class="checkbox">
<label>
- <input ng-model="args.pub" type="checkbox">
+ <input ng-model="args.pub" type="checkbox">
[% l('Publicly Visible?') %]
</label>
</div>
<div ng-show="bucket()">
- <strong>[% l('Bucket: {{bucket().name()}}') %]</strong>
+ <strong>[% l('Bucket #{{bucket().id()}}: {{bucket().name()}}') %]</strong>
<span>
<ng-pluralize count="bucketSvc.currentBucket.items().length"
when="{'one': '[% l("1 item") %]', 'other': '[% l("{} items") %]'}">
</ng-pluralize>
- </span>
+ </span>
<span> / [% l('Created {{bucket().create_time() | date}}') %]</span>
+ <span ng-show="bucket()._owner_name"> / {{bucket()._owner_name}} @ {{bucket()._owner_ou}}</span>
<span ng-show="bucket().description()"> / {{bucket().description()}}</span>
</div>
deferred.reject(evt);
return;
}
+ egCore.pcrud.retrieve(
+ 'au', bucket.owner()
+ ).then(function(patron) {
+ bucket._owner_name = patron.usrname();
+ bucket._owner_ou = egCore.org.get(patron.home_ou()).shortname();
+ });
+
service.currentBucket = bucket;
deferred.resolve(bucket);
});
$scope.openCreateBucketDialog = function() {
$uibModal.open({
- templateUrl: './cat/bucket/copy/t_bucket_create',
+ templateUrl: './cat/bucket/share/t_bucket_create',
controller:
['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.openEditBucketDialog = function() {
$uibModal.open({
- templateUrl: './cat/bucket/copy/t_bucket_edit',
+ templateUrl: './cat/bucket/share/t_bucket_edit',
controller:
['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
// bucket if the user confirms.
$scope.openDeleteBucketDialog = function() {
$uibModal.open({
- templateUrl: './cat/bucket/copy/t_bucket_delete',
+ templateUrl: './cat/bucket/share/t_bucket_delete',
controller :
['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.bucket = function() { return bucketSvc.currentBucket }
// retrieves the requested bucket by ID
$scope.openSharedBucketDialog = function() {
$uibModal.open({
- templateUrl: './cat/bucket/copy/t_load_shared',
+ templateUrl: './cat/bucket/share/t_load_shared',
controller :
['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
deferred.reject(evt);
return;
}
+ egCore.pcrud.retrieve(
+ 'au', bucket.owner()
+ ).then(function(patron) {
+ bucket._owner_name = patron.usrname();
+ bucket._owner_ou = egCore.org.get(patron.home_ou()).shortname();
+ });
service.currentBucket = bucket;
deferred.resolve(bucket);
});
$scope.openCreateBucketDialog = function() {
$uibModal.open({
- templateUrl: './cat/bucket/record/t_bucket_create',
+ templateUrl: './cat/bucket/share/t_bucket_create',
controller:
['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.openEditBucketDialog = function() {
$uibModal.open({
- templateUrl: './cat/bucket/record/t_bucket_edit',
+ templateUrl: './cat/bucket/share/t_bucket_edit',
controller:
['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
// bucket if the user confirms.
$scope.openDeleteBucketDialog = function() {
$uibModal.open({
- templateUrl: './cat/bucket/record/t_bucket_delete',
+ templateUrl: './cat/bucket/share/t_bucket_delete',
controller :
['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.bucket = function() { return bucketSvc.currentBucket }
// retrieves the requested bucket by ID
$scope.openSharedBucketDialog = function() {
$uibModal.open({
- templateUrl: './cat/bucket/record/t_load_shared',
+ templateUrl: './cat/bucket/share/t_load_shared',
controller :
['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;