Commit c5e1dec4 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Unifica y limpia catálogo de organizaciones

Integra todas las funcionalidades de catálogo de organizaciones en una
nueva vista, ubicada en el lugar adecuado y con extensión de capacidades
de edición por separado.

Se eliminan ficheros antiguos en desuso.

Se eliminan ficheros placeholder de catálogos ya unificados
anteriormente.

Revisa detalles menores de catálogos unificados anteriormente.
parent 0bad7b0b
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -36,13 +36,12 @@ define([

			this.config = {
				title: this.i18n.activitiesCatalogView,
				ownChannel: "activitiesCatalog",

				reportService: "activity",

				ownChannel: 'activitiesCatalog',
				target: redmicConfig.services.activity,

				browserExts: [_Select]
				browserExts: [_Select],

				reportService: 'activity'
			};

			lang.mixin(this, this.config, args);
@@ -61,9 +60,9 @@ define([
				rowConfig: {
					buttonsConfig: {
						listButton: [{
							icon: "fa-info-circle",
							btnId: "details",
							title: "info",
							icon: 'fa-info-circle',
							btnId: 'details',
							title: 'info',
							href: this.viewPaths.activityDetails
						}]
					}
+32 −20
Original line number Diff line number Diff line
define([
	"app/designs/base/_Main"
	, "app/designs/textSearchFacetsList/Controller"
	, "app/designs/textSearchFacetsList/Layout"
	'app/designs/base/_Main'
	, 'app/designs/textSearchFacetsList/Controller'
	, 'app/designs/textSearchFacetsList/Layout'
	, 'src/redmicConfig'
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "templates/OrganisationList"
	, "src/component/browser/_Select"
	, "src/component/browser/bars/SelectionBox"
	, "src/component/browser/bars/Order"
	, "src/component/browser/bars/Total"
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'templates/OrganisationList'
	, 'src/component/browser/_Select'
	, 'src/component/browser/bars/SelectionBox'
	, 'src/component/browser/bars/Order'
	, 'src/component/browser/bars/Total'
], function(
	_Main
	, Controller
@@ -23,17 +23,19 @@ define([
	, Order
	, Total
) {

	return declare([Layout, Controller, _Main], {
		//	summary:
		//		Extensión para establecer la configuración de las vistas de organisation.
		//	description:
		//
		//		Vista de catálogo de organizaciones.

		constructor: function(args) {

			this.config = {
				browserExts: [_Select],
				title: this.i18n.organisations
				title: this.i18n.organisationCatalogView,
				ownChannel: 'organisationCatalog',
				target: redmicConfig.services.organisation,

				browserExts: [_Select]
			};

			lang.mixin(this, this.config, args);
@@ -47,6 +49,16 @@ define([

			this.browserConfig = this._merge([{
				template: templateList,
				rowConfig: {
					buttonsConfig: {
						listButton: [{
							icon: 'fa-info-circle',
							btnId: 'details',
							title: 'info',
							href: this.viewPaths.organisationDetails
						}]
					}
				},
				bars: [{
					instance: Total
				},{
@@ -57,10 +69,10 @@ define([
				}],
				orderConfig: {
					options: [
						{value: "name"},
						{value: "organisationType.name", label: this.i18n.organisationType},
						{value: "acronym"},
						{value: "updated"}
						{value: 'name'},
						{value: 'organisationType.name', label: this.i18n.organisationType},
						{value: 'acronym'},
						{value: 'updated'}
					]
				}
			}, this.browserConfig || {}]);
+56 −0
Original line number Diff line number Diff line
define([
	'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'dojo/aspect'
	, 'app/base/views/extensions/_EditionWizardView'
], function(
	declare
	, lang
	, aspect
	, _EditionWizardView
) {

	return declare(_EditionWizardView, {
		//	summary:
		//		Extensión de vista de catálogo de organizaciones para añadir funcionalidad relativa a la edición de
		//		registros.

		constructor: function(args) {

			this.config = {
				addPath: this.viewPaths.organisationAdd
			};

			lang.mixin(this, this.config, args);

			aspect.before(this, '_setBrowserButtons', lang.hitch(this, this._setOrganisationEditionBrowserButtons));
		},

		_setOrganisationEditionBrowserButtons: function() {

			if (!this.listButtonsEdition) {
				console.warn('Tried to add organisation edition buttons, but edition buttons config was not found!');
				return;
			}

			var findIndexCallback = lang.hitch(this, function(button) {

				return button.groupId && button.groupId === this._editionGroupId;
			});

			var editionButtonIndex = this.listButtonsEdition.findIndex(findIndexCallback);

			if (editionButtonIndex !== -1) {
				this.listButtonsEdition[editionButtonIndex].icons.push({
					icon: 'fa-edit',
					btnId: 'edit',
					title: 'edit',
					option: 'default',
					href: this.viewPaths.organisationEdit
				});
			} else {
				console.warn('Tried to add organisation edition buttons, but edition button group config was not found!');
			}
		}
	});
});
+23 −22
Original line number Diff line number Diff line
define([
	"app/designs/base/_Main"
	, "app/designs/textSearchFacetsList/Controller"
	, "app/designs/textSearchFacetsList/Layout"
	'app/designs/base/_Main'
	, 'app/designs/textSearchFacetsList/Controller'
	, 'app/designs/textSearchFacetsList/Layout'
	, 'src/redmicConfig'
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "templates/ProgramList"
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'templates/ProgramList'
	, 'src/catalog/_GenerateReport'
	, "src/component/browser/_Select"
	, "src/component/browser/bars/SelectionBox"
	, "src/component/browser/bars/Order"
	, "src/component/browser/bars/Total"
	, 'src/component/browser/_Select'
	, 'src/component/browser/bars/SelectionBox'
	, 'src/component/browser/bars/Order'
	, 'src/component/browser/bars/Total'
], function(
	_Main
	, Controller
@@ -33,12 +33,13 @@ define([
		constructor: function(args) {

			this.config = {
				browserExts: [_Select],
				reportService: "program",
				title: this.i18n.programCatalogView,
				ownChannel: "programCatalog",
				ownChannel: 'programCatalog',
				target: redmicConfig.services.program,
				idProperty: "id"

				browserExts: [_Select],

				reportService: 'program'
			};

			lang.mixin(this, this.config, args);
@@ -55,9 +56,9 @@ define([
				rowConfig: {
					buttonsConfig: {
						listButton: [{
							icon: "fa-info-circle",
							btnId: "details",
							title: "info",
							icon: 'fa-info-circle',
							btnId: 'details',
							title: 'info',
							href: this.viewPaths.programDetails
						}]
					}
@@ -72,11 +73,11 @@ define([
				}],
				orderConfig: {
					options: [
						{value: "name"},
						{value: "code"},
						{value: "startDate"},
						{value: "endDate"},
						{value: "updated"}
						{value: 'name'},
						{value: 'code'},
						{value: 'startDate'},
						{value: 'endDate'},
						{value: 'updated'}
					]
				}
			}, this.browserConfig || {}]);
+25 −23
Original line number Diff line number Diff line
define([
	"app/designs/base/_Main"
	, "app/designs/textSearchFacetsList/Controller"
	, "app/designs/textSearchFacetsList/Layout"
	'app/designs/base/_Main'
	, 'app/designs/textSearchFacetsList/Controller'
	, 'app/designs/textSearchFacetsList/Layout'
	, 'src/redmicConfig'
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "templates/ProjectList"
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'templates/ProjectList'
	, 'src/catalog/_GenerateReport'
	, "src/component/browser/_Select"
	, "src/component/browser/bars/SelectionBox"
	, "src/component/browser/bars/Order"
	, "src/component/browser/bars/Total"
	, 'src/component/browser/_Select'
	, 'src/component/browser/bars/SelectionBox'
	, 'src/component/browser/bars/Order'
	, 'src/component/browser/bars/Total'
], function(
	_Main
	, Controller
@@ -33,11 +33,13 @@ define([
		constructor: function(args) {

			this.config = {
				browserExts: [_Select],
				target: redmicConfig.services.project,
				reportService: "project",
				title: this.i18n.projectCatalogView,
				ownChannel: "projectCatalog"
				ownChannel: 'projectCatalog',
				target: redmicConfig.services.project,

				browserExts: [_Select],

				reportService: 'project'
			};

			lang.mixin(this, this.config, args);
@@ -53,9 +55,9 @@ define([
				rowConfig: {
					buttonsConfig: {
						listButton: [{
							icon: "fa-info-circle",
							btnId: "details",
							title: "info",
							icon: 'fa-info-circle',
							btnId: 'details',
							title: 'info',
							href: this.viewPaths.projectDetails
						}]
					}
@@ -71,12 +73,12 @@ define([
				}],
				orderConfig: {
					options: [
						{value: "name"},
						{value: "code"},
						{value: "projectGroup.name", label: this.i18n.projectGroup},
						{value: "startDate"},
						{value: "endDate"},
						{value: "updated"}
						{value: 'name'},
						{value: 'code'},
						{value: 'projectGroup.name', label: this.i18n.projectGroup},
						{value: 'startDate'},
						{value: 'endDate'},
						{value: 'updated'}
					]
				}
			}, this.browserConfig || {}]);
Loading