diff --git a/NEWS b/NEWS index aa305b1cf..695bf3c68 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ Enhancements - [web] new SOGoHelpURL preference to set a custom URL for SOGo help (#2768) - [web] now able to copy/move events and also duplicate them (#3196) - [web] improve preferences validation and check for unsaved changes + - [web] display events and tasks priorities in list and day/week views Bug fixes - [web] fixed missing columns in SELECT statements (PostgreSQL) diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index e26b95849..67800b4b1 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -12,29 +12,35 @@ "Switch to month view" = "Switch to month view"; "Switch to multi-columns day view" = "Switch to multi-columns day view"; "Reload all calendars" = "Reload all calendars"; + /* Tabs */ "Date" = "Date"; "Calendars" = "Calendars"; "No events for selected criteria" = "No events for selected criteria"; "No tasks for selected criteria" = "No tasks for selected criteria"; + /* Day */ "DayOfTheMonth" = "Day of the month"; "dayLabelFormat" = "%m/%d/%Y"; "today" = "Today"; "Previous Day" = "Previous Day"; "Next Day" = "Next Day"; + /* Week */ "Week" = "Week"; "this week" = "this week"; "Week %d" = "Week %d"; "Previous Week" = "Previous Week"; "Next Week" = "Next Week"; + /* Month */ "this month" = "this month"; "Previous Month" = "Previous Month"; "Next Month" = "Next Month"; + /* Year */ "this year" = "this year"; + /* Menu */ "Calendar" = "Calendar"; "Contacts" = "Contacts"; @@ -57,11 +63,14 @@ "A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "Compose E-Mail to All Attendees"; "Compose E-Mail to Undecided Attendees" = "Compose E-Mail to Undecided Attendees"; + /* Folders */ "Personal calendar" = "Personal calendar"; + /* Misc */ "OpenGroupware.org" = "OpenGroupware.org"; "Forbidden" = "Forbidden"; + /* acls */ "Access rights to" = "Access rights to"; "For user" = "For user"; @@ -84,6 +93,7 @@ = "This person can create objects in my calendar."; "This person can erase objects from my calendar." = "This person can erase objects from my calendar."; + /* Button Titles */ "Subscribe to a Calendar..." = "Subscribe to a Calendar..."; "Remove the selected Calendar" = "Remove the selected Calendar"; @@ -104,6 +114,7 @@ "Save" = "Save"; "show_rejected_apts" = "Show rejected appointments"; "hide_rejected_apts" = "Hide rejected appointments"; + /* Schedule */ "Schedule" = "Schedule"; "No appointments found" = "No appointments found"; @@ -116,6 +127,7 @@ "more attendees" = "More Attendees"; "Hide already accepted and rejected appointments" = "Hide already accepted and rejected appointments"; "Show already accepted and rejected appointments" = "Show already accepted and rejected appointments"; + /* Print view */ "LIST" = "List"; "Print Settings" = "Print Settings"; @@ -129,6 +141,7 @@ "Display events and tasks colors" = "Display events and tasks colors"; "Borders" = "Borders"; "Backgrounds" = "Backgrounds"; + /* Appointments */ "Appointment viewer" = "Appointment Viewer"; "Appointment editor" = "Appointment Editor"; @@ -166,15 +179,19 @@ "attributes" = "attributes"; "attendees" = "attendees"; "delegated from" = "delegated from"; + /* checkbox title */ "is private" = "is private"; + /* classification */ "Public" = "Public"; "Private" = "Private"; + /* text used in overviews and tooltips */ "empty title" = "Empty title"; "private appointment" = "Private appointment"; "Change..." = "Change..."; + /* Appointments (participation state) */ "partStat_NEEDS-ACTION" = "I will confirm later"; "partStat_ACCEPTED" = "I will attend"; @@ -182,10 +199,12 @@ "partStat_TENTATIVE" = "I might attend"; "partStat_DELEGATED" = "I delegate"; "partStat_OTHER" = "Other"; + /* Appointments (error messages) */ "Conflicts found!" = "Conflicts found!"; "Invalid iCal data!" = "Invalid iCal data!"; "Could not create iCal data!" = "Could not create iCal data!"; + /* Searching */ "view_all" = "All"; "view_today" = "Today"; @@ -209,11 +228,13 @@ "check for conflicts" = "Check for conflicts"; "URL" = "URL"; "newAttendee" = "Add attendee"; + /* calendar modes */ "Overview" = "Overview"; "Chart" = "Chart"; "List" = "List"; "Columns" = "Columns"; + /* Priorities */ "prio_0" = "Not specified"; "prio_1" = "High"; @@ -225,6 +246,7 @@ "prio_7" = "Low"; "prio_8" = "Low"; "prio_9" = "Low"; + /* access classes (privacy) */ "PUBLIC_vevent" = "Public Event"; "CONFIDENTIAL_vevent" = "Confidential Event"; @@ -232,6 +254,7 @@ "PUBLIC_vtodo" = "Public Task"; "CONFIDENTIAL_vtodo" = "Confidential Task"; "PRIVATE_vtodo" = "Private Task"; + /* status type */ "status_" = "Not specified"; "status_NOT-SPECIFIED" = "Not specified"; @@ -241,6 +264,16 @@ "status_NEEDS-ACTION" = "Needs Action"; "status_IN-PROCESS" = "In Process"; "status_COMPLETED" = "Completed on"; + +/* Priority level */ +"low" = "low"; + +/* Priority level */ +"normal" = "normal"; + +/* Priority level */ +"high" = "high"; + /* Cycles */ "cycle_once" = "cycle_once"; "cycle_daily" = "cycle_daily"; @@ -264,10 +297,12 @@ "Week(s)" = "Week(s)"; "On" = "On"; "Month(s)" = "Month(s)"; + /* [Event recurrence editor] Ex: _The_ first Sunday */ "The" = "The"; "Recur on day(s)" = "Recur on day(s)"; "Year(s)" = "Year(s)"; + /* [Event recurrence editor] Ex: Every first Sunday _of_ April */ "cycle_of" = "of"; "No end date" = "No end date"; @@ -285,6 +320,7 @@ "Fourth" = "Fourth"; "Fift" = "Fift"; "Last" = "Last"; + /* Appointment categories */ "category_none" = "None"; "category_labels" = "Anniversary,Birthday,Business,Calls,Clients,Competition,Customer,Favorites,Follow up,Gifts,Holidays,Ideas,Meeting,Issues,Miscellaneous,Personal,Projects,Public Holiday,Status,Suppliers,Travel,Vacation"; @@ -329,12 +365,15 @@ "zoom_100" = "100%"; "zoom_50" = "50%"; "zoom_25" = "25%"; + /* transparency */ "Show Time as Free" = "Show Time as Free"; + /* email notifications */ "Send Appointment Notifications" = "Send Appointment Notifications"; "From" = "From"; "To" = "To"; + /* validation errors */ validate_notitle = "No title is set, continue?"; validate_invalid_startdate = "Incorrect startdate field!"; @@ -343,10 +382,12 @@ validate_endbeforestart = "The end date that you entered occurs before the st "Events" = "Events"; "Tasks" = "Tasks"; "Show completed tasks" = "Show completed tasks"; + /* tabs */ "Task" = "Task"; "Event" = "Event"; "Recurrence" = "Recurrence"; + /* toolbar */ "New Event" = "New Event"; "New Task" = "New Task"; @@ -357,9 +398,11 @@ validate_endbeforestart = "The end date that you entered occurs before the st "Week View" = "Week View"; "Month View" = "Month View"; "Reload" = "Reload"; + /* Number of selected components in events or tasks list */ "selected" = "selected"; "eventPartStatModificationError" = "Your participation status could not be modified."; + /* menu */ "New Event..." = "New Event..."; "New Task..." = "New Task..."; @@ -375,6 +418,7 @@ validate_endbeforestart = "The end date that you entered occurs before the st = "You cannot remove nor unsubscribe from your personal calendar."; "Are you sure you want to delete the calendar \"%{0}\"?" = "Are you sure you want to delete the calendar \"%{0}\"?"; + /* Legend */ "Participant" = "Participant"; "Optional Participant" = "Optional Participant"; @@ -388,6 +432,7 @@ validate_endbeforestart = "The end date that you entered occurs before the st "Busy" = "Busy"; "Maybe busy" = "Maybe busy"; "No free-busy information" = "No free-busy information"; + /* FreeBusy panel buttons and labels */ "Suggest time slot" = "Suggest time slot"; "Zoom" = "Zoom"; @@ -401,12 +446,14 @@ validate_endbeforestart = "The end date that you entered occurs before the st "and" = "and"; "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?" = "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"; + /* events list */ "Due" = "Due"; "(Private Event)" = "(Private Event)"; vevent_class0 = "(Public event)"; vevent_class1 = "(Private event)"; vevent_class2 = "(Confidential event)"; + /* tasks list */ "Descending Order" = "Descending Order"; vtodo_class0 = "(Public task)"; @@ -422,6 +469,7 @@ vtodo_class2 = "(Confidential task)"; "Edit All Occurrences" = "Edit All Occurrences"; "Update This Occurrence" = "Update This Occurrence"; "Update All Occurrences" = "Update All Occurrences"; + /* Properties dialog */ "Color" = "Color"; "Include in free-busy" = "Include in free-busy"; @@ -438,9 +486,11 @@ vtodo_class2 = "(Confidential task)"; "Email Address" = "Email Address"; "Export" = "Export"; + /* Show only the calendar for which the menu is displayed */ "Show Only This Calendar" = "Show Only This Calendar"; + /* Show all calendar (personal, subscriptions and web) */ "Show All Calendars" = "Show All Calendars"; @@ -449,6 +499,7 @@ vtodo_class2 = "(Confidential task)"; "CalDAV URL" = "CalDAV URL "; "WebDAV ICS URL" = "WebDAV ICS URL"; "WebDAV XML URL" = "WebDAV XML URL"; + /* Error messages */ "dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1."; "weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1."; diff --git a/UI/Scheduler/NSArray+Scheduler.h b/UI/Scheduler/NSArray+Scheduler.h index 19c5d4664..f3bb7113d 100644 --- a/UI/Scheduler/NSArray+Scheduler.h +++ b/UI/Scheduler/NSArray+Scheduler.h @@ -1,8 +1,6 @@ /* NSArray+Scheduler.m - this file is part of SOGo * - * Copyright (C) 2007-2010 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2007-2016 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,16 +34,17 @@ #define eventIsAllDayIndex 8 #define eventClassificationIndex 9 #define eventCategoryIndex 10 -#define eventPartMailsIndex 11 -#define eventPartStatesIndex 12 -#define eventOwnerIndex 13 -#define eventIsCycleIndex 14 -#define eventNextAlarmIndex 15 -#define eventRecurrenceIdIndex 16 -#define eventIsExceptionIndex 17 -#define eventEditableIndex 18 -#define eventErasableIndex 19 -#define eventOwnerIsOrganizerIndex 20 +#define eventPriorityIndex 11 +#define eventPartMailsIndex 12 +#define eventPartStatesIndex 13 +#define eventOwnerIndex 14 +#define eventIsCycleIndex 15 +#define eventNextAlarmIndex 16 +#define eventRecurrenceIdIndex 17 +#define eventIsExceptionIndex 18 +#define eventEditableIndex 19 +#define eventErasableIndex 20 +#define eventOwnerIsOrganizerIndex 21 // See [UIxCalListingActions initialize] #define taskNameIndex 0 diff --git a/UI/Scheduler/NSArray+Scheduler.m b/UI/Scheduler/NSArray+Scheduler.m index b7a83a291..f4fc06017 100644 --- a/UI/Scheduler/NSArray+Scheduler.m +++ b/UI/Scheduler/NSArray+Scheduler.m @@ -2,8 +2,6 @@ * * Copyright (C) 2007 Inverse inc. * - * Author: Wolfgang Sourdeau - * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index 90b83f9a0..2855439b2 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -1,6 +1,6 @@ /* UIxCalListingActions.m - this file is part of SOGo * - * Copyright (C) 2006-2015 Inverse inc. + * Copyright (C) 2006-2016 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -79,7 +79,7 @@ static NSArray *tasksFields = nil; @"calendarName", @"c_status", @"c_title", @"c_startdate", @"c_enddate", @"c_location", @"c_isallday", - @"c_classification", @"c_category", + @"c_classification", @"c_category", @"c_priority", @"c_partmails", @"c_partstates", @"c_owner", @"c_iscycle", @"c_nextalarm", @"c_recurrence_id", @"isException", @"viewable", @"editable", diff --git a/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox b/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox index 523072e02..88e3ba3dd 100644 --- a/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox +++ b/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox @@ -72,13 +72,16 @@
- + + {{editor.priorityLevel()}} +
diff --git a/UI/Templates/SchedulerUI/UIxCalMainView.wox b/UI/Templates/SchedulerUI/UIxCalMainView.wox index 2c920ac0e..f26aef9c7 100644 --- a/UI/Templates/SchedulerUI/UIxCalMainView.wox +++ b/UI/Templates/SchedulerUI/UIxCalMainView.wox @@ -531,7 +531,10 @@ ng-style="{ left: ($index * 3) + 'px' }">
-
{{event.c_title}}
+
+ {{event.c_priority}} + {{event.c_title}} +
{{event.c_location}}
@@ -573,7 +576,10 @@ ng-style="{ left: ($index * 3) + 'px' }">
-
{{task.c_title}}
+
+ {{task.c_priority}} + {{task.c_title}} +
diff --git a/UI/Templates/SchedulerUI/UIxTaskEditorTemplate.wox b/UI/Templates/SchedulerUI/UIxTaskEditorTemplate.wox index 68ce6b57d..3af8782d3 100644 --- a/UI/Templates/SchedulerUI/UIxTaskEditorTemplate.wox +++ b/UI/Templates/SchedulerUI/UIxTaskEditorTemplate.wox @@ -72,13 +72,16 @@
- + + {{editor.priorityLevel()}} +
diff --git a/UI/WebServerResources/js/Scheduler/ComponentController.js b/UI/WebServerResources/js/Scheduler/ComponentController.js index 022a7ef61..26dde3a0c 100644 --- a/UI/WebServerResources/js/Scheduler/ComponentController.js +++ b/UI/WebServerResources/js/Scheduler/ComponentController.js @@ -179,6 +179,7 @@ vm.addAttendee = addAttendee; vm.removeAttendee = removeAttendee; vm.addAttachUrl = addAttachUrl; + vm.priorityLevel = priorityLevel; vm.cancel = cancel; vm.save = save; vm.attendeeConflictError = false; @@ -243,6 +244,17 @@ vm.showAttendeesEditor = false; } + function priorityLevel() { + if (vm.component.priority) { + if (vm.component.priority > 5) + return l('low'); + else if (vm.component.priority > 4) + return l('normal'); + else + return l('high'); + } + } + function save(form, options) { if (form.$valid) { vm.component.$save(options) diff --git a/UI/WebServerResources/js/Scheduler/sgCalendarDayBlock.directive.js b/UI/WebServerResources/js/Scheduler/sgCalendarDayBlock.directive.js index e488c227d..dda675140 100644 --- a/UI/WebServerResources/js/Scheduler/sgCalendarDayBlock.directive.js +++ b/UI/WebServerResources/js/Scheduler/sgCalendarDayBlock.directive.js @@ -38,7 +38,9 @@ '
', - '
{{ block.component.summary }}', + '
', + ' {{block.component.c_priority}}', + ' {{ block.component.summary }}', ' ', // Component is reccurent ' ', diff --git a/UI/WebServerResources/scss/views/SchedulerUI.scss b/UI/WebServerResources/scss/views/SchedulerUI.scss index 91cc36f49..2cb8d4117 100644 --- a/UI/WebServerResources/scss/views/SchedulerUI.scss +++ b/UI/WebServerResources/scss/views/SchedulerUI.scss @@ -500,6 +500,17 @@ $quarter_height: 10px; } } + .sg-priority { + background-color: $colorGrey200; + border-radius: 50%; + color: $colorGrey700; + display: inline-block; + font-size: 11px; + font-weight: bold; + line-height: 1; + padding: 2px 5px; + } + .minutes15, .minutes30, .minutes45 { display: block; height: 25%;