Skip to content

Commit

Permalink
Merge pull request #7018 from RocketChat/rocketchat-importer
Browse files Browse the repository at this point in the history
converted rocketchat-importer
  • Loading branch information
rodrigok authored May 31, 2017
2 parents 323c7b4 + fcc13c5 commit df71c2b
Show file tree
Hide file tree
Showing 39 changed files with 780 additions and 611 deletions.
24 changes: 0 additions & 24 deletions packages/rocketchat-importer/client/admin/adminImport.coffee

This file was deleted.

33 changes: 33 additions & 0 deletions packages/rocketchat-importer/client/admin/adminImport.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* globals Importer */
Template.adminImport.helpers({
isAdmin() {
return RocketChat.authz.hasRole(Meteor.userId(), 'admin');
},
isImporters() {
return Object.keys(Importer.Importers).length > 0;
},
getDescription(importer) {
return TAPi18n.__('Importer_From_Description', { from: importer.name });
},
importers() {
const importers = [];
_.each(Importer.Importers, function(importer, key) {
importer.key = key;
return importers.push(importer);
});
return importers;
}
});

Template.adminImport.events({
'click .start-import'() {
const importer = this;
return Meteor.call('setupImporter', importer.key, function(error) {
if (error) {
console.log(t('importer_setup_error'), importer.key, error);
return handleError(error);
}
return FlowRouter.go(`/admin/import/prepare/${ importer.key }`);
});
}
});
152 changes: 0 additions & 152 deletions packages/rocketchat-importer/client/admin/adminImportPrepare.coffee

This file was deleted.

Loading

0 comments on commit df71c2b

Please sign in to comment.