|
@@ -15,7 +15,7 @@
|
|
|
## limitations under the License.
|
|
## limitations under the License.
|
|
|
|
|
|
|
|
<%!
|
|
<%!
|
|
|
- from desktop.views import commonheader, commonfooter, commonshare
|
|
|
|
|
|
|
+ from desktop.views import commonheader, commonfooter, commonshare, commonimportexport
|
|
|
from django.utils.translation import ugettext as _
|
|
from django.utils.translation import ugettext as _
|
|
|
%>
|
|
%>
|
|
|
<%namespace name="actionbar" file="../actionbar.mako" />
|
|
<%namespace name="actionbar" file="../actionbar.mako" />
|
|
@@ -58,11 +58,18 @@ ${ layout.menubar(section='coordinators', is_editor=True) }
|
|
|
<i class="fa fa-times"></i> ${ _('Delete') }
|
|
<i class="fa fa-times"></i> ${ _('Delete') }
|
|
|
</a>
|
|
</a>
|
|
|
|
|
|
|
|
|
|
+ <a data-bind="click: function() { atLeastOneSelected() ? exportDocuments() : void(0) }, css: {'btn': true, 'disabled': ! atLeastOneSelected() }">
|
|
|
|
|
+ <i class="fa fa-download"></i> ${ _('Export') }
|
|
|
|
|
+ </a>
|
|
|
</div>
|
|
</div>
|
|
|
</%def>
|
|
</%def>
|
|
|
|
|
|
|
|
<%def name="creation()">
|
|
<%def name="creation()">
|
|
|
<a href="${ url('oozie:new_coordinator') }" class="btn"><i class="fa fa-plus-circle"></i> ${ _('Create') }</a>
|
|
<a href="${ url('oozie:new_coordinator') }" class="btn"><i class="fa fa-plus-circle"></i> ${ _('Create') }</a>
|
|
|
|
|
+
|
|
|
|
|
+ <a data-bind="click: function() { $('#import-documents').modal('show'); }" class="btn">
|
|
|
|
|
+ <i class="fa fa-upload"></i> ${ _('Import') }
|
|
|
|
|
+ </a>
|
|
|
</%def>
|
|
</%def>
|
|
|
</%actionbar:render>
|
|
</%actionbar:render>
|
|
|
|
|
|
|
@@ -129,6 +136,7 @@ ${ layout.menubar(section='coordinators', is_editor=True) }
|
|
|
|
|
|
|
|
|
|
|
|
|
${ commonshare() | n,unicode }
|
|
${ commonshare() | n,unicode }
|
|
|
|
|
+${ commonimportexport(request) | n,unicode }
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="${ static('desktop/ext/js/datatables-paging-0.1.js') }" type="text/javascript" charset="utf-8"></script>
|
|
<script src="${ static('desktop/ext/js/datatables-paging-0.1.js') }" type="text/javascript" charset="utf-8"></script>
|
|
@@ -210,6 +218,11 @@ ${ commonshare() | n,unicode }
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ self.exportDocuments = function() {
|
|
|
|
|
+ $('#export-documents').find('input[name=\'documents\']').val(ko.mapping.toJSON($.map(viewModel.selectedJobs(), function(doc) { return doc.id(); })));
|
|
|
|
|
+ $('#export-documents').find('form').submit();
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
self.prepareShareModal = function() {
|
|
self.prepareShareModal = function() {
|
|
|
shareViewModel.setDocId(self.selectedJobs()[0].doc1_id());
|
|
shareViewModel.setDocId(self.selectedJobs()[0].doc1_id());
|
|
|
openShareModal();
|
|
openShareModal();
|