Custom viewing of files from Documents and Media portlet - liferay

I have a requirement where in a drop-down with years (2008,2009,2010,2011,2012) as its values is to be displayed.
On select of a particular value all annual report (i.e all pdf files falling in that year) for that particular year are to be displayed.
I have found Documents & Media useful to store such files. I have created Document Type for annual report having following meta data:
NAME: Text field-name of the file uploaded
FILE UPLOAD: file uploaded
YEAR: Integer-this year are linked to the drop down values
I am trying a way to filter (displaying all years in drop down) be added on viewer.
When you select a year, the file document stored is displayed. Please help as how to go on further.
We have Documents & Media Display but it shows all the files
Or if Web-content Display can be useful?
Or if how Documents & Media Display can be modified to generate a drop-down of all values displaying links to the pdf?
Please help.

So here is your requirement in short:
Show a drop-down with certain values
On select of any of the values, a list should appear which displays the list of files.
So here are my suggestions according to the points above:
Create your own custom portlet to show the drop-down. Don't go with customizing the liferay's portlet since later on you might get some more requirement to refine the logic or change the UI and you may also be required that Liferay's Document library portlet works as is. But if you want that uploading the files and a drop-down should be given in the same portlet then you have just one option to go with the Documents and Media display portlet.
Write your custom logic to display the list of files using Liferay Document & Media API in conjunction with Dynamic Query API.
The challenge would be to make the logic of fetching files according to the Meta-types for your Document Type, since I don't think liferay does not provide any way to fetch data according to the Meta-data types in a Document Type.
Please comment if you need something more or have not understood anything.

Related

From woocommerce order to customized pdf

I built a website using Wordpress and WooCommerce. Once i have created an order,
i need to have a final page(that i will then convert into pdf) to sum up the order in details. For instance, i need a sheet with the name of the company, some information about the guest and a detailed description of the products with pictures. Of course some information will be static and Others will come from the order.
1) I do not need an invoice (there are several plug-ins for that), i would need a final page showing the information with a layout i choose. Is there any drag and drop tool that helps me costumize a page with static(logo, client info) and dynamic(orders) information?
2) At this point, i can export my order details into Excel file. Is there any way to automatically generate a pdf with custom layout from an Excel file?

Search Display Template in Tabular Form with specified columns

What is the starting point to create a search display template in a table format and be able to specify which columns you want to display. Presently, the default format only shows the title, description, and link in a 3 row list. I would like to change this to have title, description, link in 3 columns (table format) and be able to add or remove more columns.
What I have managed till now is create a search page for Tasks, that only searches for files of that specific content type. Now I want to be able to decide which columns are shown in the resulting view and if possible show them in a tabular format.
I was thinking about finding a similar template and try edit the HTML to make it look as I want it. Is there a similar template? Or perhaps a ready template which I missed?
Thanks!
There was indeed a similar template, very similar to what I needed:
Displaying SharePoint 2013 Search Results in a Table
The table template html files are also provided for under an MIT License.

Search webpart in sharepoint 2010

I have created a document library with about 20 columns for storing meta data. The client wants to have search on this metadata with a facility to filter the data based on two values. For example we have two date columns(efective date and termination date) and the results that they wanted to see is files which are having the values between effective date and termination date.
Is there any out of the box solution that i can use for this or should i build a custom webpart. If so, can someone please guide me through....
Create your document library, then in "document library settings" click "Metadata Navigation Settings".
This should give you what you want. You can specify which columns to filter data on. You can stack the filters and by default they appear on the left of the page for users to interact with.

Sharepoint 2010 document templates

We have a requirement for a site wide document library that contains simple word letter templates.
From within a customer item on a list we need to be able to select one of these templates and then have the template populate with customer data such as name & address etc.
What’s the easiest way to achieve this? Ideally without using workflows.
Then you shall assign a document template to a content type.
See this blog post, http://sharepointchick.com/archive/2011/01/07/using-content-types-with-document-templates-when-using-quotnew-documentrdquo.aspx
Create fields in your template that display the document properties to "Autofill" them. This is done in the Insert tab of the ribbon, then by clicking QuickParts, then Document Properties.
The end result is that in addition to the File > Info or the properties bar, each property will also appear in the body of the document wherever you have inserted the field for it. These can then auto-update themselves based on the metadata stored with the document in the library (how often they update is a Word setting).
Xpertdoc Letter Management for SharePoint let's user pick a template from the context of a customer record, then generates a new document with customer data automatically merged inside the document.
CGU, an insurance company, estimate they save 0.5 million dollars per year by the efficiency gains introduced by Xpertdoc. http://www.youtube.com/watch?v=xbqWiFt5dUA&feature=channel&list=UL.
First of all, you should use the technique mentioned before for the document creation based on content type.
As for auto-filling the property fields, I suggest you check out this post that explains how to auto-fill properties when document is added.
You can also opt for a commercial solution such as Harmon.ie for SharePoint to retrieve your templates. They have a free version, if I'm not mistaken.

How can I filter a Sharepoint 2007 libarry list based on current user login?

I would like to know how I can filter a SharePoint library list based on current user login.
Suppose I have created the followings:
1) A SharePoint form library containing bunch of uploaded InfoPath form data.
2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.
I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.
I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value to that of "TargetUser".
I tried using other text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepted the parameter without any error but the resulting fitlered list does not display any items at all.
I have googled this subject but I have not found any solution.
It would be greatly appreciated if anyone can help me to create a functional filtered list.
And FYI, my SharePoint 2007 installation is just WSS 3.0 + Form Server. I do not have MOSS 2007 (so no MOSS 2007 web parts or web services).
Thank you.
Jason
Is there any reason your TargetUser field is a text field instead of a People or Group field?
The [Me] identifier can be used to filter list items based on a People or Group column, but not on text fields.
Well. It looks like no one here has the answer.
Nevertheless, another user on Technet forum has a very good solution.
See this link for more information

Resources