Foren

Add Year view in calendar portlet Liferay 6.2

thumbnail
Antoine Comble, geändert vor 9 Jahren.

Add Year view in calendar portlet Liferay 6.2

Regular Member Beiträge: 232 Beitrittsdatum: 07.09.12 Neueste Beiträge
Hi all,

I would add a custom view Year like day, week, month and agenda view in calendar portlet.

I would like year repeats month view for all month in the year.

Can you explain me how to achieve this ?

Thanks for your help,

Regards

Antoine
thumbnail
Andew Jardine, geändert vor 9 Jahren.

RE: Add Year view in calendar portlet Liferay 6.2

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hi Antoine,

I'm not sure I entirely understand your question but since the calendar-portlet is not part of the core (read: ROOT) application, I don't think you can affect it via hook. The simplest solution for you is probably to clone the github project and customize the portlet to fit your needs. Assuming you are on 6.2, you can find the source here -- https://github.com/liferay/liferay-plugins/tree/6.2.x/portlets/calendar-portlet/docroot/WEB-INF
thumbnail
Antoine Comble, geändert vor 9 Jahren.

RE: Add Year view in calendar portlet Liferay 6.2

Regular Member Beiträge: 232 Beitrittsdatum: 07.09.12 Neueste Beiträge
Hi Andew,

Thanks for your reply.

I've already cloned githud repository for other needs.

I've seen each view is defined in a js file like aui-scheduler-view-day.js, aui-scheduler-view-month.js.

I need help to develop year view. It's the reason of my post.

The year view will display each month like default month view.

Can you help me to start development and achieve my need ?

Regards,

Antoine
thumbnail
Andew Jardine, geändert vor 9 Jahren.

RE: Add Year view in calendar portlet Liferay 6.2

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hi Antoine,

"The year view will display each month like default month view."

.. so you mean that you will have a grid with 12 boxes where each box represents a month. Inside each "box" you will have a rolled up summary of all the calendar entries for that month. Is that correct?

In terms of getting started, I would start by copying the aui-scheduler-view-month.js file, naming the copy aui-schedule-view-year.js. I'm no AUI expert but looking at the js file most of it you would probably leave unchanged other than the obvious things like labels and such. So I would guess that you will want to make some changes to the some of the CSS_SCHEDULER_* items and possibly some of the TPL_* items.

In terms of the data -- that looks a little trickier. I can see in the aui-scheduler-base.js that there is a getEvents defined that allows you to pass a function that defines how to filter the events. Again, not my forte but maybe you can use that and pass a custom "filter" definition where you loop over the events and dump out the ones where the year doesn't match the year you are showing?
thumbnail
Antoine Comble, geändert vor 9 Jahren.

RE: Add Year view in calendar portlet Liferay 6.2

Regular Member Beiträge: 232 Beitrittsdatum: 07.09.12 Neueste Beiträge
Andew Jardine:
Hi Antoine,

"The year view will display each month like default month view."

.. so you mean that you will have a grid with 12 boxes where each box represents a month. Inside each "box" you will have a rolled up summary of all the calendar entries for that month. Is that correct?


Yes, it is !

I'm trying to loop over each month and put events when date has event.

I'm looking for a developer who made same development in calendar portlet to help me.
srikanth adde, geändert vor 8 Jahren.

RE: Add Year view in calendar portlet Liferay 6.2

New Member Beiträge: 3 Beitrittsdatum: 06.05.15 Neueste Beiträge
Hi Antoine,

Did you get any solution for this. I am looking for a similar requirement.
If any one worked on this type of requirement kindly share your thoughts.

regards
Sri
thumbnail
Antoine Comble, geändert vor 8 Jahren.

RE: Add Year view in calendar portlet Liferay 6.2

Regular Member Beiträge: 232 Beitrittsdatum: 07.09.12 Neueste Beiträge
Hi Sri,

Unfortunately, i have no answer for this topic.

I gave up it.

Regards,

Antoine