Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
CMS Document Upload while Create / Edit Web Content M. Garcia 19 de Julho de 2011 01:24
RE: CMS Document Upload while Create / Edit Web Content Hitoshi Ozawa 19 de Julho de 2011 15:05
RE: CMS Document Upload while Create / Edit Web Content M. Garcia 20 de Julho de 2011 00:41
RE: CMS Document Upload while Create / Edit Web Content Juan Fernández 20 de Julho de 2011 00:56
RE: CMS Document Upload while Create / Edit Web Content Oliver Bayer 20 de Julho de 2011 01:43
RE: CMS Document Upload while Create / Edit Web Content Hitoshi Ozawa 20 de Julho de 2011 15:58
RE: CMS Document Upload while Create / Edit Web Content Oliver Bayer 1 de Agosto de 2011 01:42
RE: CMS Document Upload while Create / Edit Web Content Zeeshan Khan 13 de Outubro de 2011 23:24
RE: CMS Document Upload while Create / Edit Web Content M. Garcia 20 de Julho de 2011 01:49
RE: CMS Document Upload while Create / Edit Web Content Hitoshi Ozawa 20 de Julho de 2011 16:00
RE: CMS Document Upload while Create / Edit Web Content M. Garcia 21 de Julho de 2011 00:54
RE: CMS Document Upload while Create / Edit Web Content Tiziano Treccani 4 de Abril de 2012 09:07
RE: CMS Document Upload while Create / Edit Web Content Raphael Crivelli 29 de Maio de 2012 23:18
RE: CMS Document Upload while Create / Edit Web Content deepthi p 10 de Setembro de 2012 02:23
RE: CMS Document Upload while Create / Edit Web Content deepthi p 10 de Setembro de 2012 03:05
RE: CMS Document Upload while Create / Edit Web Content Murali Krishna 21 de Maio de 2012 22:39
RE: CMS Document Upload while Create / Edit Web Content Nagendra Kumar Busam 29 de Maio de 2012 22:49
RE: CMS Document Upload while Create / Edit Web Content Pierre Morin 20 de Dezembro de 2012 09:42
RE: CMS Document Upload while Create / Edit Web Content Corey Robb 29 de Maio de 2013 19:18
RE: CMS Document Upload while Create / Edit Web Content Huage Chen 20 de Junho de 2013 05:34
RE: CMS Document Upload while Create / Edit Web Content Niccolò Pasquetto 23 de Agosto de 2013 03:51
RE: CMS Document Upload while Create / Edit Web Content Niccolò Pasquetto 23 de Agosto de 2013 05:57
RE: CMS Document Upload while Create / Edit Web Content Pierre Morin 27 de Agosto de 2013 01:05
RE: CMS Document Upload while Create / Edit Web Content Niccolò Pasquetto 27 de Agosto de 2013 05:48
M. Garcia
CMS Document Upload while Create / Edit Web Content
19 de Julho de 2011 01:24
Resposta

M. Garcia

Ranking: Regular Member

Mensagens: 107

Data de entrada: 17 de Maio de 2011

Mensagens recentes

Hello,

I think it's embarrassing from a user point of view, that one can't upload a document while creating a new Web Content.
You can easily add the document library in the structure, but this means the user must :
  1. upload the document in the document library
  2. create the new web content, and select the document from the library


This should be done as a same action, i.e. the user should be able to upload a document in the library in the very same form that creates / edit the web content.

PS: similar problem with Image Gallery
Hitoshi Ozawa
RE: CMS Document Upload while Create / Edit Web Content
19 de Julho de 2011 15:05
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Do you mean to upload an file into the global area?
M. Garcia
RE: CMS Document Upload while Create / Edit Web Content
20 de Julho de 2011 00:41
Resposta

M. Garcia

Ranking: Regular Member

Mensagens: 107

Data de entrada: 17 de Maio de 2011

Mensagens recentes

I mean, my article structure has a (repeatable) "Document Library" field.
When a user creates a new web content using this structure, to attach a file via the doc library field, the file must already be uploaded in the doc library.

I think it would be more friendly to provide ability to upload a document while creating the web content, i.e. when the user clicks on "select" and gets to browse the library, there should be an option to upload from computer in the library here.

For example, under "Documents" title in each folder, adding a link "Upload document here" wich is a simple form upload.

The way it is for now forces a user to separately upload a doc in the library, prior to creating the web content, and that's not what a user wants.
Anexo

Anexo

Anexos: ScreenShot050.png (3,7k), ScreenShot052.PNG (14,5k)
Juan Fernández
RE: CMS Document Upload while Create / Edit Web Content
20 de Julho de 2011 00:56
Resposta

Juan Fernández

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1259

Data de entrada: 2 de Outubro de 2008

Mensagens recentes

Hi! I think this is important and interesting. Thanks for bringing this up.
Where else do you guys think this may make sense?
M García, can you please open an "Improvement" ticket in issues.liferay.com describing the issue like you've already done here so that we can have this feature implemented in the future?
Post the ticket link here when you're done
Thanks a lot for your feedback!
Oliver Bayer
RE: CMS Document Upload while Create / Edit Web Content
20 de Julho de 2011 01:43
Resposta

Oliver Bayer

Ranking: Liferay Master

Mensagens: 883

Data de entrada: 18 de Fevereiro de 2009

Mensagens recentes

Hi M. Garcia, hi Juan,

I've already done this customization in Liferay v5.2.3. All you have to do is to add another button for uploading new files to the document library while rendering the structure fields. Afaik you can't put both functions into the same button because uploading and selecting files have different struts actions (at least I don't find a possible solution quickly emoticon). The following code snippet shows how to modify the "edit_article_content_xsd_el.jsp" to get the wanted usability improvement.

 1String currURL = themeDisplay.getURLCurrent();
 2if (currURL.contains("?"))
 3{
 4    currURL = currURL.substring(0, currURL.indexOf("?"));
 5}
 6
 7String uploadImageURL = themeDisplay.getPortalURL() +
 8        currURL +
 9        "?p_p_id=20&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view"+
10        "&p_p_col_id=column-1&_20_struts_action=%2Fdocument_library%2Fview";
11...
12<c:if test='<%= elType.equals("document_library") %>'>
13...
14    <input type="button" value="<liferay-ui:message key="upload-file" />" onClick="<portlet:namespace />documentLibraryInput = '<portlet:namespace />structure_el<%= count.getValue() %>_content';  var documentLibraryWindow = window.open('<%=uploadImageURL%>', 'documentLibrary', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); void(''); documentLibraryWindow.focus();" />
15...
16</c:if>

As you can see in the attached screenshot there is another usability improvement implemented. Under the label "display with" (the wording isn't the best I know emoticon) the editor sees a preview if he has selected an image.

HTH Oli
Anexo

Anexos: journalstructure_with_document_library.png (3,4k)
M. Garcia
RE: CMS Document Upload while Create / Edit Web Content
20 de Julho de 2011 01:49
Resposta

M. Garcia

Ranking: Regular Member

Mensagens: 107

Data de entrada: 17 de Maio de 2011

Mensagens recentes

Hey Juan,

Here's my ticket http://issues.liferay.com/browse/LPS-19076.

I think this is the same case with Image Gallery field in the structure.

Something close also, using the CKEditor for producing rich text. If you want to add an Image or some Flash, there's a possibility to "Explore server" to select the image file or flash file. This opens a popup where you can browse the Image / Document library AND upload a file.
So in this case the functionnality is implemented, BUT, I think this could be improved as it's not so ergonomical as it is now (see attached images).

Thanks for considering ;-)
Anexo

Anexo

Anexo

Anexos: ScreenShot053.png (38,3k), ScreenShot054.png (30,3k), ScreenShot055.png (11,5k)
Hitoshi Ozawa
RE: CMS Document Upload while Create / Edit Web Content
20 de Julho de 2011 15:58
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

I think you can contribute your solution to the issue Garcia created in the jira.
Hitoshi Ozawa
RE: CMS Document Upload while Create / Edit Web Content
20 de Julho de 2011 16:00
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Also, what's confusing to the users is being shown all the folders instead of just the ones they have permission.
M. Garcia
RE: CMS Document Upload while Create / Edit Web Content
21 de Julho de 2011 00:54
Resposta

M. Garcia

Ranking: Regular Member

Mensagens: 107

Data de entrada: 17 de Maio de 2011

Mensagens recentes

Hitoshi Ozawa:
Also, what's confusing to the users is being shown all the folders instead of just the ones they have permission.


Wow, didn't notice that... they see the content in that folders too ?
Oliver Bayer
RE: CMS Document Upload while Create / Edit Web Content
1 de Agosto de 2011 01:42
Resposta

Oliver Bayer

Ranking: Liferay Master

Mensagens: 883

Data de entrada: 18 de Fevereiro de 2009

Mensagens recentes

Hi Hitoshi,

sorry for the late reply but I've been on vacation emoticon.

The code I've posted is for v5.2.3 but I will try to migrate it to v6 (trunk). After a quick try I'm getting a js error in the Liferay popup used for uploading a new file but I hope to solve it in the next few days and then I will attach the code to the jira ticket of course.

Greets Oli
Zeeshan Khan
RE: CMS Document Upload while Create / Edit Web Content
13 de Outubro de 2011 23:24
Resposta

Zeeshan Khan

Ranking: Expert

Mensagens: 349

Data de entrada: 20 de Julho de 2011

Mensagens recentes

Hi Everyone !!


after adding this line <aui:input name="file" type="file" /> in the WEBFORM jsp file, i am able to see the field of attaching the document but the problem is when i click the SEND button, everything is coming in my gmail inbox except the attached document.....emoticonemoticonemoticonemoticonemoticon
Tiziano Treccani
RE: CMS Document Upload while Create / Edit Web Content
4 de Abril de 2012 09:07
Resposta

Tiziano Treccani

Ranking: New Member

Mensagens: 10

Data de entrada: 4 de Abril de 2008

Mensagens recentes

Hi all.
I had the same problem and I started from this topic to realize my solution, that really works very well!
This is what I've done with Liferay 6.1CE:

1) put in hook plugin the file "edit_article_content_xsd_el.jsp"
2) After this line
1<aui:button cssClass="journal-documentlibrary-button" data="<%= data %>" value="select" />

put:
 1
 2<liferay-portlet:renderURL var="documentLibraryUploadURL" portletName="20"
 3                           windowState="<%= LiferayWindowState.POP_UP.toString() %>"
 4                           portletMode="<%= PortletMode.VIEW.toString() %>">
 5    <portlet:param name="struts_action" value="/document_library/view" />
 6    <portlet:param name="groupId" value="<%= String.valueOf(dlScopeGroupId) %>" />
 7</liferay-portlet:renderURL>
 8
 9<script type="text/javascript">
10    if(typeof <portlet:namespace />showUploadFilePopup != 'function') {
11        <portlet:namespace />showUploadFilePopup = function () {
12          AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
13            var dialog = new A.Dialog({
14                title: '<liferay-ui:message key="file-upload" />',
15                centered: true,
16                draggable: true,
17                height: 560,
18                width: 940
19            }).plug(A.Plugin.IO, {uri: '<%= documentLibraryUploadURL %>'}).render();
20            dialog.show();
21          });
22        };
23    };
24</script>
25
26<input type="button" value="<liferay-ui:message key="file-upload" />" onClick="<portlet:namespace />showUploadFilePopup();" />


3. Deploy the hook
4. Enjoy direct file upload!

Still to do:
return the value from the popup with the path of the uploaded file in order to fill the input of the web content form
Murali Krishna
RE: CMS Document Upload while Create / Edit Web Content
21 de Maio de 2012 22:39
Resposta

Murali Krishna

Ranking: New Member

Mensagens: 17

Data de entrada: 25 de Abril de 2012

Mensagens recentes

Hi

I have a small requirement ,my boss has given. i hope u resolve it



Portlet must read directories and file

XMlData will be structured as follows.

<Path_to_XMLData>/ Date (yy-MM-dd)/id_0.xml and id_1.xml

Portlet must read all the directories (dates) from <Path_to_XMLdata> and list them one section(in a table format).

When we click on the date we should get all the files in directories in a table.


Becaz i m new to liferay.i need some guidance how to start to resolve this requirement step by step and what i have to do for that.please tell me


Thanks in advance
Nagendra Kumar Busam
RE: CMS Document Upload while Create / Edit Web Content
29 de Maio de 2012 22:49
Resposta

Nagendra Kumar Busam

Ranking: Liferay Master

Mensagens: 651

Data de entrada: 7 de Julho de 2009

Mensagens recentes

check this, http://stackoverflow.com/questions/1844688/read-all-files-in-a-folder.

If you want you can save parent folder path in preferences & you can read it instead of hard coding.
Raphael Crivelli
RE: CMS Document Upload while Create / Edit Web Content
29 de Maio de 2012 23:18
Resposta

Raphael Crivelli

Ranking: Junior Member

Mensagens: 27

Data de entrada: 14 de Maio de 2012

Mensagens recentes

Tiziano Treccani:
Hi all.
I had the same problem and I started from this topic to realize my solution, that really works very well!
This is what I've done with Liferay 6.1CE:

1) put in hook plugin the file "edit_article_content_xsd_el.jsp"
2) After this line
1<aui:button cssClass="journal-documentlibrary-button" data="<%= data %>" value="select" />

put:
 1
 2<liferay-portlet:renderURL var="documentLibraryUploadURL" portletName="20"
 3                           windowState="<%= LiferayWindowState.POP_UP.toString() %>"
 4                           portletMode="<%= PortletMode.VIEW.toString() %>">
 5    <portlet:param name="struts_action" value="/document_library/view" />
 6    <portlet:param name="groupId" value="<%= String.valueOf(dlScopeGroupId) %>" />
 7</liferay-portlet:renderURL>
 8
 9<script type="text/javascript">
10    if(typeof <portlet:namespace />showUploadFilePopup != 'function') {
11        <portlet:namespace />showUploadFilePopup = function () {
12          AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
13            var dialog = new A.Dialog({
14                title: '<liferay-ui:message key="file-upload" />',
15                centered: true,
16                draggable: true,
17                height: 560,
18                width: 940
19            }).plug(A.Plugin.IO, {uri: '<%= documentLibraryUploadURL %>'}).render();
20            dialog.show();
21          });
22        };
23    };
24</script>
25
26<input type="button" value="<liferay-ui:message key="file-upload" />" onClick="<portlet:namespace />showUploadFilePopup();" />


3. Deploy the hook
4. Enjoy direct file upload!

Still to do:
return the value from the popup with the path of the uploaded file in order to fill the input of the web content form


Hi there

I have the same problem.
I need to upload a file while adding a new web content.

Did you finished your Hook Tiziano?
Would you provide this hook for the community?

Thanks.

Raffi
deepthi p
RE: CMS Document Upload while Create / Edit Web Content
10 de Setembro de 2012 02:23
Resposta

deepthi p

Ranking: New Member

Mensagens: 8

Data de entrada: 10 de Setembro de 2012

Mensagens recentes

hi raffi
I have created a structure with feils as documents and media.
and created a webcontent using the structure.
i am not able to see the button upload a file from webcontent even though i have pasted the code in "edit_article_content_xsd_el.jsp"
and deployed the hook in tomcat .
I am new to liferay .Please help me in this issue .
attaching the hook i have created for reference .

anybody aware of this please help me .
Thanks.
Deepthi P
Anexos: testhook-hook.7z (644,9k)
deepthi p
RE: CMS Document Upload while Create / Edit Web Content
10 de Setembro de 2012 03:05
Resposta

deepthi p

Ranking: New Member

Mensagens: 8

Data de entrada: 10 de Setembro de 2012

Mensagens recentes

working fine for me issue with my hook .
thanks a lot to all .
Pierre Morin
RE: CMS Document Upload while Create / Edit Web Content
20 de Dezembro de 2012 09:42
Resposta

Pierre Morin

Ranking: Junior Member

Mensagens: 70

Data de entrada: 17 de Maio de 2011

Mensagens recentes

Here is what I added to html/portlet/journal/select_document_library.jsp :

 1
 2<portlet:renderURL var="editFileEntryURL">
 3    <portlet:param name="struts_action" value="/document_library/edit_file_entry" />
 4    <portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD %>" />
 5    <portlet:param name="redirect" value="<%= currentURL %>" />
 6    <portlet:param name="backURL" value="<%= currentURL %>" />
 7    <portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
 8    <portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
 9</portlet:renderURL>
10
11<%
12editFileEntryURL = editFileEntryURL.replaceAll("p_p_id=15","p_p_id=20");
13editFileEntryURL = editFileEntryURL.replaceAll("&_15_","&_20_");
14%>
15
16<input type="button" value="<liferay-ui:message key="file-upload" />" onClick="document.location='<%= editFileEntryURL %>';" />   


This allow you to add a Basic Document from the selection list. It may be useful.
You can past it everywhere in the doc. ;-)
Corey Robb
RE: CMS Document Upload while Create / Edit Web Content
29 de Maio de 2013 19:18
Resposta

Corey Robb

Ranking: New Member

Mensagens: 2

Data de entrada: 29 de Maio de 2013

Mensagens recentes

Your a legend! works perfectly with 6.1.1

The other option above that changes edit_article_content_xsd_el.jsp works, however in terms of UI it doesnt easily allow you to navigate back to the structure create/edit page.

Recommend this option to others
Huage Chen
RE: CMS Document Upload while Create / Edit Web Content
20 de Junho de 2013 05:34
Resposta

Huage Chen

LIFERAY STAFF

Ranking: Junior Member

Mensagens: 28

Data de entrada: 18 de Março de 2013

Mensagens recentes

Nice trick, thanks!

Anyone knows how to display image thumbnail while being in the edit web content mode?

thanks

Huage
Niccolò Pasquetto
RE: CMS Document Upload while Create / Edit Web Content
23 de Agosto de 2013 03:51
Resposta

Niccolò Pasquetto

Ranking: New Member

Mensagens: 12

Data de entrada: 11 de Abril de 2013

Mensagens recentes

Hi,
I tried to implement the hook but I have a role/permission error. After clicking on the button to load the file is returned to me the message: "You do not have the roles required to access this portlet.".

I can not understand what role / permission must associate the user, has anyone experienced this behavior? can you help me?
Thanks in advance, Niccolò.
Niccolò Pasquetto
RE: CMS Document Upload while Create / Edit Web Content
23 de Agosto de 2013 05:57
Resposta

Niccolò Pasquetto

Ranking: New Member

Mensagens: 12

Data de entrada: 11 de Abril de 2013

Mensagens recentes

Niccolò Pasquetto:
Hi,
I tried to implement the hook but I have a role/permission error. After clicking on the button to load the file is returned to me the message: "You do not have the roles required to access this portlet.".

I can not understand what role / permission must associate the user, has anyone experienced this behavior? can you help me?
Thanks in advance, Niccolò.


I noticed that the hook runs properly if, on the same page, I instantiate the portlet "Documents and media", but if I remove it I get the error again on roles.
Pierre Morin
RE: CMS Document Upload while Create / Edit Web Content
27 de Agosto de 2013 01:05
Resposta

Pierre Morin

Ranking: Junior Member

Mensagens: 70

Data de entrada: 17 de Maio de 2011

Mensagens recentes

Your user needs to have the permissions on the Portlet with ID=20.

I don't exactly remember wich portlet it is, but I think it's the Document Library portlet. Maybe the one on back-office/administration.

Regards.
Niccolò Pasquetto
RE: CMS Document Upload while Create / Edit Web Content
27 de Agosto de 2013 05:48
Resposta

Niccolò Pasquetto

Ranking: New Member

Mensagens: 12

Data de entrada: 11 de Abril de 2013

Mensagens recentes

Hi Pierre, thank for reply.

Pierre Morin:
Your user needs to have the permissions on the Portlet with ID=20.

I don't exactly remember wich portlet it is, but I think it's the Document Library portlet. Maybe the one on back-office/administration.

Regards.


Maybe i am in a different situation: i'm not in the backend, in my portlet i've reproduced the button to open document and media popup for file choosing.

For now the only way to make the hook work is to set
1portlet.add.default.resource.check.whitelist=20

in the portal properties. Probably is not the best solution, but i don't understand why the hook doesn't work in my situation (or work only with the Documents and media portlet instantiated).