- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2017 07:34 AM
Hello
One of my metadata is also the Date with my custom type d:date (not d:datetime). I would like to ask you how to remove the 00:00:00 from "share documentlibrary view" collumn. I want display only this format dd.mm.yyyy .... without time.
content-model.xml
<?xml version="1.0" encoding="UTF-8"?><model xmlns="http://www.alfresco.org/model/dictionary/1.0" name="test:model"> <author>Vít Šanda</author> <imports> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> </imports> <namespaces> <namespace uri="http://www.test.cz/model/test/1.0." prefix="test"/> </namespaces> <data-types/> <constraints/> <aspects> <!-- aspekty --> <aspect name="test:metadata"> <title>Metadata moje</title> <properties> <property name="test:castka"> <title>Částka</title> <type>d:int</type> <mandatory>false</mandatory> <index enabled="true"> <tokenised>TRUE</tokenised> <facetable>false</facetable> </index> </property> <property name="test:datum"> <title>Datum</title> <type>d:date</type> <mandatory>false</mandatory> <index enabled="true"> <tokenised>TRUE</tokenised> <facetable>false</facetable> </index> </property> <property name="test:hrnek"> <title>Hrnek</title> <type>d:text</type> <mandatory>false</mandatory> <multiple>true</multiple> <default>Červený</default> <index enabled="true"> <tokenised>TRUE</tokenised> <facetable>false</facetable> </index> <constraints> <constraint name="test:hrnek" type="LIST"> <parameter name="allowedValues"> <list> <value>Červený</value> <value>Modrý</value> <value>Fialový</value> </list> </parameter> <parameter name="caseSensitive"> <value>true</value> </parameter> <parameter name="sorted"> <value>false</value> </parameter> </constraint> </constraints> </property> </properties> <overrides/> <mandatory-aspects/> </aspect> <!-- konec aspekty --> </aspects></model>
share-config-custom.xml
<alfresco-config><!-- START ADVANCED SEARCH --><config evaluator="string-compare" condition="AdvancedSearch"> <advanced-search> <forms> </forms> </advanced-search> </config><!-- END --><!-- Typy dokumentů začátek --><!-- Typy dokumentů konec --><!-- Typy složek začátek --><!-- Typy složek konec --><!-- Aspekty začátek --><config evaluator="aspect" condition="test:metadata"> <forms> <form> <field-visibility> <show id="test:castka" /> <show id="test:datum" /> <show id="test:hrnek" /> </field-visibility> <appearance> <field id="test:datum" label-id="Datum"> <control template="/org/alfresco/components/form/controls/date.ftl"> <control-param name="showTime">false</control-param> </control> </field> </appearance> <form id="search"> <field-visibility> <show id="test:castka" /> <show id="test:datum" /> <show id="test:hrnek" /> </field-visibility> </form> </form> </forms></config><!-- Aspekty konec --><config evaluator="string-compare" condition="DocumentLibrary"> <aspects> <visible> <!-- Seznam aspektů začátek --> <aspect label="Metadata" name="test:metadata" /> <!-- Seznam aspektů konec --> </visible> <addable> </addable> <removeable> </removeable> </aspects> <types> <type name="cm:content"> <!-- Seznam typů dokumentů začátek --> <!-- <subtype label="jmeno" name="NaP:NaP_zak_obj" /> --> <!-- Seznam typů dokumentů konec --> </type> <type name="cm:folder"> <!-- Seznam typů složek začátek --> <!-- <subtype label="Zakázka" name="NaP:NaP_slozka_zakazka" /> --> <!-- Seznam typů složek konec --> </type> </types></config> </alfresco-config>
share-documentlibrary-config.xml
it just only part with my code
<view-renderer id="test" iconClass="table" label="Test" index="50" widget="Alfresco.DocumentListTableViewRenderer"> <dependencies> <js src="components/documentlibrary/documentlist-view-detailed.js" /> <js src="components/documentlibrary/documentlist-view-table.js" /> <js src="components/common/common-component-style-filter-chain.js" /> <css src="components/documentlibrary/documentlist-view-table.css" /> </dependencies> <json-config> { "actions": { "show": "true" }, "indicators": { "show": "true" }, "selector": { "show": "true" }, "thumbnail": { "show": "true" }, "propertyColumns": [ { "property": "name", "label": "label.name", "width": "200" }, { "property": "test:datum", "label": "datum", "requiredDateFormat": "dd.mm.yyyy", "description": "Sloupeček se zobrazením datumu", "link": "true" }, { "property": "test:castka", "label": "Částka" } ] } </json-config> </view-renderer>
This is my problem
How do I do that ?
Thank you
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2017 04:08 AM
As far as I can see the "requiredDateFormat" that you are trying to set is not supported at all in the table view. I cannot see a way for you to achieve what you are looking for without doing some customisation / hacking on the Alfresco code for the table view. To be honest, I never use the table view in the first place because it has been implemented in a way that significantly limits configuration/customisation using the already estalished tools/practices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2017 04:08 AM
As far as I can see the "requiredDateFormat" that you are trying to set is not supported at all in the table view. I cannot see a way for you to achieve what you are looking for without doing some customisation / hacking on the Alfresco code for the table view. To be honest, I never use the table view in the first place because it has been implemented in a way that significantly limits configuration/customisation using the already estalished tools/practices.
