Merge lp:~nik90/ubuntu-calendar-app/revamp-eventdetails-page into lp:ubuntu-calendar-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 789
Merged at revision: 790
Proposed branch: lp:~nik90/ubuntu-calendar-app/revamp-eventdetails-page
Merge into: lp:ubuntu-calendar-app
Diff against target: 1136 lines (+337/-394)
7 files modified
AgendaView.qml (+2/-2)
AllDayEventComponent.qml (+2/-4)
CMakeLists.txt (+22/-14)
EventDetails.qml (+232/-258)
HeaderDateComponent.qml (+1/-1)
MonthComponent.qml (+2/-0)
po/com.ubuntu.calendar.pot (+76/-115)
To merge this branch: bzr merge lp:~nik90/ubuntu-calendar-app/revamp-eventdetails-page
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
Jenkins Bot continuous-integration Approve
Review via email: mp+288492@code.launchpad.net

Commit message

- Transitioned EventsDetails.qml to PageHeader
- Removed uses of deprecated ListItems like Subtitled, Header etc
- Fixed translator comments and removed incorrect uses of i18n.tr() calls
- Sorted and categorized guests list into Attending, Not Attending and No Reply as per design
- Cleaned up code

Description of the change

- Transitioned EventsDetails.qml to PageHeader
- Removed uses of deprecated ListItems like Subtitled, Header etc
- Fixed translator comments and removed incorrect uses of i18n.tr() calls
- Sorted and categorized guests list into Attending, Not Attending and No Reply as per design
- Cleaned up code

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Szymon Waliczek (majster-pl) :
784. By Nekhelesh Ramananthan

merged lp:ubuntu-calendar-app

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
785. By Nekhelesh Ramananthan

Fixed szymon's review

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

some comments inline.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

@Renator Replied to your inline comments.

786. By Nekhelesh Ramananthan

Added keyboard shortcut to edit action

787. By Nekhelesh Ramananthan

Removed pagestack connection since it doesn't have any merit of being included there

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

@nick90: Since you are revamp the page is better to fix/update wrong code if necessary.

Check my inline comments.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

The visual looks different from this doc: https://docs.google.com/document/d/1UZEKYB1JS0CO0gEiPu701rhZSHimJYq6EgeLNhxG_1I/edit#heading=h.luhyfkrvthz3

In the current implementation only the event title has the collection color as background in the doc it shows the event title and time over the collection color background.

788. By Nekhelesh Ramananthan

Added connection to detect external event changes and modify the event details page

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Long event description is clipped even if there is still space on the screen.

check screenshot.http://imgur.com/GTNhwRx

789. By Nekhelesh Ramananthan

Fixed issues pointed by renato regarding description getting truncated and including location, date in the colored rectangle

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Fixed remaining issues.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good. Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AgendaView.qml'
2--- AgendaView.qml 2016-03-14 16:22:46 +0000
3+++ AgendaView.qml 2016-03-16 16:44:44 +0000
4@@ -164,8 +164,8 @@
5 ListItemLayout {
6 id: listitemlayout
7 padding.top: units.gu(1)
8- title.text: mainView.displayLunarCalendar ? i18n.tr("%1 %2 %3 %4 %5").arg(lunarDate.gzYear).arg(lunarDate .IMonthCn).arg(lunarDate.IDayCn)
9- .arg(lunarDate.gzDay).arg(lunarDate.isTerm ? lunarDate.Term : "")
10+ title.text: mainView.displayLunarCalendar ? ("%1 %2 %3 %4 %5").arg(lunarDate.gzYear).arg(lunarDate .IMonthCn).arg(lunarDate.IDayCn)
11+ .arg(lunarDate.gzDay).arg(lunarDate.isTerm ? lunarDate.Term : "")
12 : date
13 title.color: event.startDateTime.toLocaleDateString() === new Date().toLocaleDateString() ? UbuntuColors.orange : UbuntuColors.darkGrey
14 }
15
16=== modified file 'AllDayEventComponent.qml'
17--- AllDayEventComponent.qml 2016-03-04 03:08:09 +0000
18+++ AllDayEventComponent.qml 2016-03-16 16:44:44 +0000
19@@ -143,10 +143,8 @@
20 }
21
22 if(repeater.compactView) {
23- // TRANSLATORS: the first parameter refers to the number of all-day events
24- // on a given day. "Ev." is short form for "Events".
25- // Please keep the translation of "Ev." to 3 characters only, as the week view
26- // where it's shown has limited space
27+ // TRANSLATORS: Please keep the translation of this string to a max of
28+ // 5 characters as the week view where it is shown has limited space.
29 return i18n.tr("%1 event", "%1 events", events.length).arg(events.length)
30 } else {
31 if( events.length > 1) {
32
33=== modified file 'CMakeLists.txt'
34--- CMakeLists.txt 2015-11-23 09:21:05 +0000
35+++ CMakeLists.txt 2016-03-16 16:44:44 +0000
36@@ -1,23 +1,34 @@
37 project(com.ubuntu.calendar)
38 cmake_minimum_required(VERSION 2.8.9)
39+
40 find_program(INTLTOOL_MERGE intltool-merge)
41+if(NOT INTLTOOL_MERGE)
42+ message(FATAL_ERROR "Could not find intltool-merge, please install the intltool package")
43+endif()
44+
45 find_program(INTLTOOL_EXTRACT intltool-extract)
46+if(NOT INTLTOOL_EXTRACT)
47+ message(FATAL_ERROR "Could not find intltool-extract, please install the intltool package")
48+endif()
49+
50+option(INSTALL_TESTS "Install the tests on make install" on)
51+option(CLICK_MODE "Installs to a contained location" on)
52
53 # Standard install paths
54 include(GNUInstallDirs)
55
56-option(INSTALL_TESTS "Install the tests on make install" on)
57-option(CLICK_MODE "Installs to a contained location" on)
58+# Tests
59+enable_testing()
60
61-set(APP_NAME calendar)
62-set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
63-set(APPLICATION_FILE "${PROJECT_NAME}_${APP_NAME}.application")
64-set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
65-set(MAIN_QML calendar.qml)
66-set(ICON_FILE calendar-app@30.png)
67-set(AUTOPILOT_DIR calendar_app)
68-set(APP_HARDCODE calendar-app)
69-set(UBUNTU_MANIFEST_PATH "click/manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
70+set(APP_NAME calendar)
71+set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
72+set(APPLICATION_FILE "${PROJECT_NAME}_${APP_NAME}.application")
73+set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
74+set(MAIN_QML calendar.qml)
75+set(ICON_FILE calendar-app@30.png)
76+set(AUTOPILOT_DIR calendar_app)
77+set(APP_HARDCODE calendar-app)
78+set(UBUNTU_MANIFEST_PATH "click/manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
79
80 if(CLICK_MODE)
81 if(NOT DEFINED BZR_SOURCE)
82@@ -77,9 +88,6 @@
83
84 install(DIRECTORY "3rd-party" DESTINATION ${DATA_DIR})
85
86-# Tests
87-enable_testing()
88-
89 add_subdirectory(click)
90 add_subdirectory(po)
91 add_subdirectory(tests)
92
93=== modified file 'EventDetails.qml'
94--- EventDetails.qml 2016-03-02 19:55:52 +0000
95+++ EventDetails.qml 2016-03-16 16:44:44 +0000
96@@ -1,5 +1,5 @@
97 /*
98- * Copyright (C) 2013-2014 Canonical Ltd
99+ * Copyright (C) 2013-2016 Canonical Ltd
100 *
101 * This file is part of Ubuntu Calendar App
102 *
103@@ -15,11 +15,10 @@
104 * You should have received a copy of the GNU General Public License
105 * along with this program. If not, see <http://www.gnu.org/licenses/>.
106 */
107+
108 import QtQuick 2.4
109 import Ubuntu.Components 1.3
110-import Ubuntu.Components.ListItems 1.0 as ListItem
111-import Ubuntu.Components.Themes.Ambiance 1.0
112-import Ubuntu.Components.Popups 1.0
113+import Ubuntu.Components.Popups 1.3
114 import QtOrganizer 5.0
115
116 import "Defines.js" as Defines
117@@ -32,46 +31,45 @@
118
119 property var event
120 property var model
121+ property var collection: model.collection(event.collectionId);
122
123- anchors{
124- left: parent.left
125- right: parent.right
126- bottom: parent.bottom
127+ header: PageHeader {
128+ title: i18n.tr("Event Details")
129+ flickable: flicable
130+ trailingActionBar.actions: Action {
131+ text: i18n.tr("Edit");
132+ objectName: "edit"
133+ iconName: "edit";
134+ enabled: !collection.extendedMetaData("collection-readonly")
135+ shortcut: "Ctrl+E"
136+ onTriggered: {
137+ if( event.itemType === Type.EventOccurrence ) {
138+ var dialog = PopupUtils.open(Qt.resolvedUrl("EditEventConfirmationDialog.qml"),root,{"event": event});
139+ dialog.editEvent.connect( function(eventId){
140+ if( eventId === event.parentId ) {
141+ showEditEventPage(internal.parentEvent, model)
142+ } else {
143+ showEditEventPage(event, model)
144+ }
145+ });
146+ } else {
147+ showEditEventPage(event, model)
148+ }
149+ }
150+ }
151 }
152
153- flickable: null
154-
155- title: i18n.tr("Event Details")
156-
157 Component.onCompleted: {
158 showEvent(event)
159 }
160
161- Connections{
162- target: pageStack
163- onCurrentPageChanged:{
164- if( pageStack.currentPage === root) {
165- showEvent(event)
166- }
167- }
168- }
169-
170- RemindersModel {
171- id: reminderModel
172- }
173-
174- function updateCollection(event) {
175-
176- var collection = model.collection( event.collectionId );
177- calendarIndicator.color = collection.color
178- eventInfo.color=collection.color
179- // TRANSLATORS: the first parameter refers to the name of event calendar.
180- calendarName.text = i18n.tr("%1 Calendar").arg( collection.name)
181-
182- //disable edit in case of read only calendar
183- if( collection.extendedMetaData("collection-readonly") === true ) {
184- editAction.enabled = false
185- }
186+ Keys.onEscapePressed: {
187+ pageStack.pop();
188+ }
189+
190+ Connections {
191+ target: event
192+ onItemChanged: showEvent(event)
193 }
194
195 function updateRecurrence( event ) {
196@@ -79,103 +77,124 @@
197 if (event.recurrence) {
198 if(event.recurrence.recurrenceRules[0] !== undefined){
199 var rule = event.recurrence.recurrenceRules[0];
200- repeatLabel.text = eventUtils.getRecurrenceString(rule)
201+ recurrenceLabel.text = eventUtils.getRecurrenceString(rule)
202 } else {
203 //For event occurs once, event.recurrence.recurrenceRules == []
204- repeatLabel.text = Defines.recurrenceLabel[0];
205+ recurrenceLabel.text = Defines.recurrenceLabel[0];
206 }
207 }
208 }
209
210 function updateContacts(event) {
211- var attendees = event.attendees;
212+ var attendees
213+ var attendingCount, notAttendingCount
214+
215+ attendingCount = 0
216+ notAttendingCount = 0
217+ attendees = event.attendees
218+
219 contactModel.clear();
220+
221 if( attendees !== undefined ) {
222 for (var j = 0 ; j < attendees.length ; ++j) {
223- var name = attendees[j].name.trim().length === 0 ?
224- attendees[j].emailAddress.replace("mailto:", ""):
225- attendees[j].name
226-
227- contactModel.append( {"name": name,"participationStatus": attendees[j].participationStatus } );
228+ var name = attendees[j].name.trim().length === 0 ? attendees[j].emailAddress.replace("mailto:", "")
229+ : attendees[j].name
230+
231+ // Sort the participating guests by Attending, Not-Attending and No-Reply for easier diaply in the list view.
232+ if(attendees[j].participationStatus === 0) {
233+ contactModel.insert(attendingCount+notAttendingCount, {"name": name,"participationStatus": attendees[j].participationStatus})
234+ notAttendingCount++
235+ }
236+
237+ else if(attendees[j].participationStatus === 1) {
238+ contactModel.insert(attendingCount, {"name": name,"participationStatus": attendees[j].participationStatus})
239+ attendingCount++
240+ }
241+
242+ else {
243+ contactModel.append({"name": name,"participationStatus": attendees[j].participationStatus});
244+ }
245 }
246 }
247 }
248
249 function updateReminder(event) {
250- var reminder = event.detail( Detail.VisualReminder)
251+ var reminder = event.detail(Detail.VisualReminder)
252 if(reminder) {
253 for(var i=0; i<reminderModel.count; i++) {
254 if(reminder.secondsBeforeStart === reminderModel.get(i).value) {
255- reminderHeader.subText = reminderModel.get(i).label
256+ reminderLayout.subtitle.text = reminderModel.get(i).label
257 }
258 }
259 } else {
260- reminderHeader.subText = reminderModel.get(0).label
261- }
262- }
263-
264- function updateLocation(event) {
265- if( event.location ) {
266- locationLabel.text = event.location
267- }
268- }
269-
270- function showEvent(e) {
271+ reminderLayout.subtitle.text = reminderModel.get(0).label
272+ }
273+ }
274+
275+ function getDate(e) {
276+ var dateLabel = null
277+
278 var startTime = e.startDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
279 var endTime = e.endDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
280-
281- var lunarStartDate = null;
282- var lunarEndDate = null;
283+ var startDay = e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat)
284+ var endDay = e.endDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat)
285+
286+ var lunarStartDate = null
287+ var lunarEndDate = null
288+
289+ var allDayString = "(%1)".arg(i18n.tr("All Day"))
290+
291 if (mainView.displayLunarCalendar) {
292 lunarStartDate = Lunar.calendar.solar2lunar(e.startDateTime.getFullYear(),
293- e.startDateTime.getMonth() + 1,
294- e.startDateTime.getDate())
295+ e.startDateTime.getMonth() + 1,
296+ e.startDateTime.getDate())
297
298 lunarEndDate = Lunar.calendar.solar2lunar(e.endDateTime.getFullYear(),
299- e.endDateTime.getMonth() + 1,
300- e.endDateTime.getDate())
301+ e.endDateTime.getMonth() + 1,
302+ e.endDateTime.getDate())
303 }
304
305 if( e.allDay ) {
306 var days = Math.floor((e.endDateTime - e.startDateTime) / Date.msPerDay);
307 if( days !== 1 ) {
308 if (mainView.displayLunarCalendar) {
309- dateLabel.text = i18n.tr("%1 %2 %3 - %4 %5 %6 (All Day)")
310- .arg(lunarStartDate.gzYear).arg(lunarStartDate .IMonthCn).arg(lunarStartDate.IDayCn)
311+ dateLabel = ("%1 %2 %3 - %4 %5 %6").arg(lunarStartDate.gzYear).arg(lunarStartDate .IMonthCn).arg(lunarStartDate.IDayCn)
312 .arg(lunarEndDate.gzYear).arg(lunarEndDate .IMonthCn).arg(lunarEndDate.IDayCn)
313 } else {
314- dateLabel.text = i18n.tr("%1 - %2 (All Day)")
315- .arg( e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
316- .arg( e.endDateTime.addDays(-1).toLocaleDateString(Qt.locale(), Locale.LongFormat))
317+ dateLabel = ("%1 - %2").arg(startDay).arg(e.endDateTime.addDays(-1).toLocaleDateString(Qt.locale(), Locale.LongFormat))
318 }
319 } else {
320 if (mainView.displayLunarCalendar) {
321- dateLabel.text = i18n.tr("%1 %2 %3 (All Day)")
322- .arg(lunarStartDate.gzYear).arg(lunarStartDate .IMonthCn).arg(lunarStartDate.IDayCn)
323+ dateLabel = ("%1 %2 %3").arg(lunarStartDate.gzYear).arg(lunarStartDate .IMonthCn).arg(lunarStartDate.IDayCn)
324 } else {
325- dateLabel.text = i18n.tr("%1 (All Day)").arg( e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
326+ dateLabel = startDay
327 }
328 }
329- } else {
330+
331+ dateLabel = dateLabel.concat(" ", allDayString)
332+ }
333+
334+ else {
335 if (e.endDateTime.getDate() !== e.startDateTime.getDate()) {
336 if (mainView.displayLunarCalendar) {
337- dateLabel.text = i18n.tr("%1 %2 %3, %4 - %5 %6 %7, %8")
338- .arg(lunarStartDate.gzYear).arg(lunarStartDate .IMonthCn).arg(lunarStartDate.IDayCn).arg(startTime)
339+ dateLabel = ("%1 %2 %3, %4 - %5 %6 %7, %8").arg(lunarStartDate.gzYear).arg(lunarStartDate .IMonthCn).arg(lunarStartDate.IDayCn).arg(startTime)
340 .arg(lunarEndDate.gzYear).arg(lunarEndDate .IMonthCn).arg(lunarEndDate.IDayCn).arg(endTime);
341 } else {
342- dateLabel.text = e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat) + ", " +startTime + " - "
343- + e.endDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat) + ", " + endTime;
344+ dateLabel = ("%1, %2 - %3, %4").arg(startDay).arg(startTime).arg(endDay).arg(endTime)
345 }
346 } else {
347 if (mainView.displayLunarCalendar) {
348- dateLabel.text = i18n.tr("%1 %2 %3, %4 - %5")
349- .arg(lunarStartDate.gzYear).arg(lunarStartDate .IMonthCn).arg(lunarStartDate.IDayCn).arg(startTime).arg(endTime);
350+ dateLabel = ("%1 %2 %3, %4 - %5").arg(lunarStartDate.gzYear).arg(lunarStartDate .IMonthCn).arg(lunarStartDate.IDayCn).arg(startTime).arg(endTime)
351 } else {
352- dateLabel.text = e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat) + ", " +startTime + " - " + endTime;
353+ dateLabel = ("%1, %2 - %3").arg(startDay).arg(startTime).arg(endTime)
354 }
355 }
356 }
357
358+ return dateLabel
359+ }
360+
361+ function showEvent(e) {
362 if( e.itemType === Type.EventOccurrence ){
363 var requestId = -1;
364 model.onItemsFetched.connect( function(id,fetchedItems){
365@@ -187,24 +206,10 @@
366 });
367 requestId = model.fetchItems([e.parentId]);
368 }
369- // This is the event title
370- if( e.displayLabel) {
371- titleLabel.text = e.displayLabel;
372- }
373-
374- if( e.description ) {
375- descLabel.text = e.description;
376- }
377-
378- updateCollection(e);
379
380 updateContacts(e);
381-
382 updateRecurrence(e);
383-
384 updateReminder(e);
385-
386- updateLocation(e);
387 }
388
389 function showEditEventPage(event, model) {
390@@ -223,37 +228,13 @@
391 })
392 }
393
394- Keys.onEscapePressed: {
395- pageStack.pop();
396- }
397-
398- Keys.onPressed: {
399- if ((event.key === Qt.Key_E) && ( event.modifiers & Qt.ControlModifier)) {
400- showEditEventPage(event, model);
401- }
402- }
403-
404- head.actions: [
405- Action {
406- text: i18n.tr("Edit");
407- objectName: "edit"
408- iconName: "edit";
409- onTriggered: {
410- if( event.itemType === Type.EventOccurrence ) {
411- var dialog = PopupUtils.open(Qt.resolvedUrl("EditEventConfirmationDialog.qml"),root,{"event": event});
412- dialog.editEvent.connect( function(eventId){
413- if( eventId === event.parentId ) {
414- showEditEventPage(internal.parentEvent, model)
415- } else {
416- showEditEventPage(event, model)
417- }
418- });
419- } else {
420- showEditEventPage(event, model)
421- }
422- }
423- }
424- ]
425+ RemindersModel {
426+ id: reminderModel
427+ }
428+
429+ ListModel {
430+ id: contactModel
431+ }
432
433 EventUtils{
434 id:eventUtils
435@@ -264,12 +245,6 @@
436 property var parentEvent;
437 }
438
439- Rectangle {
440- id: bg
441- color: "white"
442- anchors.fill: parent
443- }
444-
445 Scrollbar {
446 flickableItem: flicable
447 align: Qt.AlignTrailing
448@@ -280,65 +255,53 @@
449
450 clip: interactive
451 anchors.fill: parent
452- interactive: contentHeight > height
453-
454 contentWidth: parent.width
455- contentHeight: column.height + eventInfo.height + units.gu(3) /*top margin + spacing */
456+ contentHeight: column.height + titleContainer.height
457
458 Rectangle{
459- id: eventInfo
460+ id: titleContainer
461
462+ color: collection.color
463 width: parent.width
464- height: eventInfoList.height + units.gu(5)
465-
466- Column{
467- id:eventInfoList
468-
469- anchors {
470- left: parent.left
471- right: parent.right
472- top: parent.top
473- margins: units.gu(2)
474- }
475+ height: mainEventDetails.height + units.gu(4)
476+
477+ Column {
478+ id: mainEventDetails
479
480 spacing: units.gu(0.5)
481-
482- Label{
483- id: titleLabel
484- objectName: "titleLabel"
485- fontSize: "large"
486- width: parent.width
487- wrapMode: Text.WordWrap
488- color: "white"
489- }
490-
491- Label{
492- id: dateLabel
493- objectName: "dateLabel"
494- color: "white"
495- fontSize: "medium"
496- width: parent.width
497- wrapMode: Text.WordWrap
498- }
499-
500- Label{
501- id: repeatLabel
502- objectName: "repeatLabel"
503- color: "white"
504- fontSize: "small"
505- width: parent.width
506- wrapMode: Text.WordWrap
507- visible: repeatLabel.text !== ""
508- }
509-
510- Label{
511- id: locationLabel
512- objectName: "locationLabel"
513- color: "white"
514- fontSize: "small"
515- width: parent.width
516- wrapMode: Text.WordWrap
517- visible: locationLabel.text !== ""
518+ anchors { verticalCenter: parent.verticalCenter; left: parent.left; right: parent.right; margins: units.gu(2) }
519+
520+ Label {
521+ text: event.displayLabel
522+ color: "White"
523+ textSize: Label.Large
524+ width: parent.width
525+ wrapMode: Text.wrapMode
526+ }
527+
528+ Label {
529+ text: getDate(event)
530+ color: "White"
531+ visible: text != ""
532+ width: parent.width
533+ wrapMode: Text.wrapMode
534+ }
535+
536+ Label {
537+ text: event.location
538+ color: "White"
539+ visible: text != ""
540+ width: parent.width
541+ wrapMode: Text.wrapMode
542+ }
543+
544+ Label {
545+ id: recurrenceLabel
546+ textSize: Label.Small
547+ color: "White"
548+ visible: text != ""
549+ width: parent.width
550+ wrapMode: Text.wrapMode
551 }
552 }
553 }
554@@ -346,90 +309,101 @@
555 Column{
556 id: column
557
558- spacing: units.gu(1)
559- anchors{
560- top: eventInfo.bottom
561- right: parent.right
562- left:parent.left
563- margins: units.gu(2)
564+ width: parent.width
565+ anchors.top: titleContainer.bottom
566+
567+ ListItem {
568+ height: units.gu(6)
569+ Row{
570+ id: calendarNameRow
571+
572+ spacing: units.gu(1)
573+ anchors { verticalCenter: parent.verticalCenter; left: parent.left; right: parent.right; margins: units.gu(2) }
574+
575+ Label {
576+ text: i18n.tr("Calendar")
577+ }
578+
579+ UbuntuShape{
580+ id: calendarIndicator
581+ width: parent.height
582+ height: width
583+ color: collection.color
584+ anchors.verticalCenter: parent.verticalCenter
585+ }
586+
587+ Label{
588+ id:calendarName
589+ objectName: "calendarName"
590+ text: collection.name
591+ }
592+ }
593 }
594
595- Row{
596+ ListView{
597+ model: contactModel
598 width: parent.width
599- spacing: units.gu(1)
600- UbuntuShape{
601- id: calendarIndicator
602- width: parent.height
603- height: width
604- anchors.verticalCenter: parent.verticalCenter
605+ height: count !== 0 ? (count+1) * units.gu(7): 0
606+ interactive: false
607+
608+ section.property: "participationStatus"
609+ section.labelPositioning: ViewSection.InlineLabels
610+ section.delegate: ListItem {
611+ height: headerText.height + divider.height
612+ ListItemLayout {
613+ id: headerText
614+ title.text: {
615+ if (section === "0") {
616+ return i18n.tr("Not Attending")
617+ }
618+
619+ else if (section === "1") {
620+ return i18n.tr("Attending")
621+ }
622+
623+ else if (section === "2") {
624+ return i18n.tr("No Reply")
625+ }
626+ }
627+ title.font.weight: Font.DemiBold
628+ }
629 }
630- Label{
631- id:calendarName
632- objectName: "calendarName"
633- anchors.verticalCenter: parent.verticalCenter
634+
635+ delegate: ListItem {
636+ height: contactListItemLayout.height + divider.height
637+ ListItemLayout {
638+ id: contactListItemLayout
639+ title.text: name
640+ }
641 }
642 }
643
644- Label{
645+ ListItem {
646 id: descLabel
647- objectName: "descriptionLabel"
648- visible: text != ""
649- width: parent.width
650- wrapMode: Text.WordWrap
651+ height: descTitle.height + desc.implicitHeight + divider.height + units.gu(4)
652+ visible: desc.text !== ""
653+
654+ Label {
655+ id: descTitle
656+ text: i18n.tr("Description")
657+ anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(2); topMargin: units.gu(1.5) }
658+ }
659+
660+ Label {
661+ id: desc
662+ text: event.description
663+ textSize: Label.Small
664+ color: UbuntuColors.graphite
665+ wrapMode: Text.WordWrap
666+ anchors { left: parent.left; right: parent.right; top: descTitle.bottom; margins: units.gu(2); topMargin: units.gu(0.5) }
667+ }
668 }
669
670- Column {
671- anchors{
672- right: parent.right
673- left:parent.left
674- margins: units.gu(-2)
675- }
676-
677- ListItem.Header {
678- text: i18n.tr("Guests")
679- visible: contactModel.count !== 0
680- }
681-
682- //Guest Entery Model starts
683- Column{
684- id: contactList
685- objectName: 'contactList'
686-
687- anchors {
688- left: parent.left
689- right: parent.right
690- }
691-
692- ListModel {
693- id: contactModel
694- }
695-
696- Repeater{
697- model: contactModel
698- delegate: ListItem.Standard {
699- Label {
700- text: name
701- objectName: "eventGuest%1".arg(index)
702- color: UbuntuColors.midAubergine
703- anchors {
704- left: parent.left
705- leftMargin: units.gu(2)
706- verticalCenter: parent.verticalCenter
707- }
708- }
709-
710- control: CheckBox {
711- enabled: false
712- checked: participationStatus
713- }
714- }
715- }
716- }
717- //Guest Entries ends
718-
719- ListItem.Subtitled {
720- id: reminderHeader
721- text: i18n.tr("Reminder")
722+ ListItem {
723+ height: reminderLayout.height + divider.height
724+ ListItemLayout {
725+ id: reminderLayout
726+ title.text: i18n.tr("Reminder")
727 }
728 }
729 }
730
731=== modified file 'HeaderDateComponent.qml'
732--- HeaderDateComponent.qml 2016-03-02 19:55:52 +0000
733+++ HeaderDateComponent.qml 2016-03-16 16:44:44 +0000
734@@ -87,7 +87,7 @@
735 var lunarDate = Lunar.calendar.solar2lunar(date.getFullYear(),
736 date.getMonth() + 1,
737 date.getDate())
738- return i18n.tr("%1 %2 %3").arg(lunarDate.IDayCn).arg(lunarDate.gzDay).arg(lunarDate.isTerm ? lunarDate.Term : "")
739+ return ("%1 %2 %3").arg(lunarDate.IDayCn).arg(lunarDate.gzDay).arg(lunarDate.isTerm ? lunarDate.Term : "")
740 } else {
741 return date.getDate();
742 }
743
744=== modified file 'MonthComponent.qml'
745--- MonthComponent.qml 2016-03-02 19:55:52 +0000
746+++ MonthComponent.qml 2016-03-16 16:44:44 +0000
747@@ -312,6 +312,8 @@
748 id: weekNumLabel;
749 objectName: "weekNumLabel";
750 width: parent.width;
751+ // TRANSLATORS: This is shown in the month view as "Wk" as a title
752+ // to indicate the week numbers. It should be a max of up to 3 characters.
753 text: i18n.tr("Wk");
754 horizontalAlignment: Text.AlignHCenter;
755 verticalAlignment: Text.AlignVCenter;
756
757=== modified file 'po/com.ubuntu.calendar.pot'
758--- po/com.ubuntu.calendar.pot 2016-03-03 22:32:56 +0000
759+++ po/com.ubuntu.calendar.pot 2016-03-16 16:44:44 +0000
760@@ -8,7 +8,7 @@
761 msgstr ""
762 "Project-Id-Version: \n"
763 "Report-Msgid-Bugs-To: \n"
764-"POT-Creation-Date: 2016-03-04 04:02+0530\n"
765+"POT-Creation-Date: 2016-03-16 22:10+0530\n"
766 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
767 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
768 "Language-Team: LANGUAGE <LL@li.org>\n"
769@@ -18,7 +18,7 @@
770 "Content-Transfer-Encoding: 8bit\n"
771 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
772
773-#: ../AgendaView.qml:50 ../calendar.qml:292 ../calendar.qml:518
774+#: ../AgendaView.qml:50 ../calendar.qml:321 ../calendar.qml:547
775 msgid "Agenda"
776 msgstr ""
777
778@@ -34,11 +34,6 @@
779 msgid "Enable calendars"
780 msgstr ""
781
782-#: ../AgendaView.qml:164
783-#, qt-format
784-msgid "%1 %2 %3 %4 %5"
785-msgstr ""
786-
787 #: ../AgendaView.qml:191
788 msgid "no event name set"
789 msgstr ""
790@@ -51,24 +46,24 @@
791 msgid "New event"
792 msgstr ""
793
794-#. TRANSLATORS: the first parameter refers to the number of all-day events
795-#. on a given day. "Ev." is short form for "Events".
796-#. Please keep the translation of "Ev." to 3 characters only, as the week view
797-#. where it's shown has limited space
798-#: ../AllDayEventComponent.qml:150
799+#. TRANSLATORS: Please keep the translation of this string to a max of
800+#. 5 characters as the week view where it is shown has limited space.
801+#: ../AllDayEventComponent.qml:148
802 #, qt-format
803-msgid "%1 ev."
804-msgstr ""
805+msgid "%1 event"
806+msgid_plural "%1 events"
807+msgstr[0] ""
808+msgstr[1] ""
809
810 #. TRANSLATORS: the argument refers to the number of all day events
811-#: ../AllDayEventComponent.qml:154
812+#: ../AllDayEventComponent.qml:152
813 #, qt-format
814 msgid "%1 all day event"
815 msgid_plural "%1 all day events"
816 msgstr[0] ""
817 msgstr[1] ""
818
819-#: ../CalendarChoicePopup.qml:34 ../EventActions.qml:51
820+#: ../CalendarChoicePopup.qml:34 ../EventActions.qml:52
821 msgid "Calendars"
822 msgstr ""
823
824@@ -78,11 +73,11 @@
825
826 #. TRANSLATORS: Please translate this string to 15 characters only.
827 #. Currently ,there is no way we can increase width of action menu currently.
828-#: ../CalendarChoicePopup.qml:48 ../EventActions.qml:36
829+#: ../CalendarChoicePopup.qml:48 ../EventActions.qml:37
830 msgid "Sync"
831 msgstr ""
832
833-#: ../CalendarChoicePopup.qml:48 ../EventActions.qml:36
834+#: ../CalendarChoicePopup.qml:48 ../EventActions.qml:37
835 msgid "Syncing"
836 msgstr ""
837
838@@ -95,7 +90,7 @@
839 msgstr ""
840
841 #: ../ColorPickerDialog.qml:55 ../DeleteConfirmationDialog.qml:60
842-#: ../EditEventConfirmationDialog.qml:53 ../NewEvent.qml:340
843+#: ../EditEventConfirmationDialog.qml:53 ../NewEvent.qml:343
844 msgid "Cancel"
845 msgstr ""
846
847@@ -107,23 +102,17 @@
848 msgid "Search contact"
849 msgstr ""
850
851-#: ../DayView.qml:71 ../MonthView.qml:50 ../WeekView.qml:54 ../YearView.qml:57
852+#: ../DayView.qml:72 ../MonthView.qml:50 ../WeekView.qml:55 ../YearView.qml:57
853 msgid "Today"
854 msgstr ""
855
856 #. TRANSLATORS: this is a time formatting string,
857 #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
858 #. It's used in the header of the month and week views
859-#: ../DayView.qml:115 ../DayView.qml:203 ../MonthView.qml:78
860-#: ../WeekView.qml:137 ../WeekView.qml:256
861+#: ../DayView.qml:122 ../MonthView.qml:78 ../WeekView.qml:144
862 msgid "MMMM yyyy"
863 msgstr ""
864
865-#: ../DayView.qml:201 ../MonthView.qml:73 ../WeekView.qml:254
866-#, qt-format
867-msgid "%1 %2"
868-msgstr ""
869-
870 #: ../DeleteConfirmationDialog.qml:31
871 msgid "Delete Recurring Event"
872 msgstr ""
873@@ -151,11 +140,11 @@
874 msgid "Delete this"
875 msgstr ""
876
877-#: ../DeleteConfirmationDialog.qml:51 ../NewEvent.qml:347
878+#: ../DeleteConfirmationDialog.qml:51 ../NewEvent.qml:350
879 msgid "Delete"
880 msgstr ""
881
882-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:335
883+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:338
884 msgid "Edit Event"
885 msgstr ""
886
887@@ -173,73 +162,51 @@
888 msgid "Edit this"
889 msgstr ""
890
891-#: ../EventActions.qml:63 ../Settings.qml:29
892+#: ../EventActions.qml:64 ../Settings.qml:29
893 msgid "Settings"
894 msgstr ""
895
896 #. TRANSLATORS: the first argument (%1) refers to a start time for an event,
897 #. while the second one (%2) refers to the end time
898-#: ../EventBubble.qml:97
899+#: ../EventBubble.qml:100
900 #, qt-format
901 msgid "%1 - %2"
902 msgstr ""
903
904-#. TRANSLATORS: the first argument (%1) refers to a time for an event,
905-#. while the second one (%2) refers to title of event
906-#: ../EventBubble.qml:108 ../EventBubble.qml:113
907-#, qt-format
908-msgid "%1 <b>%2</b>"
909-msgstr ""
910-
911-#: ../EventDetails.qml:44 ../NewEvent.qml:483
912+#: ../EventDetails.qml:37 ../NewEvent.qml:486
913 msgid "Event Details"
914 msgstr ""
915
916-#. TRANSLATORS: the first parameter refers to the name of event calendar.
917-#: ../EventDetails.qml:69
918-#, qt-format
919-msgid "%1 Calendar"
920-msgstr ""
921-
922-#: ../EventDetails.qml:143
923-#, qt-format
924-msgid "%1 %2 %3 - %4 %5 %6 (All Day)"
925-msgstr ""
926-
927-#: ../EventDetails.qml:147
928-#, qt-format
929-msgid "%1 - %2 (All Day)"
930-msgstr ""
931-
932-#: ../EventDetails.qml:153
933-#, qt-format
934-msgid "%1 %2 %3 (All Day)"
935-msgstr ""
936-
937-#: ../EventDetails.qml:156
938-#, qt-format
939-msgid "%1 (All Day)"
940-msgstr ""
941-
942-#: ../EventDetails.qml:162
943-#, qt-format
944-msgid "%1 %2 %3, %4 - %5 %6 %7, %8"
945-msgstr ""
946-
947-#: ../EventDetails.qml:171
948-#, qt-format
949-msgid "%1 %2 %3, %4 - %5"
950-msgstr ""
951-
952-#: ../EventDetails.qml:238
953+#: ../EventDetails.qml:40
954 msgid "Edit"
955 msgstr ""
956
957-#: ../EventDetails.qml:389 ../NewEvent.qml:589
958-msgid "Guests"
959-msgstr ""
960-
961-#: ../EventDetails.qml:432 ../EventReminder.qml:35 ../NewEvent.qml:701
962+#: ../EventDetails.qml:145 ../TimeLineHeader.qml:66
963+msgid "All Day"
964+msgstr ""
965+
966+#: ../EventDetails.qml:324 ../NewEvent.qml:552
967+#: com.ubuntu.calendar_calendar.desktop.in.in.h:1
968+msgid "Calendar"
969+msgstr ""
970+
971+#: ../EventDetails.qml:357
972+msgid "Not Attending"
973+msgstr ""
974+
975+#: ../EventDetails.qml:361
976+msgid "Attending"
977+msgstr ""
978+
979+#: ../EventDetails.qml:365
980+msgid "No Reply"
981+msgstr ""
982+
983+#: ../EventDetails.qml:388 ../NewEvent.qml:518
984+msgid "Description"
985+msgstr ""
986+
987+#: ../EventDetails.qml:406 ../EventReminder.qml:35 ../NewEvent.qml:710
988 msgid "Reminder"
989 msgstr ""
990
991@@ -262,7 +229,7 @@
992 #. TRANSLATORS: this refers to how often a recurrent event repeats
993 #. and it is shown as the header of the option selector to choose
994 #. its repetition
995-#: ../EventRepetition.qml:242 ../NewEvent.qml:685
996+#: ../EventRepetition.qml:242 ../NewEvent.qml:688
997 msgid "Repeats"
998 msgstr ""
999
1000@@ -293,11 +260,6 @@
1001 msgid "Weekly on %1"
1002 msgstr ""
1003
1004-#: ../HeaderDateComponent.qml:90
1005-#, qt-format
1006-msgid "%1 %2 %3"
1007-msgstr ""
1008-
1009 #: ../LimitLabelModel.qml:25
1010 msgid "Never"
1011 msgstr ""
1012@@ -310,59 +272,62 @@
1013 msgid "After Date"
1014 msgstr ""
1015
1016-#: ../MonthComponent.qml:315
1017+#. TRANSLATORS: This is shown in the month view as "Wk" as a title
1018+#. to indicate the week numbers. It should be a max of up to 3 characters.
1019+#: ../MonthComponent.qml:317
1020 msgid "Wk"
1021 msgstr ""
1022
1023-#: ../NewEvent.qml:171
1024+#: ../MonthView.qml:73 ../WeekView.qml:131
1025+#, qt-format
1026+msgid "%1 %2"
1027+msgstr ""
1028+
1029+#: ../NewEvent.qml:174
1030 msgid "End time can't be before start time"
1031 msgstr ""
1032
1033-#: ../NewEvent.qml:335 ../NewEventBottomEdge.qml:52
1034+#: ../NewEvent.qml:338 ../NewEventBottomEdge.qml:52
1035 msgid "New Event"
1036 msgstr ""
1037
1038-#: ../NewEvent.qml:364
1039+#: ../NewEvent.qml:367
1040 msgid "Save"
1041 msgstr ""
1042
1043-#: ../NewEvent.qml:375
1044+#: ../NewEvent.qml:378
1045 msgid "Error"
1046 msgstr ""
1047
1048-#: ../NewEvent.qml:377
1049+#: ../NewEvent.qml:380
1050 msgid "OK"
1051 msgstr ""
1052
1053-#: ../NewEvent.qml:437
1054+#: ../NewEvent.qml:440
1055 msgid "From"
1056 msgstr ""
1057
1058-#: ../NewEvent.qml:450
1059+#: ../NewEvent.qml:453
1060 msgid "To"
1061 msgstr ""
1062
1063-#: ../NewEvent.qml:467
1064+#: ../NewEvent.qml:470
1065 msgid "All day event"
1066 msgstr ""
1067
1068-#: ../NewEvent.qml:497
1069+#: ../NewEvent.qml:500
1070 msgid "Event Name"
1071 msgstr ""
1072
1073-#: ../NewEvent.qml:515
1074-msgid "Description"
1075-msgstr ""
1076-
1077-#: ../NewEvent.qml:534
1078+#: ../NewEvent.qml:537
1079 msgid "Location"
1080 msgstr ""
1081
1082-#: ../NewEvent.qml:549 com.ubuntu.calendar_calendar.desktop.in.in.h:1
1083-msgid "Calendar"
1084+#: ../NewEvent.qml:592
1085+msgid "Guests"
1086 msgstr ""
1087
1088-#: ../NewEvent.qml:598
1089+#: ../NewEvent.qml:601
1090 msgid "Add Guest"
1091 msgstr ""
1092
1093@@ -463,11 +428,7 @@
1094 msgid "W%1"
1095 msgstr ""
1096
1097-#: ../TimeLineHeader.qml:66
1098-msgid "All Day"
1099-msgstr ""
1100-
1101-#: ../WeekView.qml:131 ../WeekView.qml:132
1102+#: ../WeekView.qml:138 ../WeekView.qml:139
1103 msgid "MMM"
1104 msgstr ""
1105
1106@@ -476,26 +437,26 @@
1107 msgid "Year %1"
1108 msgstr ""
1109
1110-#: ../calendar.qml:46
1111+#: ../calendar.qml:48
1112 msgid ""
1113 "Calendar app accept four arguments: --starttime, --endtime, --newevent and --"
1114 "eventid. They will be managed by system. See the source for a full comment "
1115 "about them"
1116 msgstr ""
1117
1118-#: ../calendar.qml:260 ../calendar.qml:434
1119+#: ../calendar.qml:289 ../calendar.qml:463
1120 msgid "Year"
1121 msgstr ""
1122
1123-#: ../calendar.qml:268 ../calendar.qml:455
1124+#: ../calendar.qml:297 ../calendar.qml:484
1125 msgid "Month"
1126 msgstr ""
1127
1128-#: ../calendar.qml:276 ../calendar.qml:476
1129+#: ../calendar.qml:305 ../calendar.qml:505
1130 msgid "Week"
1131 msgstr ""
1132
1133-#: ../calendar.qml:284 ../calendar.qml:497
1134+#: ../calendar.qml:313 ../calendar.qml:526
1135 msgid "Day"
1136 msgstr ""
1137

Subscribers

People subscribed via source and target branches

to status/vote changes: