diff --git a/Gruntfile.js b/Gruntfile.js index 253f8a5..b8d4d01 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,12 +18,16 @@ module.exports = function (grunt) { css: { src: ['stylesheets/theme.css'], dest: 'stylesheets/theme-concat.css', + }, + js: { + src: ['js/main/*.js'], + dest: 'js/theme-concat.js', } }, cssmin: { - css : { - src : ["stylesheets/theme-concat.css"], - dest : "stylesheets/theme-patents.min.css", + css: { + src: ["stylesheets/theme-concat.css"], + dest: "stylesheets/theme-patents.min.css", } }, watch: { @@ -33,17 +37,36 @@ module.exports = function (grunt) { ], tasks: ['compass:css', 'concat:css', 'cssmin:css'] }, + js: { + // files: [ + // 'js/main/*' + // ], + // tasks: ['concat:js', 'uglify:mainjs'] + files: [ + 'js/widgets/*' + ], + tasks: ['uglify:js'] + }, + }, uglify: { js: { - files: {} - } + files: { + 'js/widget-maxlengthtext.min.js': 'js/widgets/maxlengthtext.js', + } + }, + // mainjs: { + // files: { + // 'js/theme-patents.min.js': 'js/theme-concat.js' + // } + // } + }, browserSync: { plone: { bsFiles: { - src : [ - 'stylesheets/*.css' + src: [ + 'stylesheets/*.css' ] }, options: { diff --git a/README.rst b/README.rst index 191face..909b164 100644 --- a/README.rst +++ b/README.rst @@ -113,6 +113,8 @@ Crea la estructura de patentes en la página. Parámetros: - ``recreate_subjects`` [bool]: Si se activa, se recrean las etiquetas de las ofertas tecnológicas. +- ``patents_folder`` [string]: Nombre de la carpeta que contendrá la carpeta de ofertas tecnológicas. +- ``techoffer_folder`` [string]: Nombre de la carpeta que contendrá todas las ofertas tecnológicas, el formularió de creación de una oferta y la coleccion de ofertas en estado borrador. Funconamiento: - Se crea la carpeta ``patents`` @@ -123,4 +125,6 @@ Funconamiento: y, al enviar, crea una nueva oferta dentro de la carpeta ``patents/ofreta-tecnologica`` - Se crea la colección ``patents/ofreta-tecnologica/technological-offers-to-review`` - Esta colección recopila todas las ofertas en estado "Borrador" - \ No newline at end of file + +Ejemplo: +``localhost:8080/Plone/configure_techoffer?recreate_subjects=True&patents_folder=patents&techoffer_folder=oferta-tecnologica`` \ No newline at end of file diff --git a/src/genweb6/patents/browser/views.py b/src/genweb6/patents/browser/views.py index 81d37d4..0508b68 100644 --- a/src/genweb6/patents/browser/views.py +++ b/src/genweb6/patents/browser/views.py @@ -105,6 +105,12 @@ def __call__(self): recreate_subjects = self.request.form.get('recreate_subjects', '') recreate_subjects = recreate_subjects and recreate_subjects.lower() == 'true' + patents_folder = self.request.form.get('patents_folder', 'patents') + patents_folder = patents_folder.strip("/") + + techoffer_folder = self.request.form.get('techoffer_folder', 'nova-oferta-tecnologica') + techoffer_folder = techoffer_folder.strip("/") + qi = get_installer(self.context) required_products = [ @@ -129,25 +135,25 @@ def __call__(self): with open(xml_config_path / 'ActionModel.xml', 'r') as f: actions_model = f.read() - patents = api.content.get('/ca/patents') + patents = api.content.get("/ca/" + patents_folder) logger.info("Getting patents folder") if not patents: - logger.info("Patents folder not found, creating it at /ca/patents") + logger.info(f"Patents folder not found, creating it at /ca/{patents_folder}") patents = api.content.create( type='Folder', - id='patents', + id=patents_folder, title='Patents', container=api.content.get('/ca') ) - techoffer = patents.get("nova-oferta-tecnologica") + techoffer = patents.get(techoffer_folder) logger.info("Getting technological offer folder") if not techoffer: logger.info("Technological offer folder not found, creating it at " + - " /ca/patents/nova-oferta-tecnologica") + f" /ca/{patents_folder}/{techoffer_folder}") techoffer = api.content.create( type='Folder', - id='nova-oferta-tecnologica', + id=techoffer_folder, title='Oferta Tecnològica/Technological Offer (Nova versió)', container=patents, subject=tags diff --git a/src/genweb6/patents/browser/xml_form_config/FieldsModel.xml b/src/genweb6/patents/browser/xml_form_config/FieldsModel.xml index 11f35cd..b6ad2d9 100644 --- a/src/genweb6/patents/browser/xml_form_config/FieldsModel.xml +++ b/src/genweb6/patents/browser/xml_form_config/FieldsModel.xml @@ -1,13 +1,17 @@ - + Màxim 150 caràcters./A maximum of 150 characters is allowed. + 150 Title + - + Màxim 500 caràcters./A maximum of 500 characters is allowed. + 500 False Description + - @@ -20,24 +24,24 @@ Categoria/Category genweb6.patents.vocabularies.parent_categories - - challenge_description + + Màxim 1100 caràcters. Pots veure el nombre de caràcters actuals clicant sobre el recompte de paraules que és a sota dreta d'aquesta caixa de text/A maximum of 1100 characters is allowed. You can see the current number of characters by clicking on the word count that is below on the right side of this text box. The Challenge - - technology_description + + Màxim 1100 caràcters. Pots veure el nombre de caràcters actuals clicant sobre el recompte de paraules que és a sota dreta d'aquesta caixa de text/A maximum of 1100 characters is allowed. You can see the current number of characters by clicking on the word count that is below on the right side of this text box. Technology - - advantages_description + + Màxim 1100 caràcters. Pots veure el nombre de caràcters actuals clicant sobre el recompte de paraules que és a sota dreta d'aquesta caixa de text/A maximum of 1100 characters is allowed. You can see the current number of characters by clicking on the word count that is below on the right side of this text box. Innovative advantages - dev_stage_description + Màxim 500 caràcters. Pots veure el nombre de caràcters actuals clicant sobre el recompte de paraules que és a sota dreta d'aquesta caixa de text/A maximum of 500 characters is allowed. You can see the current number of characters by clicking on the word count that is below on the right side of this text box. Current stage of development - applications_description + Màxim 500 caràcters. Pots veure el nombre de caràcters actuals clicant sobre el recompte de paraules que és a sota dreta d'aquesta caixa de text/A maximum of 500 characters is allowed. You can see the current number of characters by clicking on the word count that is below on the right side of this text box. Applications and Target Market @@ -46,9 +50,11 @@ First picture - + Màxim 200 caràcters./A maximum of 200 characters is allowed. + 200 False Comentari de la primera imatge/First picture caption + @@ -56,9 +62,11 @@ Second picture - + Màxim 200 caràcters./A maximum of 200 characters is allowed. + 200 False Second image caption + Technology available to be licensed diff --git a/src/genweb6/patents/configure.zcml b/src/genweb6/patents/configure.zcml index 13efe72..1fdd7ed 100644 --- a/src/genweb6/patents/configure.zcml +++ b/src/genweb6/patents/configure.zcml @@ -17,6 +17,7 @@ + diff --git a/src/genweb6/patents/content/techoffer/techoffer.pt b/src/genweb6/patents/content/techoffer/techoffer.pt index fceee72..2bd62c4 100644 --- a/src/genweb6/patents/content/techoffer/techoffer.pt +++ b/src/genweb6/patents/content/techoffer/techoffer.pt @@ -13,7 +13,8 @@
+ class="print-only mb-0" id='head-upc-logo' width="200" + style="margin-bottom: 0.5rem !important;"/> -

+

-

+

- Ref. Ref.

@@ -52,6 +53,13 @@
+