As we know alfresco OOTB provides rename document and rename folder functionality.
If we take mouse over to the folder name, then rename action is getting visible.
I want to use similar thing on my workflow form, is there any way to use similar thing in my workflow form.
Please let me know where I can find that rename action related ftl files and related code.
Find attached image for more information, In that I have Highlighted rename action part.
The rename button not provided in ftl, it's added dynamically in documentlist-view-detailed.js, you can find it by searching tip.insitu-rename
Related
I am using OneupUploaderBundle, with jQuery File Upload. After the files are selected, they are uploaded and renamed by the bunudle. The problem I am facing to, is from the validation of my form(entity) how can I know the list of files that have been uploaded ? I don't know which kind of parts of code can be useful for this question as I have just followed their guide but I can edit if needed.
So the solution I've built is to add the picture filename, via the EventListener used for the file posting, in a text file, then explode the text file in an array from the controller (form validation) and move the pictures files to their final location. If someone as a better solution... Do not hesitate!
I am exploring with alfresco 4.3 & 5.0,
As we know our normal documents have metadata properties like Author,Title,Subject,Category.... & so on.
So if it has some values, alfresco retrieves data values from these & displays in that file properties section like :Name,Title,Author,size,creator......and many more.
So Suppose If I have a some more form fields in my document (like firstName,Tenant,isAuthrorized), then what are the all steps that I need to follow in alfresco so that whenever user will upload any document , under that file properties section, all the properties will get displayed and also If I will select edit properties option, I should be able to edit them.
I have followed this pdf :http://ecmarchitect.com/images/articles/alfresco-content/content-article...
By using which I am able to see new drop-down values under create rule section.
Similar way I want to do it document properties section, so that similar to existing properties like Name, Title,Description,MimeType,Tags... etc , I can also see my new properties like firstName,Tenant - all are text fields.
Please show me the way to achieve these things for Alfresco 5.0 a community . To achieve this do I need to import Alfresco sdk, or can I directly changes in tomcat?
Also one more question, I want to create a custom metadata in alfresco , so that if excel sheet(column)have values ,then all such properties with their values should be displayed under properties section of that file.
Is it possible in alfresco?
If yes can you provide me some way to do it.
You can create custom metadata in alfresco.For that in alfresco you can use alfresco content model.For reference you can study below link of alfresco.
https://wiki.alfresco.com/wiki/Data_Dictionary_Guide
Below are some basic information.
You will need to create 2 files for creating custom metadata.
1. Context file
2. Model file
Both files will be inside alfresco/extension folder.
There is one another approach for dynamic model creation.For that you only need to create one file which you will need to upload inside "/Data Dictionary/Models"
I have have made a folderish content type called supplier_folder, which displays a list of suppliers that can be added under it, and their information. I can add it through the navigation bar, but I would like to add it programatically during setup.
I have been following the tutorial on custom installer code (http://docs.plone.org/develop/addons/components/genericsetup.html#custom-installer-code-setuphandlers-py) and have looked at creating objects programatically (http://docs.plone.org/develop/plone/content/creating.html).
Unfortunately, the second article says I need to have a folder created. How can I get around this and add the supplier_folder object at the Plone Site outside of a folder?
IIRC, only users with role Manager or Site Administrator can add content to the root of the site; you can overcome this limitation in two ways:
by using the _constructInstance method as it bypasses the permissions when creating an item
by switching roles inside your code with plone.api.env.adopt_roles
I personally prefer the second one.
you can see an example of a pretty complex setuphandlers.py in interlegis.portalmodelo.policy package.
When you create a new Plone site, it's also creating some default content types.
Look at how Plone do: https://github.com/plone/Products.CMFPlone/blob/1471828ee97a8dd84396bad4a3286be514819869/Products/CMFPlone/setuphandlers.py#L119
There are a couple of ways to achieve this. The buildin mechanism is to use GenericSetup in combination with "structure" folder as described here: http://koansys.com/tech/create-plone-initial-content-with-generic-setup
In short you need the following:
Create a folder "structure" in your Generic Setup profile (in general, under profiles/default)
Create a .objects file with the following content: "suppliers,supplier_folder"
in "structure" create a folder "suppliers" with a .properties file and content:
[DEFAULT]
title = Suppliers
description = Some usefull description text
As far as I remember this is ok for simple structures likes your. If you have complex structures with folders and sub-folders and want more specific control you probably need to write python code. I made some stuff here: https://github.com/collective/zettwerk.setup/blob/master/zettwerk/setup/structure.py
But zettwerk.setup is not yet released, but you should be able to integrate the structure.py right into your project. Than you can the handle_structure method into your setuphandlers.py and passing a structure dict like this:
handle_structure(portal, [{'id': 'suppliers', 'portal_type': 'supplier_folder'}])
The advantage of this method is, that you can also control metadata like workflow state, default page setting, portlets, local roles and some others.
I have some view which lists my module table entries.
What is the most elegant way to attach a form below the view to add record?
Waht I am trying to do know is:
I created dedicated form in my module:
function my_module_form_add_record($form_state) {
form fields.....
}
I added to the view theme file:
$add_form = drupal_get_form('my_module_form_add_record');
print $add_form;
But I do not like this solution for at least 2 reasons:
I does not work ...
2. Even if it worked - it is depended on the theme file! So if I change the theme - functionality is crashed.
I would like to find more elegant solution to attach form from custom module to the view.
I know of the existence of the "Views Attach" module but it has no option of adding custom forms.
I know also of the existence of the Views Embedded form (and I am usig it) but it is only useful if you want to add form to the every row.
Seems the must be some solution to add record from the view page!
Thanks you for help.
you could use hook_views_pre_render:
This hook is called right before the render process. The query has been executed, and the pre_render() phase has already happened for handlers, so all data should be available.
Adding output to the view can be accomplished by placing text on $view->attachment_before and $view->attachment_after. Altering the content can be achieved by editing the items of $view->result.
I have just meticulously followed MS instructions for customising a dynamic data page template for one table. Create the folder CustomPages/MyTable/List.aspx, and copy PageTemplates/List.aspx into that folder, but I now get compiler error because I have duplicated methods in both List.aspx files.
What am I doing wrong?
Just in: I found another, non-MS page that I can't find again now, but he suggested the almost obvious: to change the class name in thej 3 files of my custom list page.
I'm not sure what it says in the instructions, but you'll need to change the namespace in the two codebehind files (List.aspx.cs and List.aspx.designer.cs) and in the "inherits" reference in the .aspx file or yes, you will have duplicate methods (same namespace, same class name, same method name).
You should change the namespace to reflect the path that the custom page is in - this will help ensure it stays unique.