summaryrefslogtreecommitdiff
path: root/rt/html
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html')
-rw-r--r--rt/html/Admin/CustomFields/GroupRights.html44
-rw-r--r--rt/html/Admin/CustomFields/Modify.html82
-rw-r--r--rt/html/Admin/CustomFields/Objects.html14
-rw-r--r--rt/html/Admin/CustomFields/UserRights.html28
-rw-r--r--rt/html/Admin/CustomFields/index.html35
-rw-r--r--rt/html/Admin/Elements/AddCustomFieldValue44
-rw-r--r--rt/html/Admin/Elements/ConfigureMyRT80
-rw-r--r--rt/html/Admin/Elements/CreateUserCalled10
-rw-r--r--rt/html/Admin/Elements/CustomFieldTabs6
-rw-r--r--rt/html/Admin/Elements/EditCustomField56
-rw-r--r--rt/html/Admin/Elements/EditCustomFieldValues24
-rw-r--r--rt/html/Admin/Elements/EditCustomFields34
-rw-r--r--rt/html/Admin/Elements/EditQueueWatchers12
-rw-r--r--rt/html/Admin/Elements/EditScrip242
-rw-r--r--rt/html/Admin/Elements/EditScrips34
-rw-r--r--rt/html/Admin/Elements/EditTemplates50
-rw-r--r--rt/html/Admin/Elements/EditUserComments14
-rwxr-xr-xrt/html/Admin/Elements/GlobalCustomFieldTabs6
-rw-r--r--rt/html/Admin/Elements/GroupTabs6
-rw-r--r--rt/html/Admin/Elements/Header6
-rw-r--r--rt/html/Admin/Elements/ListGlobalCustomFields8
-rw-r--r--rt/html/Admin/Elements/ListGlobalScrips19
-rw-r--r--rt/html/Admin/Elements/ModifyTemplate56
-rw-r--r--rt/html/Admin/Elements/ObjectCustomFields6
-rw-r--r--rt/html/Admin/Elements/PickCustomFields40
-rw-r--r--rt/html/Admin/Elements/PickObjects39
-rw-r--r--rt/html/Admin/Elements/QueueRightsForUser12
-rw-r--r--rt/html/Admin/Elements/QueueTabs6
-rw-r--r--rt/html/Admin/Elements/SelectCustomFieldLookupType12
-rw-r--r--rt/html/Admin/Elements/SelectCustomFieldType12
-rw-r--r--rt/html/Admin/Elements/SelectGroups12
-rw-r--r--rt/html/Admin/Elements/SelectModifyGroup8
-rw-r--r--rt/html/Admin/Elements/SelectModifyQueue8
-rw-r--r--rt/html/Admin/Elements/SelectModifyUser8
-rw-r--r--rt/html/Admin/Elements/SelectNewGroupMembers24
-rw-r--r--rt/html/Admin/Elements/SelectRights40
-rw-r--r--rt/html/Admin/Elements/SelectScrip18
-rw-r--r--rt/html/Admin/Elements/SelectScripAction18
-rw-r--r--rt/html/Admin/Elements/SelectScripCondition18
-rw-r--r--rt/html/Admin/Elements/SelectSingleOrMultiple6
-rw-r--r--rt/html/Admin/Elements/SelectStage12
-rw-r--r--rt/html/Admin/Elements/SelectTemplate22
-rw-r--r--rt/html/Admin/Elements/SelectUsers12
-rw-r--r--rt/html/Admin/Elements/SystemTabs11
-rw-r--r--rt/html/Admin/Elements/Tabs6
-rwxr-xr-xrt/html/Admin/Elements/ToolTabs6
-rw-r--r--rt/html/Admin/Elements/UserTabs9
-rw-r--r--rt/html/Admin/Global/CustomFields/Groups.html47
-rwxr-xr-xrt/html/Admin/Global/CustomFields/Queue-Tickets.html47
-rwxr-xr-xrt/html/Admin/Global/CustomFields/Queue-Transactions.html47
-rw-r--r--rt/html/Admin/Global/CustomFields/Users.html47
-rw-r--r--rt/html/Admin/Global/CustomFields/index.html8
-rw-r--r--rt/html/Admin/Global/GroupRights.html62
-rw-r--r--rt/html/Admin/Global/MyRT.html104
-rw-r--r--rt/html/Admin/Global/Scrip.html45
-rw-r--r--rt/html/Admin/Global/Scrips.html6
-rw-r--r--rt/html/Admin/Global/Template.html16
-rw-r--r--rt/html/Admin/Global/Templates.html6
-rw-r--r--rt/html/Admin/Global/UserRights.html30
-rw-r--r--rt/html/Admin/Global/index.html16
-rw-r--r--rt/html/Admin/Groups/CustomFields.html6
-rw-r--r--rt/html/Admin/Groups/GroupRights.html48
-rw-r--r--rt/html/Admin/Groups/History.html8
-rw-r--r--rt/html/Admin/Groups/Members.html78
-rw-r--r--rt/html/Admin/Groups/Modify.html48
-rw-r--r--rt/html/Admin/Groups/UserRights.html32
-rw-r--r--rt/html/Admin/Groups/index.html42
-rw-r--r--rt/html/Admin/Queues/CustomField.html6
-rw-r--r--rt/html/Admin/Queues/CustomFields.html6
-rw-r--r--rt/html/Admin/Queues/GroupRights.html60
-rw-r--r--rt/html/Admin/Queues/Modify.html96
-rw-r--r--rt/html/Admin/Queues/People.html50
-rw-r--r--rt/html/Admin/Queues/Scrip.html67
-rw-r--r--rt/html/Admin/Queues/Scrips.html8
-rw-r--r--rt/html/Admin/Queues/Template.html16
-rw-r--r--rt/html/Admin/Queues/Templates.html6
-rw-r--r--rt/html/Admin/Queues/UserRights.html28
-rw-r--r--rt/html/Admin/Queues/index.html24
-rw-r--r--rt/html/Admin/Tools/Configuration.html10
-rw-r--r--rt/html/Admin/Tools/index.html6
-rw-r--r--rt/html/Admin/Users/CustomFields.html6
-rw-r--r--rt/html/Admin/Users/History.html8
-rw-r--r--rt/html/Admin/Users/Memberships.html6
-rw-r--r--rt/html/Admin/Users/Modify.html302
-rw-r--r--rt/html/Admin/Users/MyRT.html132
-rw-r--r--rt/html/Admin/Users/index.html28
-rw-r--r--rt/html/Admin/autohandler6
-rw-r--r--rt/html/Admin/index.html12
-rw-r--r--rt/html/Approvals/Display.html14
-rw-r--r--rt/html/Approvals/Elements/Approve70
-rw-r--r--rt/html/Approvals/Elements/PendingMyApproval35
-rw-r--r--rt/html/Approvals/Elements/ShowDependency28
-rw-r--r--rt/html/Approvals/Elements/Tabs6
-rw-r--r--rt/html/Approvals/index.html6
-rw-r--r--rt/html/Download/CustomFieldValue/dhandler6
-rw-r--r--rt/html/Download/Tabular/dhandler6
-rw-r--r--rt/html/Elements/BevelBoxRaisedEnd10
-rw-r--r--rt/html/Elements/BevelBoxRaisedStart12
-rw-r--r--rt/html/Elements/Callback6
-rw-r--r--rt/html/Elements/Checkbox8
-rw-r--r--rt/html/Elements/CollectionAsTable/Header20
-rw-r--r--rt/html/Elements/CollectionAsTable/ParseFormat14
-rw-r--r--rt/html/Elements/CreateTicket12
-rw-r--r--rt/html/Elements/EditCustomField16
-rw-r--r--rt/html/Elements/EditCustomFieldBinary10
-rw-r--r--rt/html/Elements/EditCustomFieldCombobox68
-rw-r--r--rt/html/Elements/EditCustomFieldFreeform21
-rw-r--r--rt/html/Elements/EditCustomFieldImage12
-rw-r--r--rt/html/Elements/EditCustomFieldSelect84
-rw-r--r--rt/html/Elements/EditCustomFieldText10
-rw-r--r--rt/html/Elements/EditCustomFieldWikitext10
-rwxr-xr-xrt/html/Elements/EditLinks114
-rw-r--r--rt/html/Elements/Error22
-rw-r--r--rt/html/Elements/GotoTicket8
-rw-r--r--rt/html/Elements/ListActions30
-rw-r--r--rt/html/Elements/Login80
-rw-r--r--rt/html/Elements/Logo56
-rw-r--r--rt/html/Elements/MessageBox10
-rw-r--r--rt/html/Elements/MyAdminQueues54
-rw-r--r--rt/html/Elements/MyRT100
-rwxr-xr-xrt/html/Elements/MyReminders73
-rw-r--r--rt/html/Elements/MyRequests33
-rw-r--r--rt/html/Elements/MySupportQueues54
-rw-r--r--rt/html/Elements/MyTickets34
-rw-r--r--rt/html/Elements/QueryString13
-rw-r--r--rt/html/Elements/QueueSummary92
-rw-r--r--rt/html/Elements/Quicksearch59
-rw-r--r--rt/html/Elements/RT__Ticket/ColumnMap39
-rw-r--r--rt/html/Elements/Refresh22
-rw-r--r--rt/html/Elements/RefreshHomepage51
-rw-r--r--rt/html/Elements/ScrubHTML8
-rw-r--r--rt/html/Elements/Section15
-rw-r--r--rt/html/Elements/SelectAttachmentField18
-rw-r--r--rt/html/Elements/SelectBoolean17
-rw-r--r--rt/html/Elements/SelectCustomFieldOperator18
-rw-r--r--rt/html/Elements/SelectCustomFieldValue10
-rw-r--r--rt/html/Elements/SelectDate14
-rw-r--r--rt/html/Elements/SelectDateRelation16
-rw-r--r--rt/html/Elements/SelectDateType26
-rw-r--r--rt/html/Elements/SelectEqualityOperator16
-rw-r--r--rt/html/Elements/SelectGroups12
-rw-r--r--rt/html/Elements/SelectLang16
-rw-r--r--rt/html/Elements/SelectLinkType16
-rw-r--r--rt/html/Elements/SelectMatch18
-rw-r--r--rt/html/Elements/SelectNewTicketQueue45
-rw-r--r--rt/html/Elements/SelectOwner16
-rw-r--r--rt/html/Elements/SelectQueue69
-rw-r--r--rt/html/Elements/SelectResultsPerPage17
-rw-r--r--rt/html/Elements/SelectSortOrder14
-rw-r--r--rt/html/Elements/SelectStatus14
-rw-r--r--rt/html/Elements/SelectTicketSortBy12
-rw-r--r--rt/html/Elements/SelectTicketTypes12
-rwxr-xr-xrt/html/Elements/SelectTimeUnits57
-rw-r--r--rt/html/Elements/SelectUsers12
-rw-r--r--rt/html/Elements/SelectWatcherType14
-rw-r--r--rt/html/Elements/SetupSessionCookie126
-rw-r--r--rt/html/Elements/ShowCustomFieldBinary6
-rw-r--r--rt/html/Elements/ShowCustomFieldImage8
-rw-r--r--rt/html/Elements/ShowCustomFieldWikitext9
-rw-r--r--rt/html/Elements/ShowCustomFields73
-rw-r--r--rt/html/Elements/ShowLink8
-rwxr-xr-xrt/html/Elements/ShowLinks7
-rw-r--r--rt/html/Elements/ShowMemberships6
-rw-r--r--rt/html/Elements/ShowSearch126
-rw-r--r--rt/html/Elements/Submit65
-rw-r--r--rt/html/Elements/TitleBox11
-rw-r--r--rt/html/Elements/TitleBoxEnd21
-rw-r--r--rt/html/Elements/ValidateCustomFields81
-rw-r--r--rt/html/Helpers/CalPopup.html129
-rw-r--r--rt/html/NoAuth/Logout.html36
-rw-r--r--rt/html/NoAuth/Reminder.html6
-rw-r--r--rt/html/NoAuth/css/3.4-compat/body.css75
-rw-r--r--rt/html/NoAuth/css/3.4-compat/footer.css61
-rw-r--r--rt/html/NoAuth/css/3.4-compat/forms.css104
-rw-r--r--rt/html/NoAuth/css/3.4-compat/header.css88
-rw-r--r--rt/html/NoAuth/css/3.4-compat/login.css54
-rw-r--r--rt/html/NoAuth/css/3.4-compat/main.css69
-rw-r--r--rt/html/NoAuth/css/3.4-compat/misc.css49
-rw-r--r--rt/html/NoAuth/css/3.4-compat/nav.css106
-rw-r--r--rt/html/NoAuth/css/3.4-compat/quickbar.css82
-rw-r--r--rt/html/NoAuth/css/3.4-compat/ticket.css50
-rw-r--r--rt/html/NoAuth/css/3.4-compat/titlebox.css103
-rw-r--r--rt/html/NoAuth/css/3.4-compat/transactions.css83
-rw-r--r--rt/html/NoAuth/css/3.5-default/approvals.css97
-rwxr-xr-xrt/html/NoAuth/css/3.5-default/body.css81
-rw-r--r--rt/html/NoAuth/css/3.5-default/footer.css91
-rwxr-xr-xrt/html/NoAuth/css/3.5-default/forms.css136
-rw-r--r--rt/html/NoAuth/css/3.5-default/header.css152
-rw-r--r--rt/html/NoAuth/css/3.5-default/login.css85
-rw-r--r--rt/html/NoAuth/css/3.5-default/logo.css60
-rw-r--r--rt/html/NoAuth/css/3.5-default/main.css61
-rwxr-xr-xrt/html/NoAuth/css/3.5-default/misc.css91
-rw-r--r--rt/html/NoAuth/css/3.5-default/nav.css163
-rw-r--r--rt/html/NoAuth/css/3.5-default/quickbar.css98
-rw-r--r--rt/html/NoAuth/css/3.5-default/ticket.css57
-rw-r--r--rt/html/NoAuth/css/3.5-default/titlebox.css189
-rwxr-xr-xrt/html/NoAuth/css/3.5-default/transactions.css146
-rw-r--r--rt/html/NoAuth/css/autohandler53
-rw-r--r--rt/html/NoAuth/css/print.css85
-rw-r--r--rt/html/NoAuth/images/autohandler20
-rw-r--r--rt/html/NoAuth/images/bplogo.gifbin825 -> 755 bytes
-rw-r--r--rt/html/NoAuth/images/css/cb-light.gifbin0 -> 186 bytes
-rw-r--r--rt/html/NoAuth/images/css/cb.gifbin0 -> 163 bytes
-rw-r--r--rt/html/NoAuth/images/css/cbr-b2g.gifbin0 -> 135 bytes
-rw-r--r--rt/html/NoAuth/images/css/cbr-b2lb.gifbin0 -> 137 bytes
-rw-r--r--rt/html/NoAuth/images/css/cbr-gray.gifbin0 -> 137 bytes
-rw-r--r--rt/html/NoAuth/images/css/cbr-trans.gifbin0 -> 183 bytes
-rw-r--r--rt/html/NoAuth/images/css/cbr.gifbin0 -> 188 bytes
-rw-r--r--rt/html/NoAuth/images/css/ct-light.gifbin0 -> 162 bytes
-rw-r--r--rt/html/NoAuth/images/css/ct.gifbin0 -> 162 bytes
-rw-r--r--rt/html/NoAuth/images/css/ctr-b2g.gifbin0 -> 136 bytes
-rw-r--r--rt/html/NoAuth/images/css/ctr-b2lb.gifbin0 -> 114 bytes
-rw-r--r--rt/html/NoAuth/images/css/ctr-gray.gifbin0 -> 138 bytes
-rw-r--r--rt/html/NoAuth/images/css/ctr-trans.gifbin0 -> 182 bytes
-rw-r--r--rt/html/NoAuth/images/css/ctr.gifbin0 -> 188 bytes
-rw-r--r--rt/html/NoAuth/images/css/dark-arrow-up.pngbin0 -> 346 bytes
-rw-r--r--rt/html/NoAuth/images/css/dark-arrow.pngbin0 -> 337 bytes
-rw-r--r--rt/html/NoAuth/images/css/light-arrow-up.pngbin0 -> 348 bytes
-rw-r--r--rt/html/NoAuth/images/css/light-arrow.pngbin0 -> 340 bytes
-rw-r--r--rt/html/NoAuth/images/css/rolldown-arrow.gifbin0 -> 83 bytes
-rw-r--r--rt/html/NoAuth/images/css/rolldown-arrow.pngbin0 -> 259 bytes
-rw-r--r--rt/html/NoAuth/images/css/rollup-arrow.gifbin0 -> 82 bytes
-rw-r--r--rt/html/NoAuth/js/ahah.js80
-rw-r--r--rt/html/NoAuth/js/autohandler53
-rw-r--r--rt/html/NoAuth/js/cascaded.js66
-rw-r--r--rt/html/NoAuth/js/class.js62
-rw-r--r--rt/html/NoAuth/js/combobox.js265
-rw-r--r--rt/html/NoAuth/js/list.js159
-rw-r--r--rt/html/NoAuth/js/titlebox-state.js83
-rw-r--r--rt/html/NoAuth/js/util.js250
-rw-r--r--rt/html/Prefs/Elements/Tabs72
-rw-r--r--rt/html/Prefs/MyRT.html151
-rw-r--r--rt/html/Prefs/Quicksearch.html96
-rw-r--r--rt/html/Prefs/Search.html108
-rw-r--r--rt/html/Prefs/SearchOptions.html114
-rw-r--r--rt/html/REST/1.0/Forms/queue/default6
-rw-r--r--rt/html/REST/1.0/Forms/queue/ns6
-rw-r--r--rt/html/REST/1.0/Forms/ticket/attachments17
-rwxr-xr-xrt/html/REST/1.0/Forms/ticket/comment152
-rw-r--r--rt/html/REST/1.0/Forms/ticket/default73
-rw-r--r--rt/html/REST/1.0/Forms/ticket/history27
-rw-r--r--rt/html/REST/1.0/Forms/ticket/links10
-rwxr-xr-xrt/html/REST/1.0/Forms/ticket/merge96
-rwxr-xr-xrt/html/REST/1.0/Forms/ticket/take135
-rw-r--r--rt/html/REST/1.0/Forms/transaction/default143
-rw-r--r--rt/html/REST/1.0/Forms/user/default6
-rw-r--r--rt/html/REST/1.0/Forms/user/ns6
-rw-r--r--rt/html/REST/1.0/NoAuth/mail-gateway49
-rw-r--r--rt/html/REST/1.0/autohandler6
-rw-r--r--rt/html/REST/1.0/dhandler19
-rw-r--r--rt/html/REST/1.0/logout6
-rw-r--r--rt/html/REST/1.0/search/dhandler6
-rw-r--r--rt/html/REST/1.0/search/ticket31
-rw-r--r--rt/html/REST/1.0/ticket/comment8
-rw-r--r--rt/html/REST/1.0/ticket/link11
-rw-r--r--rt/html/REST/1.0/ticket/merge6
-rw-r--r--rt/html/Search/Build.html313
-rw-r--r--rt/html/Search/Chart148
-rw-r--r--rt/html/Search/Chart.html73
-rwxr-xr-xrt/html/Search/Edit.html12
-rw-r--r--rt/html/Search/Elements/BuildFormatString27
-rw-r--r--rt/html/Search/Elements/Chart139
-rw-r--r--rt/html/Search/Elements/DisplayOptions71
-rw-r--r--rt/html/Search/Elements/EditFormat30
-rw-r--r--rt/html/Search/Elements/EditQuery24
-rw-r--r--rt/html/Search/Elements/EditSearches57
-rw-r--r--rt/html/Search/Elements/NewListActions14
-rw-r--r--rt/html/Search/Elements/PickBasics65
-rw-r--r--rt/html/Search/Elements/PickCFs6
-rw-r--r--rt/html/Search/Elements/PickCriteria20
-rw-r--r--rt/html/Search/Elements/SearchPrivacy6
-rw-r--r--rt/html/Search/Elements/SearchesForObject65
-rw-r--r--rt/html/Search/Elements/SelectAndOr10
-rw-r--r--rt/html/Search/Elements/SelectChartType56
-rw-r--r--rt/html/Search/Elements/SelectGroup14
-rw-r--r--rt/html/Search/Elements/SelectGroupBy63
-rw-r--r--rt/html/Search/Elements/SelectLinks12
-rw-r--r--rt/html/Search/Elements/SelectPersonType16
-rw-r--r--rt/html/Search/Elements/SelectSearchObject6
-rw-r--r--rt/html/Search/Elements/SelectSearchesForObjects11
-rwxr-xr-xrt/html/Search/Results.html89
-rw-r--r--rt/html/Search/Results.rdf8
-rw-r--r--rt/html/Search/Results.tsv109
-rw-r--r--rt/html/Search/Simple.html93
-rw-r--r--rt/html/SelfService/Attachment/dhandler6
-rw-r--r--rt/html/SelfService/Closed.html15
-rw-r--r--rt/html/SelfService/Create.html92
-rwxr-xr-xrt/html/SelfService/CreateTicketInQueue.html6
-rw-r--r--rt/html/SelfService/Display.html63
-rw-r--r--rt/html/SelfService/Elements/GotoTicket8
-rw-r--r--rt/html/SelfService/Elements/Header6
-rw-r--r--rt/html/SelfService/Elements/MyRequests67
-rw-r--r--rt/html/SelfService/Elements/Tabs34
-rw-r--r--rt/html/SelfService/Error.html16
-rw-r--r--rt/html/SelfService/Prefs.html18
-rw-r--r--rt/html/SelfService/Update.html36
-rw-r--r--rt/html/SelfService/index.html14
-rw-r--r--rt/html/Ticket/Attachment/dhandler6
-rw-r--r--rt/html/Ticket/Create.html338
-rw-r--r--rt/html/Ticket/Display.html70
-rw-r--r--rt/html/Ticket/Elements/AddWatchers18
-rw-r--r--rt/html/Ticket/Elements/BulkLinks66
-rw-r--r--rt/html/Ticket/Elements/EditBasics75
-rw-r--r--rt/html/Ticket/Elements/EditCustomField6
-rw-r--r--rt/html/Ticket/Elements/EditCustomFields22
-rw-r--r--rt/html/Ticket/Elements/EditDates50
-rw-r--r--rt/html/Ticket/Elements/EditPeople32
-rw-r--r--rt/html/Ticket/Elements/EditWatchers17
-rwxr-xr-xrt/html/Ticket/Elements/FindAttachments6
-rwxr-xr-xrt/html/Ticket/Elements/LoadTextAttachments10
-rwxr-xr-xrt/html/Ticket/Elements/PreviewScrips31
-rw-r--r--rt/html/Ticket/Elements/Reminders168
-rw-r--r--rt/html/Ticket/Elements/ShowAttachments17
-rw-r--r--rt/html/Ticket/Elements/ShowBasics34
-rw-r--r--rt/html/Ticket/Elements/ShowCustomFields6
-rw-r--r--rt/html/Ticket/Elements/ShowDates70
-rw-r--r--rt/html/Ticket/Elements/ShowDependencies14
-rw-r--r--rt/html/Ticket/Elements/ShowGroupMembers13
-rw-r--r--rt/html/Ticket/Elements/ShowHistory84
-rw-r--r--rt/html/Ticket/Elements/ShowMembers12
-rw-r--r--rt/html/Ticket/Elements/ShowMessageHeaders42
-rw-r--r--rt/html/Ticket/Elements/ShowMessageStanza29
-rw-r--r--rt/html/Ticket/Elements/ShowPeople14
-rw-r--r--rt/html/Ticket/Elements/ShowRequestor39
-rw-r--r--rt/html/Ticket/Elements/ShowTime55
-rw-r--r--rt/html/Ticket/Elements/ShowTransaction64
-rw-r--r--rt/html/Ticket/Elements/ShowTransactionAttachments21
-rw-r--r--rt/html/Ticket/Elements/ShowUserEntry12
-rw-r--r--rt/html/Ticket/History.html8
-rw-r--r--rt/html/Ticket/Modify.html22
-rw-r--r--rt/html/Ticket/ModifyAll.html71
-rw-r--r--rt/html/Ticket/ModifyDates.html19
-rw-r--r--rt/html/Ticket/ModifyLinks.html16
-rw-r--r--rt/html/Ticket/ModifyPeople.html16
-rwxr-xr-xrt/html/Ticket/Reminders.html71
-rw-r--r--rt/html/Ticket/ShowEmailRecord.html8
-rw-r--r--rt/html/Ticket/Update.html76
-rw-r--r--rt/html/Tools/Elements/Tabs40
-rw-r--r--rt/html/Tools/MyDay.html78
-rw-r--r--rt/html/Tools/Offline.html38
-rw-r--r--rt/html/Tools/Reports/CreatedByDates.html94
-rw-r--r--rt/html/Tools/Reports/Elements/Tabs89
-rw-r--r--rt/html/Tools/Reports/ResolvedByDates.html95
-rw-r--r--rt/html/Tools/Reports/ResolvedByOwner.html70
-rw-r--r--rt/html/Tools/Reports/index.html50
-rw-r--r--rt/html/Tools/index.html52
-rw-r--r--rt/html/User/Delegation.html6
-rw-r--r--rt/html/User/Elements/DelegateRights18
-rw-r--r--rt/html/User/Elements/GroupTabs6
-rw-r--r--rt/html/User/Elements/Tabs12
-rw-r--r--rt/html/User/Groups/Members.html54
-rw-r--r--rt/html/User/Groups/Modify.html38
-rw-r--r--rt/html/User/Groups/index.html14
-rw-r--r--rt/html/User/Prefs.html168
-rw-r--r--rt/html/Widgets/ComboBox69
-rw-r--r--rt/html/Widgets/SavedSearch150
-rw-r--r--rt/html/Widgets/SelectionBox234
-rw-r--r--rt/html/Widgets/TitleBox54
-rwxr-xr-xrt/html/Widgets/TitleBoxEnd59
-rwxr-xr-xrt/html/Widgets/TitleBoxStart88
-rw-r--r--rt/html/autohandler343
-rw-r--r--rt/html/index.html87
-rw-r--r--rt/html/l6
363 files changed, 12718 insertions, 3496 deletions
diff --git a/rt/html/Admin/CustomFields/GroupRights.html b/rt/html/Admin/CustomFields/GroupRights.html
index 380fee479..a416327c5 100644
--- a/rt/html/Admin/CustomFields/GroupRights.html
+++ b/rt/html/Admin/CustomFields/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,46 +53,46 @@
&>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>">
+ <form method="post" action="GroupRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $CustomFieldObj->id %>" />
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $CustomFieldObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $CustomFieldObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/CustomFields/Modify.html b/rt/html/Admin/CustomFields/Modify.html
index 4c3c92114..0202f0ad6 100644
--- a/rt/html/Admin/CustomFields/Modify.html
+++ b/rt/html/Admin/CustomFields/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,15 +53,15 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD="POST" ACTION="Modify.html" NAME="ModifyCustomField">
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<%$id %>">
+<form method="post" action="Modify.html" name="ModifyCustomField">
+<input type="hidden" class="hidden" name="id" value="<%$id %>" />
<table>
<tr>
<td class="label"><&|/l&>Name</&></td>
-<td><input name="Name" VALUE="<%$CustomFieldObj->Name%>" SIZE=20></td></tr>
+<td><input name="Name" value="<%$CustomFieldObj->Name%>" size="20" /></td></tr>
<tr>
<td class="label"><&|/l&>Description</&></td>
-<td><input name="Description" VALUE="<%$CustomFieldObj->Description%>" SIZE=80></td>
+<td><input name="Description" value="<%$CustomFieldObj->Description%>" size="80" /></td>
</tr>
<tr>
@@ -77,23 +79,64 @@
</td>
</tr>
<tr>
+<td class="label"><&|/l&>Validation</&></td>
+<td>
+<& /Widgets/ComboBox,
+ Name => 'Pattern',
+ Default => $CustomFieldObj->Pattern,
+ Size => 20,
+ Values => [
+ '(?#Mandatory).',
+ '(?#Digits)^[\d.]+$',
+ '(?#Year)^[12]\d{3}$',
+ ],
+&>
+</td></tr>
+</tr>
+<tr>
<td class="label">&nbsp;</td>
<td>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+</td>
+</tr>
+<tr>
+<td class="label"><&|/l&>Link values to</&></td>
+</td>
+<td><input size="60" name="LinkValueTo" value="<%$CustomFieldObj->LinkValueTo%>" />
+<div class="hints">
+<&|/l&>RT can make this custom field's values into hyperlinks to another service.</&>
+<&|/l&>Fill in this field with a URL.</&>
+<&|/l&>RT will replace <tt>__id__</tt> and <tt>__CustomField__</tt> with the record id and custom field value, respectively</&>
+</div>
</td>
</tr>
+<tr>
+<td class="label"><&|/l&>Include page</&></td>
+</td>
+<td><input size="60" name="IncludeContentForValue" value="<%$CustomFieldObj->IncludeContentForValue%>" />
+<div class="hints">
+<&|/l&>RT can include content from another web service when showing this custom field.</&>
+<&|/l&>Fill in this field with a URL.</&>
+<&|/l&>RT will replace <tt>__id__</tt> and <tt>__CustomField__</tt> with the record id and custom field value, respectively</&>
+<i><&|/l&>Some browsers may only load content from the same domain as your RT server.</&></i>
+</div>
+</td>
+</tr>
+
+
+
</table>
-<BR>
-% if ($CustomFieldObj->Id && $CustomFieldObj->Type =~ /^Select/i) {
-<H2><&|/l&>Values</&></H2>
+<br />
+% if ($CustomFieldObj->Id && $CustomFieldObj->IsSelectionType) {
+<h2><&|/l&>Values</&></h2>
<div>
<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &>
<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &>
</div>
% }
<&/Elements/Submit&>
-</FORM>
+</form>
@@ -115,7 +158,8 @@ else {
my ( $val, $msg ) = $CustomFieldObj->Create(Name => $Name,
TypeComposite => $TypeComposite,
LookupType => $LookupType,
- Description => $Description,);
+ Description => $Description,
+ Pattern => $Pattern,);
$m->comp("/Elements/Error", Why => loc( "Could not create CustomField", $msg ) ) unless ($val);
push @results, $msg;
$title = loc( 'Created CustomField [_1]', $CustomFieldObj->Name() );
@@ -124,7 +168,7 @@ else {
$CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc('No CustomField') );
$title = loc( 'Editing CustomField [_1]', $CustomFieldObj->Name() );
- my @attribs = qw( Name TypeComposite LookupType Description);
+ my @attribs = qw( Pattern Name TypeComposite LookupType Description LinkValueTo IncludeContentForValue);
my @aresults = UpdateRecordObject( AttributesRef => \@attribs,
Object => $CustomFieldObj,
ARGSRef => \%ARGS );
@@ -167,7 +211,7 @@ foreach my $key (keys %ARGS) {
# Update any existing values
my $values = $CustomFieldObj->ValuesObj;
while (my $value = $values->Next) {
- foreach my $attr qw(Name Description SortOrder) {
+ foreach my $attr qw(Name Description SortOrder Category) {
my $param = $paramtag.$value->Id."-".$attr;
if ( $ARGS{$param} && ($value->$attr() ne $ARGS{$param})) {
@@ -184,9 +228,10 @@ while (my $value = $values->Next) {
# Add any new values
if ($ARGS{$paramtag."new-Name"}) {
- my ($id, $msg) = $CustomFieldObj->AddValue ( Name => $ARGS{$paramtag."new-Name"},
- Description => $ARGS{$paramtag."new-Description"},
- SortOrder => $ARGS{$paramtag."new-SortOrder"});
+ my ($id, $msg) = $CustomFieldObj->AddValue (
+ map { $_ => $ARGS{$paramtag."new-$_"} }
+ qw( Name Description SortOrder Category )
+ );
push (@results, $msg);
}
@@ -206,6 +251,7 @@ $LookupType => undef
$MaxValues => undef
$SortOrder => undef
$Description => undef
+$Pattern => undef
$Name => undef
$SetEnabled => undef
$Enabled => undef
diff --git a/rt/html/Admin/CustomFields/Objects.html b/rt/html/Admin/CustomFields/Objects.html
index 8f9e3657b..d829a0da3 100644
--- a/rt/html/Admin/CustomFields/Objects.html
+++ b/rt/html/Admin/CustomFields/Objects.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,9 +54,9 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="Objects.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $id %>">
-<INPUT TYPE=HIDDEN NAME="UpdateObjs" VALUE="1">
+<form action="Objects.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<% $id %>" />
+<input type="hidden" class="hidden" name="UpdateObjs" value="1" />
<h2><&|/l&>Selected objects</&></h2>
<& /Admin/Elements/PickObjects, Objects => \@AssignedObjs, id => $id, Checked => 1 &>
@@ -62,7 +64,7 @@
<& /Admin/Elements/PickObjects, Objects => \@UnassignedObjs, id => $id &>
<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &>
-</FORM>
+</form>
<%INIT>
my $CF = RT::CustomField->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/CustomFields/UserRights.html b/rt/html/Admin/CustomFields/UserRights.html
index e2df3a058..a7145977c 100644
--- a/rt/html/Admin/CustomFields/UserRights.html
+++ b/rt/html/Admin/CustomFields/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,31 +51,31 @@ current_tab => "Admin/CustomFields/UserRights.html?id=".$id,
Title => $title, &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>">
+ <form method="post" action="UserRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $CustomFieldObj->id %>" />
-<TABLE>
+<table>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
% my $group = RT::Group->new($session{'CurrentUser'});
% $group->LoadACLEquivalenceGroup($Member->MemberObj);
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId,
Object => $CustomFieldObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
- </TABLE>
+ </table>
<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/CustomFields/index.html b/rt/html/Admin/CustomFields/index.html
index 9854fb0ec..aa7f12b29 100644
--- a/rt/html/Admin/CustomFields/index.html
+++ b/rt/html/Admin/CustomFields/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,29 +50,44 @@
current_tab => 'Admin/CustomFields/',
Title => loc('Select a Custom Field') &>
+% my @types;
% my $prev_lookup = '';
% while (my $CustomFieldObj = $CustomFields->Next) {
% $CustomFieldObj->CurrentUserHasRight('AdminCustomField') or next;
% my $lookup = $CustomFieldObj->FriendlyLookupType;
% if ($lookup ne $prev_lookup) {
% if ($prev_lookup) {
-</UL>
+</ul>
% }
-<H2><% loc("Custom Fields for [_1]", $lookup) %></H2>
-<UL>
+<h2><% loc("Custom Fields for [_1]", $lookup) %></h2>
+<ul>
% $prev_lookup = $lookup;
+% push @types, [$lookup, $CustomFieldObj->LookupType];
% }
%
-<LI>
-<A HREF="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a>
-</LI>
+<li>
+<a href="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a>
+</li>
% }
% if ($prev_lookup) {
-</UL>
+</ul>
% }
+<form action="<%$RT::WebPath%>/Admin/CustomFields/index.html" method="get">
+<&|/l&>Only show custom fields for:</&>
+<select name="type">
+% for (@types) {
+<option value="<% $_->[1] %>"><% $_->[0] %></option>
+% }
+</select> <input type="submit" value="<%loc('Go')%>" />
+</form>
+
+<%args>
+$type => undef
+</%args>
<%INIT>
my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
$CustomFields->UnLimit();
+$CustomFields->LimitToLookupType($type) if defined $type;
$CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } );
</%INIT>
diff --git a/rt/html/Admin/Elements/AddCustomFieldValue b/rt/html/Admin/Elements/AddCustomFieldValue
index 3e3f414b3..39916e5ab 100644
--- a/rt/html/Admin/Elements/AddCustomFieldValue
+++ b/rt/html/Admin/Elements/AddCustomFieldValue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,22 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<b><&|/l&>Add Value</&></b></b></b></b>
-<TABLE BORDER="0">
-<TR><TD><small>
-<&|/l&>Sort</&>:<br>
-<input size=3 name="CustomField-<%$CustomField->Id%>-Value-new-SortOrder" >
-</TD>
-<TD><small>
-<&|/l&>Name</&>:<br>
-<input type="text" size=30 name="CustomField-<%$CustomField->Id%>-Value-new-Name" >
-</TD>
-<TD><small>
-<&|/l&>Description</&>:<br>
-<input type="text" size=50 name="CustomField-<%$CustomField->Id%>-Value-new-Description">
-</TD></TR>
-</TABLE>
-
+<b><&|/l&>Add Value</&></b>
+<table border="0">
+<tr><td>
+<&|/l&>Sort</&>:<br />
+<input size="3" name="CustomField-<%$CustomField->Id%>-Value-new-SortOrder" />
+</td>
+<td>
+<&|/l&>Name</&>:<br />
+<input type="text" size="30" name="CustomField-<%$CustomField->Id%>-Value-new-Name" />
+</td>
+<td>
+<&|/l&>Description</&>:<br />
+<input type="text" size="50" name="CustomField-<%$CustomField->Id%>-Value-new-Description" />
+</td>
+% if ($CustomField->Type ne 'Combobox') {
+<td>
+<&|/l&>Category</&>:<br />
+<input type="text" size="10" name="CustomField-<%$CustomField->Id%>-Value-new-Category" />
+</td>
+% }
+</tr>
+</table>
<%init>
</%init>
<%args>
diff --git a/rt/html/Admin/Elements/ConfigureMyRT b/rt/html/Admin/Elements/ConfigureMyRT
new file mode 100644
index 000000000..363a3b6db
--- /dev/null
+++ b/rt/html/Admin/Elements/ConfigureMyRT
@@ -0,0 +1,80 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Action
+$OnSave
+$items
+$panes
+$current_portlets
+</%args>
+<%init>
+my $portlets = $current_portlets;
+my @panes;
+for my $pane (@$panes) {
+ push @panes, $m->comp(
+ '/Widgets/SelectionBox:new',
+ Action => $Action,
+ Name => $pane,
+ Available => $items,
+ AutoSave => 1,
+ OnSubmit => sub {
+ my $sel = shift;
+ $portlets->{$pane} = [
+ map { m/(\w+)-(.*)$}/;
+ { type => $1,
+ name => $2 } } @{ $sel->{Current} }
+ ];
+ $OnSave->( $portlets, $pane );
+ },
+ Selected => [ map { join( '-', @{$_}{qw/type name/} ) }
+ @{ $portlets->{$pane} } ]
+ );
+}
+
+return @panes;
+</%init>
diff --git a/rt/html/Admin/Elements/CreateUserCalled b/rt/html/Admin/Elements/CreateUserCalled
index 0dc6ac792..69183258e 100644
--- a/rt/html/Admin/Elements/CreateUserCalled
+++ b/rt/html/Admin/Elements/CreateUserCalled
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<FORM METHOD=get ACTION="<% $RT::WebPath %>/Admin/Users/Create.html">
-<&|/l&>New user called</&> <INPUT NAME="Name" size=10><input type=submit value="<&|/l&>Create</&>">
+<form method="get" action="<% $RT::WebPath %>/Admin/Users/Create.html">
+<&|/l&>New user called</&> <input name="Name" size="10" /><input type="submit" class="button" value="<&|/l&>Create</&>" />
</form>
diff --git a/rt/html/Admin/Elements/CustomFieldTabs b/rt/html/Admin/Elements/CustomFieldTabs
index d7acf33cc..078dbe0de 100644
--- a/rt/html/Admin/Elements/CustomFieldTabs
+++ b/rt/html/Admin/Elements/CustomFieldTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/EditCustomField b/rt/html/Admin/Elements/EditCustomField
index d8c5b29b2..d6dda06f3 100644
--- a/rt/html/Admin/Elements/EditCustomField
+++ b/rt/html/Admin/Elements/EditCustomField
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,43 +48,43 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="CustomField.html">
-<INPUT TYPE=HIDDEN NAME="CustomField" VALUE="<%$id %>">
-<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
+<form method="post" action="CustomField.html">
+<input type="hidden" class="hidden" name="CustomField" value="<%$id %>" />
+<input type="hidden" class="hidden" name="Queue" value="<%$Queue%>" />
-<TABLE WIDTH="100%" BORDER="0">
-<TR><TD ALIGN="RIGHT">
+<table width="100%" border="0">
+<tr><td align="right">
<&|/l&>Name</&>:
-</TD><TD>
-<input name="Name" VALUE="<%$CustomFieldObj->Name%>" SIZE=20>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Name" value="<%$CustomFieldObj->Name%>" size="20" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Description</&>:
-</TD><TD>
-<input name="Description" VALUE="<%$CustomFieldObj->Description%>" SIZE=80>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Description" value="<%$CustomFieldObj->Description%>" size="80" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Type</&>:
-</TD><TD>
+</td><td>
<& /Admin/Elements/SelectCustomFieldType, Name => "Type", Default => $CustomFieldObj->Type &>
-</TD></TR>
-<TR><TD>
-</TD><TD>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
-</TD></TR>
-</TABLE>
-
-<P>
+</td></tr>
+<tr><td>
+</td><td>
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+</td></tr>
+</table>
+
+<p>
% if ($CustomFieldObj->Id and $CustomFieldObj->Type =~ /Select/) {
<h2><&|/l&>Values</&></h2>
-<font size=-1>
+<font size="-1">
<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &>
<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &>
</font>
% }
<&/Elements/Submit, Label => loc('Create') &>
-</FORM>
+</form>
diff --git a/rt/html/Admin/Elements/EditCustomFieldValues b/rt/html/Admin/Elements/EditCustomFieldValues
index 9cc3858b9..e7da87cf7 100644
--- a/rt/html/Admin/Elements/EditCustomFieldValues
+++ b/rt/html/Admin/Elements/EditCustomFieldValues
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -54,23 +56,33 @@
<td><&|/l&>Sort</&></td>
<td><&|/l&>Name</&></td>
<td><&|/l&>Description</&></td>
+% if ($CustomField->Type ne 'Combobox') {
+<td><&|/l&>Category</&></td>
+% }
</tr>
% while (my $value = $values->Next) {
<tr>
<td>
-<input type="checkbox" name="Delete-CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>">
+<input type="checkbox" class="checkbox" name="Delete-CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>" />
+</td>
+<td>
+<input size="3" name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-SortOrder" value="<%$value->SortOrder%>" />
</td>
<td>
-<input size=3 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-SortOrder" value="<%$value->SortOrder%>">
+<input type="text" size="30" name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Name" value="<%$value->Name%>" />
</td>
<td>
-<input type="text" size=30 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Name" value="<%$value->Name%>">
+<font size="-1">
+<input type="text" size="50" name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Description" value="<%$value->Description%>" />
+</font>
</td>
+% if ($CustomField->Type ne 'Combobox') {
<td>
<font size="-1">
-<input type="text" size=50 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Description" value="<%$value->Description%>">
+<input type="text" size="10" name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Category" value="<%$value->Category%>" />
</font>
</td>
+% }
</tr>
% }
</table>
diff --git a/rt/html/Admin/Elements/EditCustomFields b/rt/html/Admin/Elements/EditCustomFields
index 1cd3df568..9b1176a40 100644
--- a/rt/html/Admin/Elements/EditCustomFields
+++ b/rt/html/Admin/Elements/EditCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,11 +47,11 @@
%# END BPS TAGGED BLOCK }}}
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%><% $m->request_comp->path |n %>" METHOD="POST" NAME="EditCustomFields">
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $Object->Id %>"/>
-<INPUT TYPE=HIDDEN NAME="ObjectType" VALUE="<% $ObjectType %>"/>
-<INPUT TYPE=HIDDEN NAME="SubType" VALUE="<% $SubType %>"/>
-<INPUT TYPE=HIDDEN NAME="UpdateCFs" VALUE="1"/>
+<form action="<%$RT::WebPath%><% $m->request_comp->path |n %>" method="post" name="EditCustomFields">
+<input type="hidden" class="hidden" name="id" value="<% $Object->Id %>" />
+<input type="hidden" class="hidden" name="ObjectType" value="<% $ObjectType %>" />
+<input type="hidden" class="hidden" name="SubType" value="<% $SubType %>" />
+<input type="hidden" class="hidden" name="UpdateCFs" value="1" />
% if ($Object->Id) {
<h2><&|/l&>Global Custom Fields</&></h2>
@@ -61,7 +63,7 @@
<& PickCustomFields, CustomFields => \@UnassignedCFs, id => $id, SubType => $SubType &>
<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &>
-</FORM>
+</form>
<%INIT>
@@ -71,7 +73,7 @@ my (@GlobalCFs, @UnassignedCFs);
my $id = $Object->Id;
if ($id and !$Object->CurrentUserHasRight('AssignCustomFields')) {
- $m->out('<P><i>', loc('(No custom fields)'), '</i></P>');
+ $m->out('<p><i>', loc('(No custom fields)'), '</i></p>');
return;
}
@@ -88,6 +90,20 @@ $ObjectCFs->UnLimit;
$ObjectCFs->LimitToObjectId($id);
$ObjectCFs->LimitToLookupType($lookup);
+# Check sanity of SortOrders
+my %SortOrders;
+$SortOrders{$_->SortOrder}++
+ while ($_ = $ObjectCFs->Next);
+
+# If there are duplicates, run though and squash them
+if (grep {$_ > 1} values %SortOrders) {
+ my $i = 1;
+ while (my $ObjectCF = $ObjectCFs->Next) {
+ $ObjectCF->SetSortOrder($i++);
+ }
+ $ObjectCFs->GotoFirstItem;
+}
+
# {{{ deal with moving sortorder of custom fields
if ($CustomField and $Move) {
my $SourceObj = RT::ObjectCustomField->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/EditQueueWatchers b/rt/html/Admin/Elements/EditQueueWatchers
index c93bf81f5..dc076f58a 100644
--- a/rt/html/Admin/Elements/EditQueueWatchers
+++ b/rt/html/Admin/Elements/EditQueueWatchers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,12 +49,12 @@
<ul>
<li><i><&|/l&>none</&></i>
% } else {
-<i><&|/l&>(Check box to delete)</&></i><br><BR>
+<i><&|/l&>(Check box to delete)</&></i><br /><br />
<ul>
% while (my $watcher=$Members->Next) {
<li>
-<INPUT TYPE=CHECKBOX NAME="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1"
- UNCHECKED>
+<input type="checkbox" class="checkbox" name="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1"
+ unchecked />
% if ($watcher->MemberObj->IsUser) {
<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->ObjectId%>">
% } else {
diff --git a/rt/html/Admin/Elements/EditScrip b/rt/html/Admin/Elements/EditScrip
index 907ae9a92..edf949ba3 100644
--- a/rt/html/Admin/Elements/EditScrip
+++ b/rt/html/Admin/Elements/EditScrip
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,150 +46,95 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Elements/ListActions, actions => \@actions &>
-
-<FORM METHOD=POST ACTION="Scrip.html">
-<input type="hidden" name="id" value="<%$id%>">
-<input type="hidden" name="Queue" value="<%$Queue%>">
-<& /Elements/TitleBoxStart, title => loc('Scrip Fields') &>
-<TABLE>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:
-</TD>
-<TD>
-<input Name="Scrip-<%$id%>-Description" value="<%$scrip->Description%>">
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Condition</&>:
-</TD>
-<TD>
-<& /Admin/Elements/SelectScripCondition, Name => "Scrip-$id-ScripCondition", Default => $scrip->ConditionObj->Id &><BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Action</&>:
-</TD>
-<TD>
-<& /Admin/Elements/SelectScripAction, Name => "Scrip-$id-ScripAction", Default => $scrip->ActionObj->Id &>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Template</&>:
-</TD>
-<TD>
-<& /Admin/Elements/SelectTemplate, Name => "Scrip-$id-Template", Default => $scrip->TemplateObj->Id, Queue => $Queue &>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Stage</&>:
-</TD>
-<TD>
-<& /Admin/Elements/SelectStage, Name => "Scrip-$id-Stage", Default => $scrip->Stage &>
-</TD>
-</TR>
+<form method="post" action="Scrip.html">
+<input type="hidden" class="hidden" name="id" value="<% $id %>" />
+<input type="hidden" class="hidden" name="Queue" value="<% $Queue %>" />
+
+<&| /Widgets/TitleBox, title => loc('Scrip Fields') &>
+<table>
+
+<tr><td align="right"><&|/l&>Description</&>:</td><td>
+<input name="Scrip-<% $id %>-Description" value="<% $ARGS{"Scrip-$id-Description"} || $scrip->Description %>" />
+</td></tr>
+
+<tr><td align="right"><&|/l&>Condition</&>:</td><td>
+<& /Admin/Elements/SelectScripCondition,
+ Name => "Scrip-$id-ScripCondition",
+ Default => $ARGS{"Scrip-$id-ScripCondition"} || $scrip->ConditionObj->Id,
+&></td></tr>
+
+<tr><td align="right"><&|/l&>Action</&>:</td><td>
+<& /Admin/Elements/SelectScripAction,
+ Name => "Scrip-$id-ScripAction",
+ Default => $ARGS{"Scrip-$id-ScripAction"} || $scrip->ActionObj->Id,
+&></td></tr>
+
+<tr><td align="right"><&|/l&>Template</&>:</td><td>
+<& /Admin/Elements/SelectTemplate,
+ Name => "Scrip-$id-Template",
+ Default => $ARGS{"Scrip-$id-Template"} || $scrip->TemplateObj->Id,
+ Queue => $Queue,
+&></td></tr>
+
+<tr><td align="right"><&|/l&>Stage</&>:</td><td>
+<& /Admin/Elements/SelectStage,
+ Name => "Scrip-$id-Stage",
+ Default => $ARGS{"Scrip-$id-Stage"} || $scrip->Stage,
+&></td></tr>
+
</table>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+</&>
+
+<& /Elements/Submit,
+ Label => $SubmitLabel,
+ Caption => loc("Be sure to save your changes"),
+ Reset => 1,
+&><br />
-<br>
-<& /Elements/TitleBoxStart, title => loc('User Defined conditions and actions') &>
+<&| /Widgets/TitleBox, title => loc('User Defined conditions and actions') &>
<table>
-<TR>
-<TD colspan=2>
+<tr><td colspan="2">
<i><&|/l&>(Use these fields when you choose 'User Defined' for a condition or action)</&></i>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
-<&|/l&>Custom condition</&>:
-</TD>
-<TD>
-<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomIsApplicableCode"><%$scrip->CustomIsApplicableCode%></TEXTAREA>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
-<&|/l&>Custom action preparation code</&>:
-</TD>
-<TD>
-<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomPrepareCode"><%$scrip->CustomPrepareCode%></TEXTAREA>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
-<&|/l&>Custom action cleanup code</&>:
-</TD>
-<TD>
-<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomCommitCode"><%$scrip->CustomCommitCode%></TEXTAREA>
-</TD>
-</TR>
+</td></tr>
+
+<tr><td class="labeltop"><&|/l&>Custom condition</&>:</td><td>
+<textarea cols="80" rows="5" name="Scrip-<% $id %>-CustomIsApplicableCode"><% $ARGS{"Scrip-$id-CustomIsApplicableCode"} || $scrip->CustomIsApplicableCode %></textarea>
+</td></tr>
+
+<tr><td class="labeltop"><&|/l&>Custom action preparation code</&>:</td><td>
+<textarea cols="80" rows="5" name="Scrip-<% $id %>-CustomPrepareCode"><% $ARGS{"Scrip-$id-CustomPrepareCode"} || $scrip->CustomPrepareCode %></textarea>
+</td></tr>
+
+<tr><td class="labeltop"><&|/l&>Custom action cleanup code</&>:</td><td>
+<textarea cols="80" rows="5" name="Scrip-<% $id %>-CustomCommitCode"><% $ARGS{"Scrip-$id-CustomCommitCode"} || $scrip->CustomCommitCode %></textarea>
+</td></tr>
+
</table>
-<& /Elements/TitleBoxEnd &>
+</&>
-<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
+<& /Elements/Submit, Label => $SubmitLabel, Reset => 1 &>
-</FORM>
+</form>
<%init>
-my (@actions);
+my (@actions, $SubmitLabel);
-my $scrip = new RT::Scrip($session{'CurrentUser'});
-
-if ( $id eq 'new' ) {
+my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
- my ( $retval, $msg ) = $scrip->Create(
- Queue => $Queue,
- ScripAction => $ARGS{"Scrip-new-ScripAction"},
- ScripCondition => $ARGS{"Scrip-new-ScripCondition"},
- Template => $ARGS{"Scrip-new-Template"},
- Description => $ARGS{"Scrip-new-Description"},
- CustomPrepareCode => $ARGS{"Scrip-new-CustomPrepareCode"},
- CustomCommitCode => $ARGS{"Scrip-new-CustomCommitCode"},
- CustomIsApplicableCode => $ARGS{"Scrip-new-CustomIsApplicableCode"},
- );
- if ( defined $retval ) {
- push @actions, $msg;
- $id = $scrip->id;
- }
- else {
- Abort( $msg);
- }
-}
-elsif ($id) {
- my ($val,$msg) =$scrip->Load($id);
- if ($val) {
- $id = $scrip->id;
- } else {
- Abort ($msg);
+if ( $id ) {
+ $scrip->Load( $id );
+ unless ( $id = $scrip->id ) {
+ push @actions, loc("Couldn't load scrip #[_1]", $id);
}
- my @attribs = qw (
- Queue
- ScripAction
- ScripCondition
- Template
- Stage
- Description
- CustomPrepareCode
- CustomCommitCode
- CustomIsApplicableCode
- );
- my @results = UpdateRecordObject( AttributesRef => \@attribs,
- AttributePrefix => 'Scrip-'.$scrip->Id,
- Object => $scrip,
- ARGSRef => \%ARGS );
- push (@actions, @results);
+ $SubmitLabel = loc('Update');
}
-elsif ($ARGS{'create'}) {
+unless ( $id ) {
$id = 'new';
+ $SubmitLabel = loc('Create');
}
-# }}}
</%init>
<%ARGS>
@@ -195,3 +142,42 @@ $id => undef
$title => undef
$Queue => 0
</%ARGS>
+
+<%METHOD Process>
+<%ARGS>
+$id => undef
+$Queue => undef
+</%ARGS>
+<%INIT>
+return ($id) unless $id;
+
+my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
+if ( $id eq 'new' ) {
+ return $scrip->Create(
+ Queue => $Queue,
+ ScripAction => $ARGS{"Scrip-new-ScripAction"},
+ ScripCondition => $ARGS{"Scrip-new-ScripCondition"},
+ Template => $ARGS{"Scrip-new-Template"},
+ Description => $ARGS{"Scrip-new-Description"},
+ CustomPrepareCode => $ARGS{"Scrip-new-CustomPrepareCode"},
+ CustomCommitCode => $ARGS{"Scrip-new-CustomCommitCode"},
+ CustomIsApplicableCode => $ARGS{"Scrip-new-CustomIsApplicableCode"},
+ );
+}
+else {
+ $scrip->Load( $id );
+ return (undef, loc("Couldn't load scrip #[_1]", $id))
+ unless $scrip->id;
+
+ my @attribs = qw(Queue ScripAction ScripCondition Template Stage
+ Description CustomPrepareCode CustomCommitCode CustomIsApplicableCode);
+ my @results = UpdateRecordObject(
+ AttributesRef => \@attribs,
+ AttributePrefix => 'Scrip-'.$scrip->Id,
+ Object => $scrip,
+ ARGSRef => \%ARGS
+ );
+ return ($scrip->id, @results);
+}
+</%INIT>
+</%METHOD>
diff --git a/rt/html/Admin/Elements/EditScrips b/rt/html/Admin/Elements/EditScrips
index 9526118b5..7d25c5305 100644
--- a/rt/html/Admin/Elements/EditScrips
+++ b/rt/html/Admin/Elements/EditScrips
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,34 +48,35 @@
<& /Elements/ListActions, actions => \@actions &>
<form action="Scrips.html" method="post">
-<input type="hidden" name="id" value="<%$id%>">
+<input type="hidden" class="hidden" name="id" value="<%$id%>" />
<h2><&|/l&>Current Scrips</&></h2>
% if ($Scrips->Count == 0 ) {
-<P><i><&|/l&>(No scrips)</&></i></P>
+<p><i><&|/l&>(No scrips)</&></i></p>
% } else {
-<TABLE>
-<P><i><&|/l&>(Check box to delete)</&></i></P>
+<table>
+<p><i><&|/l&>(Check box to delete)</&></i></p>
% while (my $scrip = $Scrips->Next ) {
-<TR>
-<TD>
-<input type="checkbox" name="DeleteScrip-<%$scrip->Id%>" value="1">
-</TD>
-<TD>
-<a href="Scrip.html?id=<%$scrip->Id%>&Queue=<%$id%>"><% $scrip->Description || "<i>(".loc('no value').")</i>" |n %></a><br>
+<tr>
+<td>
+<input type="checkbox" class="checkbox" name="DeleteScrip-<%$scrip->Id%>" value="1" />
+</td>
+<td>
+<a href="Scrip.html?id=<%$scrip->Id%>&Queue=<%$id%>"><% $scrip->Description || "<i>(".loc('no value').")</i>" |n %></a><br />
<small><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></small>
-</TD>
-</TR>
+</td>
+</tr>
% }
-</TABLE>
+</table>
% }
<& /Elements/Submit,
Caption => loc("Delete selected scrips"),
Label => loc("Delete") &>
</form>
+
<%init>
my (@actions);
@@ -92,6 +95,7 @@ else {
$Scrips->LimitToGlobal();
}
+$Scrips->OrderBy( FIELD => 'description' );
diff --git a/rt/html/Admin/Elements/EditTemplates b/rt/html/Admin/Elements/EditTemplates
index 207ffd001..bffb4cd08 100644
--- a/rt/html/Admin/Elements/EditTemplates
+++ b/rt/html/Admin/Elements/EditTemplates
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,39 +47,39 @@
%# END BPS TAGGED BLOCK }}}
<& /Elements/ListActions, actions => \@actions &>
-<FORM METHOD=GET ACTION="Templates.html">
-<INPUT TYPE="Hidden" NAME="id" VALUE="<%$id%>">
+<form method="get" action="Templates.html">
+<input type="hidden" class="hidden" name="id" value="<%$id%>" />
% if ($Templates->Count == 0 ) {
-<P><i><&|/l&>(No templates)</&></i></P>
+<p><i><&|/l&>(No templates)</&></i></p>
% } else {
-<TABLE>
-<TR>
-<TH>
+<table>
+<tr>
+<th>
<i><&|/l&>(Check box to delete)</&></i>
-</TH>
-<TH>
-</TH>
-</TR>
+</th>
+<th>
+</th>
+</tr>
% my $count;
% while (my $TemplateObj = $Templates->Next) {
-<TR>
-<TD>
-<input type="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>" value="1">
-</TD>
-<TD>
-<A HREF="Template.html?Queue=<%$id%>&Template=<%$TemplateObj->id()%>">
-<B><% loc($TemplateObj->Name) %></B></A>
-<br><% loc($TemplateObj->Description) %>
-</TD>
-</TR>
+<tr>
+<td>
+<input type="checkbox" class="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>" value="1" />
+</td>
+<td>
+<a href="Template.html?Queue=<%$id%>&Template=<%$TemplateObj->id()%>">
+<strong><% loc($TemplateObj->Name) %></strong></a>
+<br /><% loc($TemplateObj->Description) %>
+</td>
+</tr>
% }
-</TABLE>
+</table>
% }
<& /Elements/Submit, Label => loc('Delete Template') &>
-</FORM>
+</form>
<%INIT>
my $Templates = RT::Templates->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/EditUserComments b/rt/html/Admin/Elements/EditUserComments
index fb96dc09a..5035189da 100644
--- a/rt/html/Admin/Elements/EditUserComments
+++ b/rt/html/Admin/Elements/EditUserComments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Elements/Header, Title => "Comments about $name" &>
-<&|/l&>These comments aren't generally visible to the user</&>:<br>
-<input type="hidden" name="id" value="<%$id%>">
-<TEXTAREA COLS=60 ROWS=15 WRAP=SOFT NAME="Comments"><% $UserObj->Comments %></TEXTAREA>
-</FORM>
+<&|/l&>These comments aren't generally visible to the user</&>:<br />
+<input type="hidden" class="hidden" name="id" value="<%$id%>" />
+<textarea cols="60" rows="15" wrap="soft" name="Comments"><% $UserObj->Comments %></textarea>
+</form>
<%ARGS>
$UserObj => undef
diff --git a/rt/html/Admin/Elements/GlobalCustomFieldTabs b/rt/html/Admin/Elements/GlobalCustomFieldTabs
index 8d4eaca23..db69df817 100755
--- a/rt/html/Admin/Elements/GlobalCustomFieldTabs
+++ b/rt/html/Admin/Elements/GlobalCustomFieldTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/GroupTabs b/rt/html/Admin/Elements/GroupTabs
index 60edda40e..bf6a1cfa5 100644
--- a/rt/html/Admin/Elements/GroupTabs
+++ b/rt/html/Admin/Elements/GroupTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/Header b/rt/html/Admin/Elements/Header
index b80908094..e9b0356a1 100644
--- a/rt/html/Admin/Elements/Header
+++ b/rt/html/Admin/Elements/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/ListGlobalCustomFields b/rt/html/Admin/Elements/ListGlobalCustomFields
index 3df9d6292..24308fcd8 100644
--- a/rt/html/Admin/Elements/ListGlobalCustomFields
+++ b/rt/html/Admin/Elements/ListGlobalCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,7 +49,7 @@
% while (my $CustomFieldObj = $CustomFields->Next) {
% $count++;
<font size="-1"><%$CustomFieldObj->id%>/<% loc($CustomFieldObj->Type) %>/<%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></font>
-<BR>
+<br />
% }
% if (!$count) {
<font size="-1"><&|/l&>(No custom fields)</&></font>
diff --git a/rt/html/Admin/Elements/ListGlobalScrips b/rt/html/Admin/Elements/ListGlobalScrips
index 2e3791257..e2e8b15aa 100644
--- a/rt/html/Admin/Elements/ListGlobalScrips
+++ b/rt/html/Admin/Elements/ListGlobalScrips
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,29 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-
% if ($Scrips->Count == 0) {
-<P><i><&|/l&>(No scrips)</&></i></P>
+<p><i><&|/l&>(No scrips)</&></i></p>
% } else {
-<UL>
+<ul>
% while (my $scrip = $Scrips->Next ) {
-<LI>
+<li>
<a href="<%$RT::WebPath%>/Admin/Global/Scrip.html?id=<%$scrip->Id%>&Queue=<%0%>">
% if ($scrip->Description) {
<% $scrip->Description %>
% } else {
<i>(<&|/l, $scrip->Id&>Scrip #[_1]</&>)</i>
% }
-</a><br>
+</a><br />
<small><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></small>
-</LI>
+</li>
% }
-</UL>
+</ul>
% }
diff --git a/rt/html/Admin/Elements/ModifyTemplate b/rt/html/Admin/Elements/ModifyTemplate
index 6749f3e65..b667e056b 100644
--- a/rt/html/Admin/Elements/ModifyTemplate
+++ b/rt/html/Admin/Elements/ModifyTemplate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,33 +45,33 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
-<TR>
-<TD ALIGN=RIGHT>
+<table>
+<tr>
+<td align="right">
<&|/l&>Name</&>:
-</TD>
-<TD>
-<input name="Name" VALUE="<%$Name%>" SIZE=20><BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
+</td>
+<td>
+<input name="Name" value="<%$Name%>" size="20" /><br />
+</td>
+</tr>
+<tr>
+<td align="right">
<&|/l&>Description</&>:
-</TD>
-<TD>
-<input name="Description" VALUE="<%$Description%>" SIZE=80><BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT VALIGN=TOP>
-<&|/l&>Content</&>:<BR>
-</TD>
-<TD>
-<TEXTAREA NAME=Content ROWS=25 COLS=80 WRAP=SOFT>
-<%$Content%></TEXTAREA>
-</TD>
-</TR>
-</TABLE>
+</td>
+<td>
+<input name="Description" value="<%$Description%>" size="80" /><br />
+</td>
+</tr>
+<tr>
+<td align="right" valign="top">
+<&|/l&>Content</&>:<br />
+</td>
+<td>
+<textarea name="Content" rows="25" cols="80" wrap="soft">
+<%$Content%></textarea>
+</td>
+</tr>
+</table>
<%INIT>
diff --git a/rt/html/Admin/Elements/ObjectCustomFields b/rt/html/Admin/Elements/ObjectCustomFields
index a87e1579d..61a10cd2b 100644
--- a/rt/html/Admin/Elements/ObjectCustomFields
+++ b/rt/html/Admin/Elements/ObjectCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/PickCustomFields b/rt/html/Admin/Elements/PickCustomFields
index c2a30f9a3..7b88433f1 100644
--- a/rt/html/Admin/Elements/PickCustomFields
+++ b/rt/html/Admin/Elements/PickCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,35 +48,35 @@
% if (@CustomFields == 0) {
<p><i><&|/l&>(None)</&></i></p>
% } else {
-<TABLE cellspacing=0 cellpadding=2>
+<table cellspacing="0" cellpadding="2">
% my $count;
% foreach my $CustomFieldObj (@CustomFields) {
-<TR>
+<tr>
% if (!$ReadOnly) {
- <TD valign="TOP">
-<input type="checkbox" name="Object-<%$id%>-CF-<%$CustomFieldObj->Id%>" value="1" <% $Checked ? 'CHECKED' : '' %>
->
- </TD>
+ <td valign="top">
+<input type="checkbox" class="checkbox" name="Object-<%$id%>-CF-<%$CustomFieldObj->Id%>" value="1" <% $Checked ? 'CHECKED' : '' %>
+/>
+ </td>
% }
- <TD valign="TOP">
- <A HREF="<%$RT::WebPath%>/Admin/CustomFields/Modify.html?id=<%$CustomFieldObj->id()%>">
+ <td valign="top">
+ <a href="<%$RT::WebPath%>/Admin/CustomFields/Modify.html?id=<%$CustomFieldObj->id()%>">
% if ($CustomFieldObj->Name) {
<b><%$CustomFieldObj->Name%></b>
% } else {
<i>(<&|/l&>no name</&>)</i>
% }
-</a><br>
+</a><br />
<%$CustomFieldObj->Description%>
- </TD>
- <TD valign="TOP">
+ </td>
+ <td valign="top">
<i><% $CustomFieldObj->FriendlyTypeComposite %></i>
- </TD>
+ </td>
% # show 'move up' unless it's the first item
% if ($count++ and $Checked) {
- <TD valign="TOP">
+ <td valign="top">
[<a href="<%$RT::WebPath%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a>]
% } else {
- <TD valign="TOP" ALIGN=RIGHT>
+ <td valign="top" align="right">
% }
% # show 'move down' unless it's the last item
@@ -82,10 +84,10 @@
% $m->print(' | ') if $count > 1;
[<a href="<%$RT::WebPath%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>]
% }
- </TD>
-</TR>
+ </td>
+</tr>
% }
-</TABLE>
+</table>
% }
<%ARGS>
@CustomFields
diff --git a/rt/html/Admin/Elements/PickObjects b/rt/html/Admin/Elements/PickObjects
index b07a88240..5fc086350 100644
--- a/rt/html/Admin/Elements/PickObjects
+++ b/rt/html/Admin/Elements/PickObjects
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,33 +46,32 @@
%#
%# END BPS TAGGED BLOCK }}}
% if (@Objects == 0) {
-<P><i><&|/l&>(None)</&></i></P>
+<p><i><&|/l&>(None)</&></i></p>
% } else {
-<TABLE cellspacing=0 cellpadding=2>
+<table cellspacing="0" cellpadding="2">
% my $count;
% foreach my $Object (@Objects) {
-<TR>
+<tr>
+% my $id = "Object-".$Object->id."-CF-".$id;
% if (!$ReadOnly) {
- <TD valign="TOP">
-<input type="checkbox" name="Object-<%$Object->id%>-CF-<%$id%>" value="1" <% $Checked ? 'CHECKED' : ''%>
->
- </TD>
+ <td valign="top">
+<input type="checkbox" id="<% $id %>" name="<% $id %>" value="1" <% $Checked ? 'CHECKED' : ''%>
+/>
+ </td>
% }
- <TD valign="TOP">
+ <td valign="top">
+ <label for="<% $id %>">
% if ($Object->Name) {
- <b><%$Object->Name%></b><br>
+ <b><%$Object->Name%></b><br />
% } else {
- <i>(<%loc("no name")%>)</i><br>
+ <i>(<%loc("no name")%>)</i><br />
% }
<%$Object->can('Description') && $Object->Description%>
- </TD>
-%# <TD valign="TOP">
-%# <i><% $CustomFieldObj->FriendlyTypeComposite %></i>
-%# </TD>
- </TD>
-</TR>
+ </label>
+ </td>
+</tr>
% }
-</TABLE>
+</table>
% }
<%ARGS>
@Objects
diff --git a/rt/html/Admin/Elements/QueueRightsForUser b/rt/html/Admin/Elements/QueueRightsForUser
index 01f294a59..15af78464 100644
--- a/rt/html/Admin/Elements/QueueRightsForUser
+++ b/rt/html/Admin/Elements/QueueRightsForUser
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,13 +45,13 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<UL>
+<ul>
%while(my $ACE = $ACL->Next) {
-<LI><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
+<li><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
%}
-</UL>
+</ul>
<%INIT>
my $ACL = new RT::ACL($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/QueueTabs b/rt/html/Admin/Elements/QueueTabs
index 93522d0a2..0d0670468 100644
--- a/rt/html/Admin/Elements/QueueTabs
+++ b/rt/html/Admin/Elements/QueueTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/SelectCustomFieldLookupType b/rt/html/Admin/Elements/SelectCustomFieldLookupType
index ec9f740b9..ff8bfdb3b 100644
--- a/rt/html/Admin/Elements/SelectCustomFieldLookupType
+++ b/rt/html/Admin/Elements/SelectCustomFieldLookupType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
%for my $option ($cf->LookupTypes) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyLookupType($option) %></OPTION>
+<option value="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyLookupType($option) %></option>
%}
-</SELECT>
+</select>
<%INIT>
my $cf = RT::CustomField->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectCustomFieldType b/rt/html/Admin/Elements/SelectCustomFieldType
index 3f25b8e71..c913979e9 100644
--- a/rt/html/Admin/Elements/SelectCustomFieldType
+++ b/rt/html/Admin/Elements/SelectCustomFieldType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
%for my $option ($cf->TypeComposites) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyTypeComposite($option) %></OPTION>
+<option value="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyTypeComposite($option) %></option>
%}
-</SELECT>
+</select>
<%INIT>
my $cf = RT::CustomField->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectGroups b/rt/html/Admin/Elements/SelectGroups
index 92bd47587..662273a0a 100644
--- a/rt/html/Admin/Elements/SelectGroups
+++ b/rt/html/Admin/Elements/SelectGroups
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
+<select multiple name="<%$Name%>" size="10">
%while (my $group = $groups->Next) {
-<OPTION VALUE="<%$group->id%>"><%$group->Name%>
+<option value="<%$group->id%>"><%$group->Name%>
%}
-</SELECT>
+</select>
<%INIT>
my $groups = new RT::Groups($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectModifyGroup b/rt/html/Admin/Elements/SelectModifyGroup
index 272e1f0c7..4db67c53a 100644
--- a/rt/html/Admin/Elements/SelectModifyGroup
+++ b/rt/html/Admin/Elements/SelectModifyGroup
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
%while ( $Group = $Groups->Next) {
-<A HREF="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><BR>
+<a href="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><br />
%}
<%INIT>
my ($Group);
diff --git a/rt/html/Admin/Elements/SelectModifyQueue b/rt/html/Admin/Elements/SelectModifyQueue
index 3a30d09c8..c3e6a98e4 100644
--- a/rt/html/Admin/Elements/SelectModifyQueue
+++ b/rt/html/Admin/Elements/SelectModifyQueue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
%while ( $queue = $queues->Next) {
-<A HREF="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><BR>
+<a href="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><br />
%}
<%INIT>
my ($queue);
diff --git a/rt/html/Admin/Elements/SelectModifyUser b/rt/html/Admin/Elements/SelectModifyUser
index fc6c01205..2b28402f9 100644
--- a/rt/html/Admin/Elements/SelectModifyUser
+++ b/rt/html/Admin/Elements/SelectModifyUser
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
%while ( $user = $users->Next) {
-<A HREF="Modify.html?id=<%$user->id%>"><%$user->id%>: <%$user->Name%></a><BR>
+<a href="Modify.html?id=<%$user->id%>"><%$user->id%>: <%$user->Name%></a><br />
%}
<%INIT>
my ($user);
diff --git a/rt/html/Admin/Elements/SelectNewGroupMembers b/rt/html/Admin/Elements/SelectNewGroupMembers
index 95056aec9..34d711fd0 100644
--- a/rt/html/Admin/Elements/SelectNewGroupMembers
+++ b/rt/html/Admin/Elements/SelectNewGroupMembers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,20 +47,22 @@
%# END BPS TAGGED BLOCK }}}
% if ($Show ne 'Groups') {
<b><&|/l&>Users</&></b>
-<SELECT MULTIPLE NAME="<%$Name%>Users" SIZE=10>
+<select multiple name="<%$Name%>Users" size="10">
%while (my $user = $users->Next) {
-<OPTION VALUE="User-<%$user->id%>"><%$user->Name%></OPTION>
+%next if $SkipUsers->{$user->id};
+<option value="User-<%$user->id%>"><%$user->Name%></option>
%}
-</SELECT>
-<br>
+</select>
+<br />
% }
% if ($Show ne 'Users') {
<b><&|/l&>Groups</&></b>
-<SELECT MULTIPLE NAME="<%$Name%>Groups" SIZE=10>
+<select multiple name="<%$Name%>Groups" size="10">
%while (my $group = $groups->Next) {
-<OPTION VALUE="Group-<%$group->id%>"><%$group->Name%></OPTION>
+%next if $SkipGroups->{$group->id};
+<option value="Group-<%$group->id%>"><%$group->Name%></option>
%}
-</SELECT>
+</select>
% }
<%INIT>
@@ -90,4 +94,6 @@ $groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined');
$Name => 'Users'
$Show => 'All'
$Group
+$SkipUsers => {}
+$SkipGroups => {}
</%ARGS>
diff --git a/rt/html/Admin/Elements/SelectRights b/rt/html/Admin/Elements/SelectRights
index 3e61d5071..a0a5736f0 100644
--- a/rt/html/Admin/Elements/SelectRights
+++ b/rt/html/Admin/Elements/SelectRights
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,37 +45,37 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<INPUT TYPE=HIDDEN NAME="CheckACL" VALUE="<%$ACLDesc%>">
- <TABLE BORDER=0>
-<TR>
-<TD valign=top width="180" align="left">
+<input type="hidden" class="hidden" name="CheckACL" value="<%$ACLDesc%>" />
+ <table border="0">
+<tr>
+<td valign="top" width="180" align="left">
% my %current_rights;
<h3><&|/l&>Current rights</&></h3>
% if ($ACLObj->Count() == 0) {
-<i><&|/l&>No rights granted.</&></i> <BR>
+<i><&|/l&>No rights granted.</&></i> <br />
% } else {
-<i>(<&|/l&>Check box to revoke right</&>)</i> <BR>
+<i>(<&|/l&>Check box to revoke right</&>)</i> <br />
% while (my $right = $ACLObj->Next()) {
% if ($right->RightName) {
% $current_rights{$right->RightName} = 1;
-<input type=checkbox value="<%$right->Id%>" name="RevokeRight-<%$ACLDesc%>-<%$right->RightName%>"> <% loc($right->RightName) %><br>
+<input type="checkbox" class="checkbox" value="<%$right->Id%>" name="RevokeRight-<%$ACLDesc%>-<%$right->RightName%>" /> <% loc($right->RightName) %><br />
% }
% }
% }
-</TD>
-<TD valign=top>
+</td>
+<td valign="top">
<h3><&|/l&>New rights</&></h3>
-<SELECT SIZE=5 MULTIPLE NAME="GrantRight-<%$ACLDesc%>">
+<select size="5" multiple name="GrantRight-<%$ACLDesc%>">
% foreach $right (sort keys %Rights) {
% next if $current_rights{$right};
- <OPTION VALUE="<%$right%>"
- ><% loc($right) %></OPTION>
+ <option value="<%$right%>"
+ ><% loc($right) %></option>
% }
-<OPTION VALUE="" SELECTED><&|/l&>(no value)</&></OPTION>
-</SELECT>
-</TD>
-</TR>
-</TABLE>
+<option value="" selected><&|/l&>(no value)</&></option>
+</select>
+</td>
+</tr>
+</table>
<%INIT>
my ($right, $ACLDesc, $AppliesTo, %Rights);
diff --git a/rt/html/Admin/Elements/SelectScrip b/rt/html/Admin/Elements/SelectScrip
index a9e979699..027efba3f 100644
--- a/rt/html/Admin/Elements/SelectScrip
+++ b/rt/html/Admin/Elements/SelectScrip
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,17 +45,17 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
+<select name="<%$Name%>">
+<option value=""
<% $Default eq undef && 'SELECTED' %>
->-</OPTION>
+>-</option>
%while (my $Scrip = $Scrips->Next) {
-<OPTION VALUE=<% $Scrip->Id %>
+<option value="<% $Scrip->Id %>"
<% $Scrip->Id == $Default && 'SELECTED' %>
><% loc($Scrip->Name) %>
-</OPTION>
+</option>
%}
-</SELECT>
+</select>
<%INIT>
my $Scrips = RT::Scrips->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectScripAction b/rt/html/Admin/Elements/SelectScripAction
index 8d88d6458..405f20a93 100644
--- a/rt/html/Admin/Elements/SelectScripAction
+++ b/rt/html/Admin/Elements/SelectScripAction
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,17 +45,17 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
+<select name="<%$Name%>">
+<option value=""
<% ! defined $Default && 'SELECTED' %>
->-</OPTION>
+>-</option>
%while (my $ScripAction = $ScripActions->Next) {
-<OPTION VALUE=<%$ScripAction->Id%>
+<option value="<%$ScripAction->Id%>"
<% defined $Default && $ScripAction->Id == $Default && 'SELECTED' %>
><% loc($ScripAction->Name) %>
-</OPTION>
+</option>
%}
-</SELECT>
+</select>
<%INIT>
my $ScripActions = RT::ScripActions->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectScripCondition b/rt/html/Admin/Elements/SelectScripCondition
index faa99fda6..e8f8938e4 100644
--- a/rt/html/Admin/Elements/SelectScripCondition
+++ b/rt/html/Admin/Elements/SelectScripCondition
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,17 +45,17 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
+<select name="<%$Name%>">
+<option value=""
<% ! defined $Default && 'SELECTED' %>
->-</OPTION>
+>-</option>
%while (my $ScripCondition = $ScripConditions->Next) {
-<OPTION VALUE=<%$ScripCondition->Id%>
+<option value="<%$ScripCondition->Id%>"
<% defined $Default && $ScripCondition->Id == $Default && 'SELECTED' %>
><% loc($ScripCondition->Name) %>
-</OPTION>
+</option>
%}
-</SELECT>
+</select>
<%INIT>
my $ScripConditions = RT::ScripConditions->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectSingleOrMultiple b/rt/html/Admin/Elements/SelectSingleOrMultiple
index 571695091..4844b8dc5 100644
--- a/rt/html/Admin/Elements/SelectSingleOrMultiple
+++ b/rt/html/Admin/Elements/SelectSingleOrMultiple
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/SelectStage b/rt/html/Admin/Elements/SelectStage
index 0fbf5c609..68bf48511 100644
--- a/rt/html/Admin/Elements/SelectStage
+++ b/rt/html/Admin/Elements/SelectStage
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,12 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
+<select name="<%$Name%>">
% foreach my $stage (@stages) {
-<OPTION VALUE=<%$stage%>
+<option value="<%$stage%>"
<% ($stage eq $Default) && 'SELECTED' %>
><% loc($stage) %>
-</OPTION>
+</option>
% }
<%INIT>
if ($Default eq '') {
diff --git a/rt/html/Admin/Elements/SelectTemplate b/rt/html/Admin/Elements/SelectTemplate
index 7d83b6768..dd96ec70b 100644
--- a/rt/html/Admin/Elements/SelectTemplate
+++ b/rt/html/Admin/Elements/SelectTemplate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,23 +45,23 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
+<select name="<%$Name%>">
+<option value=""
<% $Default eq 'none' && 'SELECTED' %>
->-</OPTION>
+>-</option>
%while (my $Template = $PrimaryTemplates->Next) {
-<OPTION VALUE=<%$Template->Id%>
+<option value="<%$Template->Id%>"
<% ($Template->Id == $Default) && 'SELECTED' %>
><% loc($Template->Name) %>
-</OPTION>
+</option>
%}
%while (my $Template = $OtherTemplates->Next) {
-<OPTION VALUE=<%$Template->Id%>
+<option value="<%$Template->Id%>"
<% ($Template->Id == $Default) && 'SELECTED'%>
><&|/l, loc($Template->Name) &>Global template: [_1]</&>
-</OPTION>
+</option>
%}
-</SELECT>
+</select>
<%INIT>
diff --git a/rt/html/Admin/Elements/SelectUsers b/rt/html/Admin/Elements/SelectUsers
index a88aa8ff7..103ab30fc 100644
--- a/rt/html/Admin/Elements/SelectUsers
+++ b/rt/html/Admin/Elements/SelectUsers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
+<select multiple name="<%$Name%>" size="10">
%while (my $user = $users->Next) {
-<OPTION VALUE="<%$user->id%>"><%$user->Name%>
+<option value="<%$user->id%>"><%$user->Name%>
%}
-</SELECT>
+</select>
<%INIT>
my $users = new RT::Users($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SystemTabs b/rt/html/Admin/Elements/SystemTabs
index 646f552f5..fd317c4fb 100644
--- a/rt/html/Admin/Elements/SystemTabs
+++ b/rt/html/Admin/Elements/SystemTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -67,7 +69,10 @@
},
H => { title => loc('User Rights'),
path => 'Admin/Global/UserRights.html',
- }
+ },
+ I => { title => loc('RT at a glance'),
+ path => 'Admin/Global/MyRT.html',
+ },
};
diff --git a/rt/html/Admin/Elements/Tabs b/rt/html/Admin/Elements/Tabs
index f90a629a2..40df82ac3 100644
--- a/rt/html/Admin/Elements/Tabs
+++ b/rt/html/Admin/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/ToolTabs b/rt/html/Admin/Elements/ToolTabs
index 773b81099..37ba33e8e 100755
--- a/rt/html/Admin/Elements/ToolTabs
+++ b/rt/html/Admin/Elements/ToolTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/UserTabs b/rt/html/Admin/Elements/UserTabs
index 0ffd29b0f..f5f8d0e68 100644
--- a/rt/html/Admin/Elements/UserTabs
+++ b/rt/html/Admin/Elements/UserTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -64,6 +66,9 @@ subtabs => {
History => { title => loc('History'),
path => "Admin/Users/History.html?id=".$id
},
+ 'MyRT' => { title => loc('RT at a glance'),
+ path => "Admin/Users/MyRT.html?id=".$id
+ },
# Scrips => { title => loc('Rights'),
# path => "Admin/Users/Rights.html?id=".$id
# }
diff --git a/rt/html/Admin/Global/CustomFields/Groups.html b/rt/html/Admin/Global/CustomFields/Groups.html
index bffde016f..62bd31cb2 100644
--- a/rt/html/Admin/Global/CustomFields/Groups.html
+++ b/rt/html/Admin/Global/CustomFields/Groups.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GlobalCustomFieldTabs,
current_tab => "Admin/Global/CustomFields/Groups.html",
diff --git a/rt/html/Admin/Global/CustomFields/Queue-Tickets.html b/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
index 396559a17..3feb4242f 100755
--- a/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
+++ b/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GlobalCustomFieldTabs,
current_tab => "Admin/Global/CustomFields/Queue-Tickets.html",
diff --git a/rt/html/Admin/Global/CustomFields/Queue-Transactions.html b/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
index 63b4cfe6b..5f58a1833 100755
--- a/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
+++ b/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GlobalCustomFieldTabs,
current_tab => "Admin/Global/CustomFields/Queue-Transactions.html",
diff --git a/rt/html/Admin/Global/CustomFields/Users.html b/rt/html/Admin/Global/CustomFields/Users.html
index 6b79743d2..6f965b755 100644
--- a/rt/html/Admin/Global/CustomFields/Users.html
+++ b/rt/html/Admin/Global/CustomFields/Users.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GlobalCustomFieldTabs,
current_tab => "Admin/Global/CustomFields/Users.html",
diff --git a/rt/html/Admin/Global/CustomFields/index.html b/rt/html/Admin/Global/CustomFields/index.html
index 9cdcfd549..b5c9fe8f3 100644
--- a/rt/html/Admin/Global/CustomFields/index.html
+++ b/rt/html/Admin/Global/CustomFields/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,7 @@
<ul>
% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></font><br>
+<li><span><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></span><br />
<% $tabs->{$key}{text} %>
</li>
% }
diff --git a/rt/html/Admin/Global/GroupRights.html b/rt/html/Admin/Global/GroupRights.html
index 8d71432e0..7c863d53a 100644
--- a/rt/html/Admin/Global/GroupRights.html
+++ b/rt/html/Admin/Global/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,63 +51,63 @@
Title => loc('Modify global group rights') &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
+ <form method="post" action="GroupRights.html">
-<& /Elements/TitleBoxStart, title => loc('Modify global group rights.')&>
+<&| /Widgets/TitleBox, title => loc('Modify global group rights.')&>
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object =>$RT::System &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>Roles</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToRolesForSystem();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $RT::System &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $RT::System &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Global/MyRT.html b/rt/html/Admin/Global/MyRT.html
new file mode 100644
index 000000000..8bbcb5d34
--- /dev/null
+++ b/rt/html/Admin/Global/MyRT.html
@@ -0,0 +1,104 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Admin/Elements/Header, Title => loc("RT at a glance") &>
+<& /Admin/Elements/SystemTabs,
+ current_tab => 'Admin/Global/MyRT.html',
+ Title => loc("RT at a glance"),
+&>
+
+<& /Widgets/SelectionBox:header, nojs => 1 &>
+
+<& /Elements/ListActions, actions => \@actions &>
+<br />
+% for my $pane (@panes) {
+<&|/Widgets/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &>
+<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &></&>
+<br />
+% }
+<%init>
+my @actions;
+
+my @items = map { [ "component-$_", $_ ] } sort @{$RT::HomepageComponents};
+my $sys = RT::System->new( $session{'CurrentUser'} );
+# XXX: put this in savedsearches_to_portlet_items
+for ( $m->comp( "/Search/Elements/SearchesForObject",
+ Object => $sys )) {
+ my ( $desc, $search ) = @$_;
+ my $SearchType = $search->Content->{'SearchType'} || 'Ticket';
+ if ( $SearchType eq 'Ticket' ) {
+ push @items, [ "system-$desc", $desc ];
+ } else {
+ my $oid = ref($sys) . '-' . $sys->Id . '-SavedSearch-' . $search->Id;
+ my $type =
+ ( $SearchType eq 'Ticket' )
+ ? 'Saved Search' : $SearchType; # loc
+ push @items, [ "saved-$oid", loc($type) . ": $desc" ];
+ }
+}
+
+my ($default_portlets) = $sys->Attributes->Named('HomepageSettings');
+
+my @panes = $m->comp(
+ '/Admin/Elements/ConfigureMyRT',
+ panes => ['body', 'summary'],
+ Action => 'MyRT.html',
+ items => \@items,
+ current_portlets => $default_portlets->Content,
+ OnSave => sub {
+ my ( $conf, $pane ) = @_;
+ $default_portlets->SetContent( $conf );
+ push @actions, loc( 'Global portlet [_1] saved.', $pane );
+ }
+);
+
+$m->comp( '/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1 )
+ for @panes;
+
+
+</%init>
+
diff --git a/rt/html/Admin/Global/Scrip.html b/rt/html/Admin/Global/Scrip.html
index 4e0c1f466..fc72ca969 100644
--- a/rt/html/Admin/Global/Scrip.html
+++ b/rt/html/Admin/Global/Scrip.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,33 +45,40 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Scrips.html',
current_subtab => $current_subtab,
subtabs => $subtabs,
Title => $title &>
-<& /Admin/Elements/EditScrip, title => $title, %ARGS &>
+<& /Elements/ListActions, actions => \@results &>
+<& /Admin/Elements/EditScrip, title => $title, %ARGS, id => $id &>
<%init>
-my ($title, $current_subtab);
my $subtabs = {
- A => { title => loc('Select scrip'),
- path => "Admin/Global/Scrips.html",
- },
- B => { title => loc('New scrip'),
- path => "Admin/Global/Scrip.html?create=1&Queue=0",
- separator => 1,
- }
- };
+ A => {
+ title => loc('Select scrip'),
+ path => "Admin/Global/Scrips.html",
+ },
+ B => {
+ title => loc('New scrip'),
+ path => "Admin/Global/Scrip.html?create=1&Queue=0",
+ separator => 1,
+ },
+};
+
+my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
+my ($id, @results) = $m->comp( '/Admin/Elements/EditScrip:Process', %ARGS );
-if ($ARGS{'id'}) {
- $current_subtab = "Admin/Global/Scrip.html?id=".$ARGS{'id'}."&Queue=0";
+my ($title, $current_subtab);
+if ( $id ) {
+ $current_subtab = "Admin/Global/Scrip.html?id=$id&Queue=0";
$title = loc("Modify a scrip which applies to all queues");
- $subtabs->{"C"} = { title => loc('Scrip #[_1]', $ARGS{'id'}),
- path => "Admin/Global/Scrip.html?id=".$ARGS{'id'}."&Queue=0"
- }
+ $subtabs->{"C"} = {
+ title => loc('Scrip #[_1]', $id),
+ path => "Admin/Global/Scrip.html?id=$id&Queue=0",
+ };
}
else {
$current_subtab = "Admin/Global/Scrip.html?create=1&Queue=0";
diff --git a/rt/html/Admin/Global/Scrips.html b/rt/html/Admin/Global/Scrips.html
index dcfa6ff07..a5fe26757 100644
--- a/rt/html/Admin/Global/Scrips.html
+++ b/rt/html/Admin/Global/Scrips.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Global/Template.html b/rt/html/Admin/Global/Template.html
index 17da59b9e..9d5a40916 100644
--- a/rt/html/Admin/Global/Template.html
+++ b/rt/html/Admin/Global/Template.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,20 +54,20 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="Template.html">
+<form method="post" action="Template.html">
%if ($Create ) {
-<INPUT TYPE=HIDDEN NAME="Template" VALUE="new">
+<input type="hidden" class="hidden" name="Template" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME="Template" VALUE="<%$TemplateObj->Id%>">
+<input type="hidden" class="hidden" name="Template" value="<%$TemplateObj->Id%>" />
% }
%# hang onto the queue id
-<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
+<input type="hidden" class="hidden" name="Queue" value="<%$Queue%>" />
<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description => $TemplateObj->Description, Content => $TemplateObj->Content &>
<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
-</FORM>
+</form>
diff --git a/rt/html/Admin/Global/Templates.html b/rt/html/Admin/Global/Templates.html
index 387326cd1..afd290d3c 100644
--- a/rt/html/Admin/Global/Templates.html
+++ b/rt/html/Admin/Global/Templates.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Global/UserRights.html b/rt/html/Admin/Global/UserRights.html
index 14a4de368..9276b1a19 100644
--- a/rt/html/Admin/Global/UserRights.html
+++ b/rt/html/Admin/Global/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,32 +51,32 @@
Title => loc('Modify global user rights') &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
+ <form method="post" action="UserRights.html">
-<& /Elements/TitleBoxStart, title => loc('Modify global user rights.') &>
+<&| /Widgets/TitleBox, title => loc('Modify global user rights.') &>
-<TABLE>
+<table>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
% my $group = RT::Group->new($session{'CurrentUser'});
% $group->LoadACLEquivalenceGroup($Member->MemberObj);
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $group->PrincipalId,
Object => $RT::System &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Global/index.html b/rt/html/Admin/Global/index.html
index af7a9ddd9..77e9caa9c 100644
--- a/rt/html/Admin/Global/index.html
+++ b/rt/html/Admin/Global/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,7 +52,7 @@
<ul>
% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></font><br>
+<li><span><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></span><br />
<% $tabs->{$key}{text} %>
</li>
% }
@@ -80,7 +82,13 @@
H => { title => loc('User Rights'),
text => loc('Modify global user rights'),
path => 'UserRights.html',
- }
+ },
+ I => { title => loc('RT at a glance'),
+ text => loc('Modify the default "RT at a glance" view'),
+ path => 'MyRT.html',
+ },
+
+
};
</%INIT>
diff --git a/rt/html/Admin/Groups/CustomFields.html b/rt/html/Admin/Groups/CustomFields.html
index c2336b042..8ffa54aab 100644
--- a/rt/html/Admin/Groups/CustomFields.html
+++ b/rt/html/Admin/Groups/CustomFields.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Groups/GroupRights.html b/rt/html/Admin/Groups/GroupRights.html
index d95bdae07..b81b6a938 100644
--- a/rt/html/Admin/Groups/GroupRights.html
+++ b/rt/html/Admin/Groups/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,50 +52,50 @@
Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>">
+ <form method="post" action="GroupRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
-<& /Elements/TitleBoxStart, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
+<&| /Widgets/TitleBox, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
PrincipalType => 'Group',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
PrincipalType => 'Group',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Groups/History.html b/rt/html/Admin/Groups/History.html
index 40dab46e9..ee1d5539c 100644
--- a/rt/html/Admin/Groups/History.html
+++ b/rt/html/Admin/Groups/History.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,7 +54,7 @@
<& /Ticket/Elements/ShowHistory,
Ticket => $GroupObj,
- ShowHeaderModes => 0,
+ ShowDisplayModes => 0,
&>
<%INIT>
diff --git a/rt/html/Admin/Groups/Members.html b/rt/html/Admin/Groups/Members.html
index fd25b2d7f..5d189a122 100644
--- a/rt/html/Admin/Groups/Members.html
+++ b/rt/html/Admin/Groups/Members.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,36 +52,37 @@
<& /Elements/ListActions, actions => \@results &>
-<& /Elements/TitleBoxStart, title => loc('Editing membership for group [_1]', $Group->Name) &>
+<&| /Widgets/TitleBox, title => loc('Editing membership for group [_1]', $Group->Name) &>
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Members.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
-<TABLE WIDTH="100%">
-<TR>
-<TD>
+<form action="<%$RT::WebPath%>/Admin/Groups/Members.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
+<table width="100%">
+<tr>
+<td>
<h3><&|/l&>Current members</&></h3>
-</TD>
-<TD>
+</td>
+<td>
<h3><&|/l&>Add members</&></h3>
-</TD>
-</TR>
+</td>
+</tr>
-<TR>
-<TD VALIGN=TOP>
+<tr>
+<td valign="top">
% if ($Group->MembersObj->Count == 0 ) {
-<i><&|/l&>(No members)</&></i>
+<em><&|/l&>(No members)</&></em>
% } else {
-<i><&|/l&>(Check box to delete)</&></i>
-<br>
-<br>
+<em><&|/l&>(Check box to delete)</&></em>
+<br />
+<br />
<&|/l&>Users</&>
-% my $UserMembers = $Group->MembersObj;
-% $UserMembers->LimitToUsers();
-<UL>
-% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
-<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
+% my $Users = $Group->UserMembersObj;
+% $Users->OrderBy( FIELD => $UserOrderBy, ORDER => $UserOrder );
+<ul>
+% while (my $user = $Users->Next()) {
+% $UsersSeen{$user->id} = 1 if $SkipSeenUsers;
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$user->PrincipalObj->Id%>" value="1" />
+<%$user->Name%> (<%$user->RealName%>)
% }
</ul>
<&|/l&>Groups</&>
@@ -87,18 +90,20 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+% $GroupsSeen{$member->MemberId} = 1 if $SkipSeenGroups;
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%>
% }
% }
-</UL>
-</TD>
-<TD VALIGN=TOP>
-<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group &>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
+</ul>
+</td>
+<td valign="top">
+<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group,
+ SkipUsers => \%UsersSeen, SkipGroups => \%GroupsSeen &>
+</td>
+</tr>
+</table>
+</&>
<& /Elements/Submit, Label => loc('Modify Members'), Reset => 1 &>
</form>
@@ -146,6 +151,9 @@ foreach my $member (@AddMembers) {
push (@results, $msg);
}
+my %UsersSeen;
+my %GroupsSeen;
+$GroupsSeen{$Group->id} = 1; # can't be a member of ourself
</%INIT>
@@ -153,4 +161,8 @@ foreach my $member (@AddMembers) {
$AddMembersUsers => undef
$AddMembersGroups => undef
$id => undef
+$UserOrderBy => 'Name'
+$UserOrder => 'ASC'
+$SkipSeenUsers => 1
+$SkipSeenGroups => 1
</%ARGS>
diff --git a/rt/html/Admin/Groups/Modify.html b/rt/html/Admin/Groups/Modify.html
index 94c0203b1..1e3b03958 100644
--- a/rt/html/Admin/Groups/Modify.html
+++ b/rt/html/Admin/Groups/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -53,38 +55,38 @@
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<form action="<%$RT::WebPath%>/Admin/Groups/Modify.html" method="post" enctype="multipart/form-data">
%unless ($Group->Id) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
% }
-<TABLE>
-<TR><TD ALIGN=RIGHT>
+<table>
+<tr><td align="right">
<&|/l&>Name</&>:
-</TD>
-<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD>
-</TR>
+</td>
+<td><input name="Name" value="<%$Group->Name%>" /></td>
+</tr>
+<tr>
+<td align="right">
+<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<%$Group->Description%>" size="60" /></td>
+</tr>
% my $CFs = $Group->CustomFields;
% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
+<tr valign="top"><td align="right">
<% $CF->Name %>:
-</TD><TD>
+</td><td>
<& /Elements/EditCustomField, CustomField => $CF, Object => $Group &>
-</TD></TR>
+</td></tr>
% }
-<TR>
-<TD COLSPAN=2>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
-</TR>
+<tr>
+<td colspan="2">
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this group)</&><br />
+</tr>
<& /Elements/Callback, GroupObj => $Group, results => \@results, %ARGS &>
-</TABLE>
+</table>
<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
</form>
<%INIT>
diff --git a/rt/html/Admin/Groups/UserRights.html b/rt/html/Admin/Groups/UserRights.html
index 5237b1578..b77edb011 100644
--- a/rt/html/Admin/Groups/UserRights.html
+++ b/rt/html/Admin/Groups/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,32 +52,32 @@
Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>">
+ <form method="post" action="UserRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
-<& /Elements/TitleBoxStart, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
+<&| /Widgets/TitleBox, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
-<TABLE>
+<table>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Member->MemberObj->Id,
PrincipalType => 'User',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
- </TABLE>
+ </table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Groups/index.html b/rt/html/Admin/Groups/index.html
index 073440696..384092bdf 100644
--- a/rt/html/Admin/Groups/index.html
+++ b/rt/html/Admin/Groups/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,37 +49,41 @@
<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/',
current_subtab => 'Admin/Groups/',
Title => $title &>
-<%$caption%>:<BR> <UL>
+<%$caption%>:<br /> <ul>
%if ($Groups->Count == 0) {
-<LI> <i><&|/l&>No groups matching search criteria found.</&></i>
+<li> <em><&|/l&>No groups matching search criteria found.</&></em>
% }
%my @ids;
%while ( my $Group = $Groups->Next) {
% push @ids, $Group->Id;
-<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><BR>
+<li><a href="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><br />
%}
-</UL>
+</ul>
%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/Group/<% $ids %>/Groups.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
+<em>(<a href="<%$RT::WebPath%>/Download/Tabular/Group/<% $ids %>/Groups.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br />
%}
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<input type="checkbox" name="FindDisabledGroups" value="1"> <&|/l&>Include disabled groups in listing.</&>
-<BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+<br /><br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Groups/index.html">
+<input type="checkbox" class="checkbox" name="FindDisabledGroups" value="1" /> <&|/l&>Include disabled groups in listing.</&>
+<br />
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+<br /><br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Groups/index.html">
+<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><br />
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
$Groups->LimitToUserDefinedGroups();
my $title = loc('Select a group');
my $caption;
+if ($FindDisabledGroups) {
+ $Groups->FindAllRows();
+}
+
if (length $GroupString) {
$caption = loc("Groups matching search criteria");
if ($GroupField =~ /^CustomField-(\d+)/) {
diff --git a/rt/html/Admin/Queues/CustomField.html b/rt/html/Admin/Queues/CustomField.html
index 5beba58c8..52829277e 100644
--- a/rt/html/Admin/Queues/CustomField.html
+++ b/rt/html/Admin/Queues/CustomField.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Queues/CustomFields.html b/rt/html/Admin/Queues/CustomFields.html
index 4d7e08875..8ce4f525d 100644
--- a/rt/html/Admin/Queues/CustomFields.html
+++ b/rt/html/Admin/Queues/CustomFields.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Queues/GroupRights.html b/rt/html/Admin/Queues/GroupRights.html
index c5a12bfa3..85075bdea 100644
--- a/rt/html/Admin/Queues/GroupRights.html
+++ b/rt/html/Admin/Queues/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,63 +52,63 @@
Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
+ <form method="post" action="GroupRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $QueueObj->id %>" />
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $QueueObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>Roles</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToRolesForQueue($QueueObj->Id);
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $QueueObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $QueueObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Queues/Modify.html b/rt/html/Admin/Queues/Modify.html
index 5517a80c0..e84d14fa4 100644
--- a/rt/html/Admin/Queues/Modify.html
+++ b/rt/html/Admin/Queues/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,62 +54,62 @@
-<FORM ACTION="<%$RT::WebPath%>/Admin/Queues/Modify.html" METHOD=POST>
+<form action="<%$RT::WebPath%>/Admin/Queues/Modify.html" method="post">
%if ($Create ) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$QueueObj->Id%>" />
% }
-<TABLE>
-<TR><TD ALIGN=RIGHT>
+<table>
+<tr><td align="right">
<&|/l&>Queue Name</&>:
-</TD>
-<TD><INPUT name="Name" value="<% ($Create) ? "" : $QueueObj->Name %>"></TD>
-</TR><TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<% ($Create) ? "" : $QueueObj->Description %>" size=60></TD></TR>
-<TR>
-<TD ALIGN=RIGHT>
+</td>
+<td><input name="Name" value="<% ($Create) ? "" : $QueueObj->Name %>" /></td>
+</tr><tr>
+<td align="right">
+<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<% ($Create) ? "" : $QueueObj->Description %>" size="60" /></td></tr>
+<tr>
+<td align="right">
<&|/l&>Reply Address</&>:
-</TD><TD>
-<INPUT name="CorrespondAddress" value="<% ($Create) ? "" : $QueueObj->CorrespondAddress %>">
-<BR><font size="-1"><i><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1])</&></i></font>
-</TD>
-<TD ALIGN=RIGHT>
-
-<&|/l&>Comment Address</&>: </TD><TD>
-<INPUT NAME="CommentAddress" value="<% ($Create) ? "" : $QueueObj->CommentAddress %>">
-<BR><font size="-1"><i><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1])</&></i></font>
-</TD>
-</TR><TR>
-
-<TD ALIGN=RIGHT>
+</td><td>
+<input name="CorrespondAddress" value="<% ($Create) ? "" : $QueueObj->CorrespondAddress %>" />
+<br /><span><em><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1])</&></em></span>
+</td>
+<td align="right">
+
+<&|/l&>Comment Address</&>: </td><td>
+<input name="CommentAddress" value="<% ($Create) ? "" : $QueueObj->CommentAddress %>" />
+<br /><span><em><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1])</&></em></span>
+</td>
+</tr><tr>
+
+<td align="right">
<&|/l&>Priority starts at</&>:
-</TD><TD><INPUT NAME="InitialPriority" value="<% ($Create) ? "" : $QueueObj->InitialPriority %>">
-</TD>
-<TD ALIGN=RIGHT>
+</td><td><input name="InitialPriority" value="<% ($Create) ? "" : $QueueObj->InitialPriority %>" />
+</td>
+<td align="right">
<&|/l&>Over time, priority moves toward</&>:
-</TD><TD><INPUT NAME="FinalPriority" value="<% ($Create) ? "" : $QueueObj->FinalPriority %>">
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
+</td><td><input name="FinalPriority" value="<% ($Create) ? "" : $QueueObj->FinalPriority %>" />
+</td>
+</tr>
+<tr>
+<td align="right">
<&|/l&>Requests should be due in</&>:
-</TD><TD>
-<INPUT NAME="DefaultDueIn" VALUE="<% ($Create) ? "" : $QueueObj->DefaultDueIn%>"> <&|/l&>days</&>.
-</TD>
-</TR>
-<TR>
-<TD>
-</TD>
-<TD COLSPAN=4><INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this queue)</&><BR>
+</td><td>
+<input name="DefaultDueIn" value="<% ($Create) ? "" : $QueueObj->DefaultDueIn%>" /> <&|/l&>days</&>.
+</td>
+</tr>
+<tr>
+<td>
+</td>
+<td colspan="4"><input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this queue)</&><br />
<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
-</TD>
-</TR>
+</td>
+</tr>
-</TABLE>
+</table>
<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
diff --git a/rt/html/Admin/Queues/People.html b/rt/html/Admin/Queues/People.html
index e29b9d34f..4eeda3c4f 100644
--- a/rt/html/Admin/Queues/People.html
+++ b/rt/html/Admin/Queues/People.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,12 +54,12 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="People.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
+<form method="post" action="People.html">
+<input type="hidden" class="hidden" name="id" value="<%$QueueObj->Id%>" />
-<TABLE WIDTH=100%>
-<TR>
-<TD VALIGN=TOP >
+<table width="100%">
+<tr>
+<td valign="top" >
<h3><&|/l&>Current watchers</&></h3>
@@ -71,25 +73,25 @@
<& /Admin/Elements/EditQueueWatchers, QueueObj => $QueueObj, Watchers => $QueueObj->AdminCc &>
-</TD>
-<TD VALIGN=TOP>
+</td>
+<td valign="top">
<h3><&|/l&>New watchers</&></h3>
-<&|/l&>Find people whose</&><BR>
+<&|/l&>Find people whose</&><br />
<& /Elements/SelectUsers &>
-<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>">
-<BR>
-<&|/l&>Find groups whose</&><BR>
+<input type="submit" class="button" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+<br />
+<&|/l&>Find groups whose</&><br />
<& /Elements/SelectGroups &>
-<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>">
+<input type="submit" class="button" name="OnlySearchForGroup" value="<&|/l&>Go!</&>" />
<p>
-<&|/l&>Add new watchers</&>:<br>
+<&|/l&>Add new watchers</&>:<br />
<p>
-<b><&|/l&>Users</&></b>
+<strong><&|/l&>Users</&></strong>
% if ($user_msg) {
-<br>
-<i><%$user_msg%></i>
+<br />
+<em><%$user_msg%></em>
% } elsif ($Users) {
<ul>
% while (my $u = $Users->Next ) {
@@ -101,11 +103,11 @@
% }
<p>
-<b><&|/l&>Groups</&></b>
+<strong><&|/l&>Groups</&></strong>
% if ($group_msg) {
-<br>
-<i><%$group_msg%></i>
+<br />
+<em><%$group_msg%></em>
% } elsif ($Groups) {
<ul>
% while (my $g = $Groups->Next ) {
@@ -116,9 +118,9 @@
</ul>
% }
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
diff --git a/rt/html/Admin/Queues/Scrip.html b/rt/html/Admin/Queues/Scrip.html
index 1223fbfed..190be8b48 100644
--- a/rt/html/Admin/Queues/Scrip.html
+++ b/rt/html/Admin/Queues/Scrip.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,46 +46,55 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
- QueueObj => $QueueObj,
- current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id,
- current_subtab => $current_subtab,
- subtabs => $subtabs,
+<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
+ QueueObj => $QueueObj,
+ current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id,
+ current_subtab => $current_subtab,
+ subtabs => $subtabs,
Title => $title &>
-<& /Admin/Elements/EditScrip, title => $title, %ARGS &>
+<& /Elements/ListActions, actions => \@results &>
+<& /Admin/Elements/EditScrip, title => $title, %ARGS, id => $id &>
+
<%init>
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load($Queue);
+my $QueueObj = RT::Queue->new( $session{'CurrentUser'} );
+$QueueObj->Load( $Queue );
+unless( $QueueObj->id ) {
+ Abort(loc("Queue [_1] not found", $id));
+}
my ($title, $current_subtab);
-my $subtabs = {
- A => { title => loc('Select scrip'),
- path => "Admin/Queues/Scrips.html?id=".$QueueObj->id,
- },
- B => { title => loc('New scrip'),
- path => "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id,
- separator => 1,
- },
- };
+my $subtabs = {
+ A => {
+ title => loc('Select scrip'),
+ path => "Admin/Queues/Scrips.html?id=".$QueueObj->id,
+ },
+ B => {
+ title => loc('New scrip'),
+ path => "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id,
+ separator => 1,
+ },
+};
-unless($QueueObj->id) {
- Abort(loc("Queue [_1] not found",$id));
-}
-if ($id) {
- $current_subtab = "Admin/Queues/Scrip.html?id=".$id."&Queue=".$QueueObj->id;
+my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
+($id, my @results) = $m->comp( '/Admin/Elements/EditScrip:Process', %ARGS );
+
+if ( $id ) {
+ $current_subtab = "Admin/Queues/Scrip.html?id=$id&Queue=". $QueueObj->id;
$title = loc("Modify a scrip for queue [_1]", $QueueObj->Name);
- $subtabs->{"C"} = { title => loc("Scrip #[_1]",$id),
- path => "Admin/Queues/Scrip.html?id=$id&Queue=".$QueueObj->id };
+ $subtabs->{"C"} = {
+ title => loc("Scrip #[_1]",$id),
+ path => "Admin/Queues/Scrip.html?id=$id&Queue=".$QueueObj->id
+ };
} else {
$current_subtab = "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id;
$title = loc("Create a scrip for queue [_1]", $QueueObj->Name);
}
-
+
</%init>
<%ARGS>
-$id => undef
+$id => undef
$Queue => undef
</%ARGS>
diff --git a/rt/html/Admin/Queues/Scrips.html b/rt/html/Admin/Queues/Scrips.html
index e7092fb22..8fb0db400 100644
--- a/rt/html/Admin/Queues/Scrips.html
+++ b/rt/html/Admin/Queues/Scrips.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -54,7 +56,7 @@
% if (!$QueueObj->Disabled) { # Global scrips does not apply to disabled queues
<h2><&|/l&>Scrips which apply to all queues</&></h2>
<& /Admin/Elements/ListGlobalScrips &>
-<BR>
+<br />
% }
<& /Admin/Elements/EditScrips, title => $title, %ARGS &>
<%init>
diff --git a/rt/html/Admin/Queues/Template.html b/rt/html/Admin/Queues/Template.html
index c60a90900..2d6343f99 100644
--- a/rt/html/Admin/Queues/Template.html
+++ b/rt/html/Admin/Queues/Template.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,19 +54,19 @@
Title => $title &>
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="Template.html">
+<form method="post" action="Template.html">
%if ($Create ) {
-<INPUT TYPE=HIDDEN NAME="Template" VALUE="new">
+<input type="hidden" class="hidden" name="Template" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME="Template" VALUE="<%$TemplateObj->Id%>">
+<input type="hidden" class="hidden" name="Template" value="<%$TemplateObj->Id%>" />
% }
%# hang onto the queue id
-<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
+<input type="hidden" class="hidden" name="Queue" value="<%$Queue%>" />
<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description =>
$TemplateObj->Description, Content => $TemplateObj->Content &>
<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
-</FORM>
+</form>
<%INIT>
diff --git a/rt/html/Admin/Queues/Templates.html b/rt/html/Admin/Queues/Templates.html
index 888fdbc8a..d62b4971c 100644
--- a/rt/html/Admin/Queues/Templates.html
+++ b/rt/html/Admin/Queues/Templates.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Queues/UserRights.html b/rt/html/Admin/Queues/UserRights.html
index 399992ae2..c277f1797 100644
--- a/rt/html/Admin/Queues/UserRights.html
+++ b/rt/html/Admin/Queues/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,31 +52,31 @@
Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
+ <form method="post" action="UserRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $QueueObj->id %>" />
-<TABLE>
+<table>
<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
% my $group = RT::Group->new($session{'CurrentUser'});
% $group->LoadACLEquivalenceGroup($Member->MemberObj);
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId,
Object => $QueueObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
- </TABLE>
+ </table>
<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Queues/index.html b/rt/html/Admin/Queues/index.html
index 28adf531c..bfa760409 100644
--- a/rt/html/Admin/Queues/index.html
+++ b/rt/html/Admin/Queues/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,19 +54,19 @@
<h1><%$caption%></h1>
<p><&|/l&>Select a queue</&>:</p>
-<UL>
+<ul>
%if ($queues->Count == 0) {
-<li><i><&|/l&>No queues matching search criteria found.</&></i></li>
+<li><em><&|/l&>No queues matching search criteria found.</&></em></li>
% }
%while ( $queue = $queues->Next) {
-<li><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></li>
+<li><a href="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></li>
%}
-</UL>
-<BR>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Queues/index.html">
-<input type="checkbox" name="FindDisabledQueues" value="1"> <&|/l&>Include disabled queues in listing.</&>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+</ul>
+<br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Queues/index.html">
+<input type="checkbox" class="checkbox" name="FindDisabledQueues" value="1" /> <&|/l&>Include disabled queues in listing.</&>
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
<%INIT>
my ($queue, $caption);
diff --git a/rt/html/Admin/Tools/Configuration.html b/rt/html/Admin/Tools/Configuration.html
index bc5ca69a1..205b9a0b2 100644
--- a/rt/html/Admin/Tools/Configuration.html
+++ b/rt/html/Admin/Tools/Configuration.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -65,7 +67,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
<pre>
% my $report = Module::Versions::Report::report();
% my @report = grep { /v\d/ } split("\n",$report);
-<%join('<br>', @report)|n%>
+<%join('<br />', @report)|n%>
</pre>
@@ -81,7 +83,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
<tr><td>RT::<%$key%></td>
<td>
% if ($key =~ /Password(?!Length)/i) {
-<i>Password not printed</i>
+<em>Password not printed</em>
% } else {
<%${'RT::'.$key} %>
% }
diff --git a/rt/html/Admin/Tools/index.html b/rt/html/Admin/Tools/index.html
index 49cfac3ee..3b4ec62c6 100644
--- a/rt/html/Admin/Tools/index.html
+++ b/rt/html/Admin/Tools/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Users/CustomFields.html b/rt/html/Admin/Users/CustomFields.html
index 5662c6c16..1455c1de6 100644
--- a/rt/html/Admin/Users/CustomFields.html
+++ b/rt/html/Admin/Users/CustomFields.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Users/History.html b/rt/html/Admin/Users/History.html
index 024a90b00..e47f67e78 100644
--- a/rt/html/Admin/Users/History.html
+++ b/rt/html/Admin/Users/History.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,7 +54,7 @@
<& /Ticket/Elements/ShowHistory,
Ticket => $UserObj,
- ShowHeaderModes => 0,
+ ShowDisplayModes => 0,
&>
<%INIT>
diff --git a/rt/html/Admin/Users/Memberships.html b/rt/html/Admin/Users/Memberships.html
index 3e632393f..493cb0f12 100644
--- a/rt/html/Admin/Users/Memberships.html
+++ b/rt/html/Admin/Users/Memberships.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html
index 8a24f9c4a..9198cbe78 100644
--- a/rt/html/Admin/Users/Modify.html
+++ b/rt/html/Admin/Users/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,188 +54,189 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<form action="<%$RT::WebPath%>/Admin/Users/Modify.html" method="post" enctype="multipart/form-data">
%if ($Create) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$UserObj->Id%>" />
% }
-<TABLE WIDTH=100% BORDER=0>
-<TR>
+<table width="100%" border="0">
+<tr>
-<TD VALIGN=TOP class="boxcontainer">
-<& /Elements/TitleBoxStart, title => loc('Identity') &>
+<td valign="top" class="boxcontainer">
+<&| /Widgets/TitleBox, title => loc('Identity') &>
-<TABLE>
-<TR><TD ALIGN="RIGHT">
+<table>
+<tr><td align="right">
<&|/l&>Username</&>:
-</TD><TD>
-<input name="Name" value="<%$UserObj->Name%>"> <b><&|/l&>(required)</&></b>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Name" value="<%$UserObj->Name%>" /> <strong><&|/l&>(required)</&></strong>
+</td></tr>
+<tr><td align="right">
<&|/l&>Email</&>:
-</TD><TD>
-<input name="EmailAddress" value="<%$UserObj->EmailAddress%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="EmailAddress" value="<%$UserObj->EmailAddress%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Real Name</&>:
-</TD><TD>
-<input name="RealName" value="<%$UserObj->RealName%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="RealName" value="<%$UserObj->RealName%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Nickname</&>:
-</TD><TD>
-<input name="NickName" value="<%$UserObj->NickName%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="NickName" value="<%$UserObj->NickName%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Unix login</&>:
-</TD><TD>
-<input name="Gecos" value="<%$UserObj->Gecos%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Gecos" value="<%$UserObj->Gecos%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Language</&>:
-</TD><TD>
+</td><td>
<& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td></tr>
+<tr><td align="right">
<&|/l&>Extra info</&>:
-</TD><TD>
-<textarea name="FreeformContactInfo" cols=20 rows=5><%$UserObj->FreeformContactInfo%></TEXTAREA>
-</TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<br>
-<& /Elements/TitleBoxStart, title => loc('Access control') &>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>>
-<&|/l&>Let this user access RT</&><BR>
-
-
-<INPUT TYPE=HIDDEN NAME="SetPrivileged" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Privileged" VALUE="1" <%$PrivilegedChecked%>> <&|/l&>Let this user be granted rights</&><BR>
+</td><td>
+<textarea name="FreeformContactInfo" cols="20" rows="5"><%$UserObj->FreeformContactInfo%></textarea>
+</td></tr>
+</table>
+</&>
+<br />
+<&| /Widgets/TitleBox, title => loc('Access control') &>
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> />
+<&|/l&>Let this user access RT</&><br />
+
+
+<input type="hidden" class="hidden" name="SetPrivileged" value="1" />
+<input type="checkbox" class="checkbox" name="Privileged" value="1" <%$PrivilegedChecked%> /> <&|/l&>Let this user be granted rights</&><br />
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<TABLE>
-<TR>
-<TD ALIGN=RIGHT>
+<table>
+<tr>
+<td align="right">
<&|/l&>New Password</&>:
-</TD>
-<TD ALIGN=LEFT>
-<input type=password name="Pass1">
-</TD>
-</TR>
-<TR><TD ALIGN=RIGHT>
+</td>
+<td align="left">
+<input type="password" name="Pass1" />
+</td>
+</tr>
+<tr><td align="right">
<&|/l&>Retype Password</&>:
-</TD>
-<TD>
-<input type=password name="Pass2">
-</TD>
-</TR>
-</TABLE>
+</td>
+<td>
+<input type="password" name="Pass2" />
+</td>
+</tr>
+</table>
% }
-<& /Elements/TitleBoxEnd &>
-</TD>
+</&>
+</td>
-<TD VALIGN=TOP class="boxcontainer">
-<& /Elements/TitleBoxStart, title => loc('Location') &>
-<TABLE>
-<TR><TD ALIGN="RIGHT">
+<td valign="top" class="boxcontainer">
+<&| /Widgets/TitleBox, title => loc('Location') &>
+<table>
+<tr><td align="right">
<&|/l&>Organization</&>:
-</TD><TD>
-<input name="Organization" value="<%$UserObj->Organization%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Organization" value="<%$UserObj->Organization%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Address1</&>:
-</TD><TD>
-<input name="Address1" value="<%$UserObj->Address1%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Address1" value="<%$UserObj->Address1%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Address2</&>:
-</TD><TD>
-<input name="Address2" value="<%$UserObj->Address2%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Address2" value="<%$UserObj->Address2%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>City</&>:
-</TD><TD>
-<input name="City" value="<%$UserObj->City%>" size=14>
+</td><td>
+<input name="City" value="<%$UserObj->City%>" size="14" />
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td></tr>
+<tr><td align="right">
<&|/l&>State</&>:
-</TD><TD>
-<input name="State" value="<%$UserObj->State%>" size=3>
+</td><td>
+<input name="State" value="<%$UserObj->State%>" size="3" />
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td></tr>
+<tr><td align="right">
<&|/l&>Zip</&>:
-</TD><TD>
-<input name="Zip" value="<%$UserObj->Zip%>" size=9>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Zip" value="<%$UserObj->Zip%>" size="9" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Country</&>:
-</TD><TD>
-<input name="Country" value="<%$UserObj->Country%>">
-</TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<br>
-<& /Elements/TitleBoxStart, title => loc('Phone numbers') &>
-<TABLE>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Country" value="<%$UserObj->Country%>" />
+</td></tr>
+</table>
+</&>
+<br />
+<&| /Widgets/TitleBox, title => loc('Phone numbers') &>
+<table>
+<tr><td align="right">
<&|/l&>Residence</&>:
-</TD><TD>
-<input name="HomePhone" value="<%$UserObj->HomePhone%>" size=13><br>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="HomePhone" value="<%$UserObj->HomePhone%>" size="13" /><br />
+</td></tr>
+<tr><td align="right">
<&|/l&>Work</&>:
-</TD><TD>
-<input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size=13><br>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size="13" /><br />
+</td></tr>
+<tr><td align="right">
<&|/l&>Mobile</&>:
-</TD><TD>
-<input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size=13><br>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size="13" /><br />
+</td></tr>
+<tr><td align="right">
<&|/l&>Pager</&>:
-</TD><TD>
-<input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size=13><br>
-<& /Elements/TitleBoxEnd &>
-</TD>
-
-<TR>
-</TR>
-</TABLE>
-<BR>
-<& /Elements/TitleBoxStart, title => loc('Custom Fields') &>
-<TABLE>
+</td><td>
+<input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size="13" /><br />
+</td>
+</table>
+</&>
+<br />
+<&| /Widgets/TitleBox, title => loc('Custom Fields') &>
+<table>
% my $CFs = $UserObj->CustomFields;
% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
+<tr valign="top"><td align="right">
<% $CF->Name %>:
-</TD><TD>
+</td><td>
+% if ($UserObj->id) {
<& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $CF &>
-</TD></TR>
+% } else {
+<& /Elements/EditCustomField, %ARGS, NamePrefix => 'Object-RT::User-new-CustomField-', CustomField => $CF &>
+% }
+</td></tr>
% }
-<TR>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<TR>
-<TD colspan="2">
-<& /Elements/TitleBoxStart, title => loc('Comments about this user') &>
-<TEXTAREA class="comments" name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
+<tr>
+</tr>
+</table>
+</&>
+<tr>
+<td colspan="2">
+<&| /Widgets/TitleBox, title => loc('Comments about this user') &>
+<textarea class="comments" name="Comments" cols="80" rows="5" wrap="virtual"><%$UserObj->Comments%></textarea>
+</&>
%if ($UserObj->Privileged) {
-<BR>
-<& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA class="signature" COLS=80 ROWS=5 name="Signature" WRAP=HARD><%$UserObj->Signature%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
+<br />
+<&| /Widgets/TitleBox, title => loc('Signature') &>
+<textarea class="signature" cols="80" rows="5" name="Signature" wrap="hard"><%$UserObj->Signature%></textarea>
+</&>
% }
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
@@ -289,12 +292,19 @@ else {
if ($val) {
push @results, $msg;
+ foreach my $key ( keys %ARGS) {
+ # Convert custom fields on the "new" object to custom fields on the one we've just created
+ if ($key =~ /^Object-RT::User-new-CustomField-(.*)$/) {
+ $ARGS{'Object-RT::User-'.$val.'-CustomField-'.$1} = delete $ARGS{$key};
+ }
+ }
+ push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
} else {
push @results, loc('User could not be created: [_1]', $msg);
}
} else {
- $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'");
- $val = $UserObj->Id();
+ $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'");
+ $val = $UserObj->Id();
}
if ($val) {
diff --git a/rt/html/Admin/Users/MyRT.html b/rt/html/Admin/Users/MyRT.html
new file mode 100644
index 000000000..6eed0ab68
--- /dev/null
+++ b/rt/html/Admin/Users/MyRT.html
@@ -0,0 +1,132 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/UserTabs,
+ id => $id,
+ UserObj => $UserObj,
+ current_tab => $current_tab,
+ Title => $title &>
+
+<& /Widgets/SelectionBox:header, nojs => 1 &>
+
+<& /Elements/ListActions, actions => \@actions &>
+
+<form method="post" action="MyRT.html">
+<input type="hidden" name="id" value="<% $id %>" />
+<input type="hidden" name="Reset" value="1" />
+<input type="submit" class="button" value="<%loc('Reset to default')%>">
+</form>
+
+<br />
+
+% for my $pane (@panes) {
+<&|/Widgets/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &>
+<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &></&>
+<br />
+% }
+
+<%init>
+my $current_tab = 'Admin/Users/MyRT.html?id='.$id;
+my $UserObj = new RT::User($session{'CurrentUser'});
+$UserObj->Load($id) || Abort("Couldn't load user '$id'");
+my $title = loc("RT at a glance for the user [_1]", $UserObj->Name);
+
+if ($ARGS{Reset}) {
+ $UserObj->SetPreferences('HomepageSettings', {});
+}
+
+my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
+my $portlets = $UserObj->Preferences('HomepageSettings', $default_portlets ? $default_portlets->Content : {});
+
+my %allowed_components = map {$_ => 1} @{$RT::HomepageComponents};
+my @items;
+
+push @items, map {["component-$_", $_]} sort keys %allowed_components;
+
+my $sys = RT::System->new( RT::CurrentUser->new($UserObj) );
+my @objs = ($sys);
+
+push @objs, RT::SavedSearches->new( RT::CurrentUser->new( $UserObj ) )->_PrivacyObjects;
+my @actions;
+
+for my $object (@objs) {
+ for ($m->comp("/Search/Elements/SearchesForObject", Object => $object)) {
+ my ($desc, $search) = @$_;
+ my $SearchType = $search->Content->{'SearchType'} || 'Ticket';
+ if ($object eq $sys && $SearchType eq 'Ticket') {
+ push @items, ["system-$desc", $desc];
+ }
+ else {
+ my $oid = ref($object).'-'.$object->Id.'-SavedSearch-'.$search->Id;
+ my $type = ($SearchType eq 'Ticket')
+ ? 'Saved Search' : $SearchType; # loc
+ push @items, ["saved-$oid", loc($type).": $desc"];
+ }
+ }
+}
+
+my @panes = $m->comp(
+ '/Admin/Elements/ConfigureMyRT',
+ panes => ['body', 'summary'],
+ Action => "MyRT.html?id=$id",
+ items => \@items,
+ current_portlets => $portlets,
+ OnSave => sub {
+ my ( $conf, $pane ) = @_;
+ $UserObj->SetPreferences( 'HomepageSettings', $conf );
+ push @actions, loc( 'Preferences [_1] for user [_2] .', $pane, $UserObj->Name );
+ }
+);
+
+$m->comp( '/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1 )
+ for @panes;
+
+</%init>
+<%ARGS>
+$id => undef
+</%ARGS>
diff --git a/rt/html/Admin/Users/index.html b/rt/html/Admin/Users/index.html
index 1bbe867f7..bc47d4fef 100644
--- a/rt/html/Admin/Users/index.html
+++ b/rt/html/Admin/Users/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,26 +54,26 @@
<p><&|/l&>Select a user</&>:</p>
<ul>
%if ($users->Count == 0) {
-<li><i><&|/l&>No users matching search criteria found.</&></i></li>
+<li><em><&|/l&>No users matching search criteria found.</&></em></li>
% }
%my @ids;
%while ( $user = $users->Next) {
% push @ids, $user->Id;
-<LI><A HREF="Modify.html?id=<%$user->id%>"><%$user->Name || loc('(no name listed)')%></a></LI>
+<li><a href="Modify.html?id=<%$user->id%>"><%$user->Name || loc('(no name listed)')%></a></li>
%}
-</UL>
+</ul>
%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/User/<% $ids %>/Users.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
+<em>(<a href="<%$RT::WebPath%>/Download/Tabular/User/<% $ids %>/Users.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br />
%}
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Users/index.html">
+<br /><br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Users/index.html">
-<&|/l&>Find people whose</&> <& /Elements/SelectUsers &><BR>
-<input type="checkbox" name="FindDisabledUsers" value="1"> <&|/l&>Include disabled users in search.</&>
-<BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+<&|/l&>Find people whose</&> <& /Elements/SelectUsers &><br />
+<input type="checkbox" class="checkbox" name="FindDisabledUsers" value="1" /> <&|/l&>Include disabled users in search.</&>
+<br />
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
<%INIT>
my ($user, $caption);
diff --git a/rt/html/Admin/autohandler b/rt/html/Admin/autohandler
index def61010a..b346cbc20 100644
--- a/rt/html/Admin/autohandler
+++ b/rt/html/Admin/autohandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/index.html b/rt/html/Admin/index.html
index 01ba24d2d..c89a88350 100644
--- a/rt/html/Admin/index.html
+++ b/rt/html/Admin/index.html
@@ -2,10 +2,10 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices),
+%# (Except where explicitly superseded by other copyright notices)
%#
%#
%# LICENSE:
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -31,7 +33,7 @@
%# to you to modify and distribute this software under the terms of
%# the GNU General Public License and is only of importance to you if
%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.),
+%# community by submitting them to Best Practical Solutions, LLC.)
%#
%# By intentionally submitting any modifications, corrections or
%# derivatives to this work, or any other work intended for use with
@@ -48,7 +50,7 @@
<ul>
% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<%$RT::WebPath%>/<%$tabs->{$key}->{'path'}|n %>"><%$tabs->{$key} ->{'title'}%></a></font><br>
+<li><span><a href="<%$RT::WebPath%>/<%$tabs->{$key}->{'path'}|n %>"><%$tabs->{$key} ->{'title'}%></a></span><br />
<%$tabs->{$key}->{description}%>
</li>
%}
diff --git a/rt/html/Approvals/Display.html b/rt/html/Approvals/Display.html
index d9d6df582..477959798 100644
--- a/rt/html/Approvals/Display.html
+++ b/rt/html/Approvals/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,15 +50,13 @@
<& Elements/Tabs,
current_tab => "Approvals/Display.html",
Title => $title &>
-<form method=post action="<%$RT::WebPath%>/Approvals/index.html">
+<form method="post" action="<%$RT::WebPath%>/Approvals/index.html">
-<& /Elements/TitleBoxStart, title => $title &>
+<&| /Widgets/TitleBox, title => $title &>
<& /Ticket/Elements/ShowHistory , Ticket => $Ticket, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
<hr>
-<table width=100%>
<& Elements/Approve, ticket => $Ticket, ShowApproving => 0 &>
-</table>
-<& /Elements/TitleBoxEnd &>
+</&>
<& /Elements/Submit&>
</form>
<& Elements/ShowDependency, Ticket => $Ticket &>
diff --git a/rt/html/Approvals/Elements/Approve b/rt/html/Approvals/Elements/Approve
index bf786fb03..6dd562a32 100644
--- a/rt/html/Approvals/Elements/Approve
+++ b/rt/html/Approvals/Elements/Approve
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,36 +45,50 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr bgcolor="#b9b9ff">
-<td colspan=2><font size="3">
-<a href="<%$RT::WebPath%>/Approvals/Display.html?id=<%$ticket->Id%>"><% loc("#[_1]: [_2]", $ticket->Id, $ticket->Subject) %></a> (<%loc($ticket->Status)%>)</font></td>
-</tr>
+<div class="approval">
+ <div class="name">
+ <a href="<%$RT::WebPath%>/Approvals/Display.html?id=<%$ticket->Id%>"><% loc("#[_1]: [_2]", $ticket->Id, $ticket->Subject) %></a> (<%loc($ticket->Status)%>)
+ </div>
% if ($ShowApproving) {
% foreach my $approving ( $ticket->AllDependedOnBy( Type => 'ticket' ) ) {
-<tr bgcolor="#e9e9e9">
-<td colspan=2>
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<% $approving->Id %>"><&|/l, $approving->Id, $approving->Subject &>Originating ticket: #[_1]</&></a>
-</td>
-</tr>
-<tr><td colspan=2>
-<& /Ticket/Elements/ShowCustomFields, Ticket => $approving &>
-<& /Ticket/Elements/ShowHistory, Ticket => $approving, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
-</td></tr>
+ <div class="originating-ticket">
+ <span class="link"><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<% $approving->Id %>"><&|/l, $approving->Id, $approving->Subject &>Originating ticket: #[_1]</&></a></span>
+ <div class="info">
+% if ($ShowCustomFields) {
+ <& /Ticket/Elements/ShowCustomFields, Ticket => $approving &>
+% }
+% if ($ShowHistory) {
+ <& /Ticket/Elements/ShowHistory, Ticket => $approving, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
+% }
+ </div>
+ </div>
% }
% }
-<tr <%$class && "class=\"$class\""%>>
-<td valign=top>
-<input type="radio" name="Approval-<%$ticket->Id%>-Action" value="approve"><&|/l&>Approve</&><br>
-<input type="radio" name="Approval-<%$ticket->Id%>-Action" value="deny"><&|/l&>Deny</&><br>
-<input type="radio" name="Approval-<%$ticket->Id%>-Action" value="none" checked><&|/l&>No action</&>
-</td>
-<td>
-<&|/l&>Notes</&><br>
-<textarea name="Approval-<%$ticket->Id%>-Notes" rows=2 cols=70></textarea>
-</td>
-</tr>
+ <div class="form">
+ <div class="action">
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-approve" name="Approval-<%$ticket->Id%>-Action" value="approve" />
+ <label for="Approval-<%$ticket->Id%>-Action-approve"><&|/l&>Approve</&></label>
+ </div>
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-deny" name="Approval-<%$ticket->Id%>-Action" value="deny" />
+ <label for="Approval-<%$ticket->Id%>-Action-deny"><&|/l&>Deny</&></label>
+ </div>
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-none" name="Approval-<%$ticket->Id%>-Action" value="none" checked="checked" />
+ <label for="Approval-<%$ticket->Id%>-Action-none"><&|/l&>No action</&></label>
+ </div>
+ </div>
+ <div class="notes">
+ <label for="Approval-<%$ticket->Id%>-Notes"><&|/l&>Notes</&></label>
+ <textarea name="Approval-<%$ticket->Id%>-Notes" id="Approval-<%$ticket->Id%>-Notes" rows="2" cols="70"></textarea>
+ </div>
+ <div class="clear"></div>
+ </div>
+</div>
<%ARGS>
$ShowApproving => 1
+$ShowCustomFields => 1
+$ShowHistory => 1
$ticket => undef
-$class => undef
</%ARGS>
diff --git a/rt/html/Approvals/Elements/PendingMyApproval b/rt/html/Approvals/Elements/PendingMyApproval
index 8d19399ab..e03145e18 100644
--- a/rt/html/Approvals/Elements/PendingMyApproval
+++ b/rt/html/Approvals/Elements/PendingMyApproval
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,33 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table width="100%">
-% my ($i, $class);
+<script type="text/javascript"><!--
+ onLoadHook('createCalendarLink("CreatedBefore");');
+ onLoadHook('createCalendarLink("CreatedAfter");');
+--></script>
% my %done;
% foreach ($tickets, $group_tickets) {
% while (my $ticket = $_->Next() ) {
% next if !$ARGS{'ShowDependent'} and $ticket->HasUnresolvedDependencies( Type => 'approval' );
% next if $done{$ticket->Id}++; # don't show duplicate tickets
-% $i++;
-% $class = ($i%2) ? "oddline" : "evenline";
-<& Approve, ticket => $ticket, class => $class &>
+<& Approve, ticket => $ticket &>
% }
% }
-</table>
-<& /Elements/TitleBoxStart, title => loc("Search for approvals") &>
-<input type=checkbox value="1" name="ShowPending"
+<&| /Widgets/TitleBox, title => loc("Search for approvals") &>
+<input type="checkbox" class="checkbox" value="1" name="ShowPending"
<%((!$ARGS{'ShowRejected'} && !$ARGS{'ShowResolved'}) ||
$ARGS{'ShowPending'})
- && "checked"%>> <&|/l&>Show pending requests</&><br>
-<input type=checkbox value="1" name="ShowResolved" <%$ARGS{'ShowResolved'} && "checked"%>> <&|/l&>Show approved requests</&><br>
-<input type=checkbox value="1" name="ShowRejected" <%$ARGS{'ShowRejected'} && "checked"%>> <&|/l&>Show denied requests</&><br>
-<input type=checkbox value="1" name="ShowDependent" <%$ARGS{'ShowDependent'} && "checked"%>> <&|/l&>Show requests awaiting other approvals</&><br>
+ && "checked"%> /> <&|/l&>Show pending requests</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowResolved" <%$ARGS{'ShowResolved'} && "checked"%> /> <&|/l&>Show approved requests</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowRejected" <%$ARGS{'ShowRejected'} && "checked"%> /> <&|/l&>Show denied requests</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowDependent" <%$ARGS{'ShowDependent'} && "checked"%> /> <&|/l&>Show requests awaiting other approvals</&><br />
-<&|/l,"<input size='15' value='".($created_before->Unix > 0 &&$created_before->ISO)."' name='CreatedBefore'>"&>Only show approvals for requests created before [_1]</&><br>
+<&|/l,"<input size='15' value='".($created_before->Unix > 0 &&$created_before->ISO)."' name='CreatedBefore' id='CreatedBefore' />"&>Only show approvals for requests created before [_1]</&><br />
-<&|/l, "<input size='15' value='".( $created_after->Unix >0 && $created_after->ISO)."' name='CreatedAfter'>"&>Only show approvals for requests created after [_1]</&>
-<& /Elements/TitleBoxEnd &>
+<&|/l, "<input size='15' value='".( $created_after->Unix >0 && $created_after->ISO)."' name='CreatedAfter' id='CreatedAfter' />"&>Only show approvals for requests created after [_1]</&>
+</&>
<%init>
my $tickets = RT::Tickets->new( $session{'CurrentUser'} );
diff --git a/rt/html/Approvals/Elements/ShowDependency b/rt/html/Approvals/Elements/ShowDependency
index e8d0b00d5..6da28f180 100644
--- a/rt/html/Approvals/Elements/ShowDependency
+++ b/rt/html/Approvals/Elements/ShowDependency
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,9 +49,9 @@
% if ($approving->Count) {
<h3><&|/l&>Tickets which depend on this approval:</&></h3>
-<table width=100%>
-<TR>
-<TD WIDTH="25" bgcolor="#999999">&nbsp;</TD><TD>
+<table width="100%">
+<tr>
+<td width="25" bgcolor="#999999">&nbsp;</td><td>
<%PERL>
my %show;
while (my $link = $approving->Next()) {
@@ -60,22 +62,22 @@ while (my $link = $approving->Next()) {
my $dep = $m->scomp('ShowDependency', Ticket => $link->BaseObj, _seen => $_seen);
if ($type eq 'approval') {
- $head .= $m->scomp('/Elements/TitleBoxStart', title => loc("Approval #[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
+ $head .= $m->scomp('/Widgets/TitleBoxStart', title => loc("Approval #[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
$text .= $head;
$text .= $m->scomp('/Ticket/Elements/ShowCustomFields', Ticket => $link->BaseObj);
} elsif ($type eq 'ticket') {
- $head .= $m->scomp('/Elements/TitleBoxStart', title => loc("Ticket #[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
+ $head .= $m->scomp('/Widgets/TitleBoxStart', title => loc("Ticket #[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
$text .= $head;
$text .= $m->scomp('/Ticket/Elements/ShowSummary', Ticket => $link->BaseObj);
} else {
- $head .= $m->scomp('/Elements/TitleBoxStart', title => loc("#[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
+ $head .= $m->scomp('/Widgets/TitleBoxStart', title => loc("#[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
$text .= $head;
}
$text .= $m->scomp('/Ticket/Elements/ShowHistory' , Ticket => $link->BaseObj, Collapsed => ($type ne 'ticket'), ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0);
- $head .= $m->scomp('/Elements/TitleBoxEnd');
- $text .= $m->scomp('/Elements/TitleBoxEnd');
+ $head .= $m->scomp('/Widgets/TitleBoxEnd');
+ $text .= $m->scomp('/Widgets/TitleBoxEnd');
$text .= $dep;
$text .= '</a>';
$show{$link->BaseObj->Id} = {
@@ -96,9 +98,9 @@ foreach my $id (sort keys %show) {
$m->print($refer);
</%PERL>
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
% }
<%ARGS>
diff --git a/rt/html/Approvals/Elements/Tabs b/rt/html/Approvals/Elements/Tabs
index 03bdc262e..9ba425059 100644
--- a/rt/html/Approvals/Elements/Tabs
+++ b/rt/html/Approvals/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Approvals/index.html b/rt/html/Approvals/index.html
index 88c277c1e..7d18cf36a 100644
--- a/rt/html/Approvals/index.html
+++ b/rt/html/Approvals/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Download/CustomFieldValue/dhandler b/rt/html/Download/CustomFieldValue/dhandler
index 521968024..461267e00 100644
--- a/rt/html/Download/CustomFieldValue/dhandler
+++ b/rt/html/Download/CustomFieldValue/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Download/Tabular/dhandler b/rt/html/Download/Tabular/dhandler
index 3965a990e..0abb8f9db 100644
--- a/rt/html/Download/Tabular/dhandler
+++ b/rt/html/Download/Tabular/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd
index e1d1edb7c..b1ba8f69b 100644
--- a/rt/html/Elements/BevelBoxRaisedEnd
+++ b/rt/html/Elements/BevelBoxRaisedEnd
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
- </TD>
-</TR>
+ </td>
+</tr>
</table>
diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart
index 6c5a6137e..b690c1d74 100644
--- a/rt/html/Elements/BevelBoxRaisedStart
+++ b/rt/html/Elements/BevelBoxRaisedStart
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table cellspacing=0 cellpadding=0 width=100% height=100%>
- <TR>
- <TD width=100% height=100%>
+<table cellspacing="0" cellpadding="0" width="100%" height="100%">
+ <tr>
+ <td width="100%" height="100%">
diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback
index c7aeb9f5d..b498f2816 100644
--- a/rt/html/Elements/Callback
+++ b/rt/html/Elements/Callback
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox
index f2256fb78..5593c7a71 100644
--- a/rt/html/Elements/Checkbox
+++ b/rt/html/Elements/Checkbox
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<INPUT TYPE="Checkbox" NAME="<%$Name%>" value="1" <%$IsChecked%>>
+<input type="checkbox" class="checkbox" name="<%$Name%>" value="1" <%$IsChecked%> />
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/CollectionAsTable/Header b/rt/html/Elements/CollectionAsTable/Header
index 9ed4be8ec..a3277b317 100644
--- a/rt/html/Elements/CollectionAsTable/Header
+++ b/rt/html/Elements/CollectionAsTable/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -54,7 +56,7 @@ $Rows => undef
$Page => undef
$maxitems => undef
</%ARGS>
-<TR class="collection-as-table">
+<tr class="collection-as-table">
<%perl>
my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format => $FormatString );
@@ -62,18 +64,18 @@ my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format
my $item = 0;
foreach my $col (@Format) {
$item++;
- if ( $col->{title} eq 'NEWLINE' ) {
+ if ( $col->{title} && ($col->{title} eq 'NEWLINE') ) {
while ( $item < $maxitems ) {
$m->out(qq{<th class="collection-as-table">&nbsp;</th>\n});
$item++;
}
$item = 0;
- $m->out(qq{</TR>\n<TR class="collection-as-table">});
+ $m->out(qq{</tr>\n<tr class="collection-as-table">});
}
else {
- $m->out('<TH class="collection-as-table">');
- my $title = $col->{title};
+ $m->out('<th class="collection-as-table">');
+ my $title = $col->{title} || '';
$title =~ s/^__(.*)__$/$1/o;
$title = (
$m->comp(
@@ -116,8 +118,8 @@ foreach my $col (@Format) {
else {
$m->out( loc($title) );
}
- $m->out('</TH>');
+ $m->out('</th>');
}
}
</%perl>
-</TR>
+</tr>
diff --git a/rt/html/Elements/CollectionAsTable/ParseFormat b/rt/html/Elements/CollectionAsTable/ParseFormat
index 57434efe2..227076093 100644
--- a/rt/html/Elements/CollectionAsTable/ParseFormat
+++ b/rt/html/Elements/CollectionAsTable/ParseFormat
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,7 +50,7 @@ $Format
</%ARGS>
<%init>
-use Regexp::Common;
+use Regexp::Common qw/delimited/;
my @Columns;
while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) {
@@ -59,7 +61,9 @@ while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) {
substr($col,-1,1) = "";
}
- my $colref;
+ my $colref = {
+ title => '',
+ };
if ( $col =~ s!/STYLE:([^/]+)!!io ) {
$colref->{'style'} = $1;
@@ -88,7 +92,7 @@ while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) {
$colref->{'attribute'} = $col;
}
- if ( !$colref->{'title'} && grep { /^__(.*?)__$/io }
+ if ( !$colref->{'title'} && grep { /^__(.+?)__$/io }
@{ $colref->{'output'} } )
{
$colref->{'title'} = $1;
diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket
index bd60bbddf..644df223a 100644
--- a/rt/html/Elements/CreateTicket
+++ b/rt/html/Elements/CreateTicket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<FORM ACTION="<% $RT::WebPath %>/Ticket/Create.html" NAME="CreateTicketInQueue">
-<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" value="New ticket in">&nbsp;[_1]</&>
-</FORM>
+<form action="<% $RT::WebPath %>/Ticket/Create.html" name="CreateTicketInQueue">
+<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" class="button" value="New ticket in" />&nbsp;[_1]</&>
+</form>
diff --git a/rt/html/Elements/EditCustomField b/rt/html/Elements/EditCustomField
index e443c764e..d247c63f1 100644
--- a/rt/html/Elements/EditCustomField
+++ b/rt/html/Elements/EditCustomField
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,7 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<%INIT>
my $Values;
-if ($Object) {
+if ($Object and $Object->id) {
$Values = $Object->CustomFieldValues($CustomField->id);
$Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) );
$NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', '');
@@ -67,10 +69,14 @@ if ($MaxValues == 1 and $Object and $Values) {
}
# The "Magic" hidden input causes RT to know that we were trying to edit the field, even if
# we don't see a value later, since browsers aren't compelled to submit empty form fields
-$m->out("\n".'<input type="hidden" name="'.$NamePrefix.$CustomField->Id.'-Values-Magic" value="1">'."\n");
+$m->out("\n".'<input type="hidden" class="hidden" name="'.$NamePrefix.$CustomField->Id.'-Values-Magic" value="1" />'."\n");
+
+my $EditComponent = "EditCustomField$Type";
+$m->comp('/Elements/Callback', _CallbackName => 'EditComponentName', Name => \$EditComponent, CustomField => $CustomField, Object => $Object );
+$EditComponent = "EditCustomField$Type" unless $m->comp_exists($EditComponent);
return $m->comp(
- "EditCustomField$Type",
+ $EditComponent,
%ARGS,
Rows => $Rows,
Cols => $Cols,
diff --git a/rt/html/Elements/EditCustomFieldBinary b/rt/html/Elements/EditCustomFieldBinary
index 002825660..485457c25 100644
--- a/rt/html/Elements/EditCustomFieldBinary
+++ b/rt/html/Elements/EditCustomFieldBinary
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,10 +47,10 @@
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
%# XXX - let user download the file(s) here?
-<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>"><a href="<%$RT::WebPath%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content %>"><% $value->Content %></a><br>
+<input type="checkbox" class="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>" /><a href="<%$RT::WebPath%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content %>"><% $value->Content %></a><br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload">
+<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload" />
% }
<%ARGS>
$Object => undef
diff --git a/rt/html/Elements/EditCustomFieldCombobox b/rt/html/Elements/EditCustomFieldCombobox
new file mode 100644
index 000000000..071ef0772
--- /dev/null
+++ b/rt/html/Elements/EditCustomFieldCombobox
@@ -0,0 +1,68 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+% while ($Values and my $value = $Values->Next and $Multiple) {
+<input type="checkbox" class="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>" /><% $value->Content %>
+<br />
+% }
+% (!$Multiple or !$MaxValues or !$Values or $Values->Count < $MaxValues) or return;
+<& /Widgets/ComboBox,
+ Name => $NamePrefix . $CustomField->Id . "-Value",
+ Default => $Default,
+ Rows => $Rows,
+ Values => [map {$_->Name} @{$CustomField->Values->ItemsArrayRef}],
+&>
+<%ARGS>
+$Object => undef
+$CustomField => undef
+$NamePrefix => undef
+$Default => undef
+$Values => undef
+$Multiple => 0
+$Rows => undef
+$MaxValues => undef
+</%ARGS>
diff --git a/rt/html/Elements/EditCustomFieldFreeform b/rt/html/Elements/EditCustomFieldFreeform
index c097ee0a9..2eb49eb6b 100644
--- a/rt/html/Elements/EditCustomFieldFreeform
+++ b/rt/html/Elements/EditCustomFieldFreeform
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,17 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+% my $name = $NamePrefix . $CustomField->Id . '-Value';
% if ($Multiple) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><%$Default%></textarea>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$name%>s" id="<%$name%>s" ><%$Default%></textarea>
% } else {
-<input name="<%$NamePrefix%><%$CustomField->Id%>-Value" size="<%$Cols%>" value="<%$Default ? $Default : ''%>">
+<input name="<%$name%>" id="<%$name%>" size="<%$Cols%>" value="<%$Default ? $Default : ''%>" />
% }
<%INIT>
if ($Multiple and $Values) {
- $Default = '';
- while (my $value = $Values->Next ) {
- $Default .= $value->Content."\n";
- }
+ $Default = '';
+ while (my $value = $Values->Next ) {
+ $Default .= $value->Content."\n";
+ }
+} else {
+ $Default =~ s/\s*\n\s*/ /g if $Default;
}
</%INIT>
<%ARGS>
diff --git a/rt/html/Elements/EditCustomFieldImage b/rt/html/Elements/EditCustomFieldImage
index b378ceae6..b6a30c659 100644
--- a/rt/html/Elements/EditCustomFieldImage
+++ b/rt/html/Elements/EditCustomFieldImage
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,11 +46,11 @@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>"><& ShowCustomFieldImage, Object => $value &>
-<br>
+<input type="checkbox" class="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>" /><& ShowCustomFieldImage, Object => $value &>
+<br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload">
+<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload" />
% }
<%ARGS>
$Object => undef
diff --git a/rt/html/Elements/EditCustomFieldSelect b/rt/html/Elements/EditCustomFieldSelect
index 2a2a64a1d..815e977a0 100644
--- a/rt/html/Elements/EditCustomFieldSelect
+++ b/rt/html/Elements/EditCustomFieldSelect
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,30 +45,84 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
- <select name="<%$NamePrefix%><%$CustomField->Id%>-Values"
+%# Build up the set of cascading select boxes as "guides"
+%# each one limits the options of the final one a bit
+%# (perhaps by tweaking the .display style?)
+% my $selected = 0;
+% my @category;
+% my $id = $NamePrefix . $CustomField->Id;
+% my $out = $m->scomp('SELF:options', %ARGS, SelectedRef => \$selected, CategoryRef => \@category);
+% if (@category) {
+<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/cascaded.js"></script>
+%# XXX - Hide this select from w3m?
+ <select onchange="filter_cascade('<% $id %>-Values', this.value)" name="<%$id%>-Category">
+ <option value="" <% !$selected && 'SELECTED' %>><&|/l&>-</&></option>
+% foreach my $cat (@category) {
+% my ($depth, $name) = @$cat;
+ <option value="<% $name %>"><% '&nbsp;' x $depth |n %><%$name%></option>
+% }
+ </select><br />
+% }
+ <select name="<%$id%>-Values" id="<%$id%>-Values"
+% if ($Multiple or !@category) {
size="<%$Rows%>"
+% }
<% $Multiple && 'MULTIPLE' %>>
+ <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option>
+% $m->out($out);
+ </select>
+<%ARGS>
+$Object => undef
+$CustomField => undef
+$NamePrefix => undef
+$Default => undef
+$Values => undef
+$Multiple => 0
+$Rows => undef
+</%ARGS>
+
+<%method options>
% my $selected;
% my $CFVs = $CustomField->Values;
+% my @levels;
% while ($CFVs and my $value = $CFVs->Next ) {
+% my $category = $value->Category;
+% if (1) { # length $category) {
+% my $level = (split(/:/, $category || ''))[0];
+% while (@levels) {
+% if ($levels[-1] eq $level) {
+% undef $level;
+% last;
+% } elsif (index($level, $levels[-1]) != 0) {
+ </optgroup>
+% pop @levels;
+% } else {
+% last;
+% }
+% }
+% if ($level) {
+% push @$CategoryRef, [0+@levels, $level];
+ <optgroup style="padding-left: <% @levels/2 %>em" label="<%$category%>">
+% push @levels, $level;
+% }
+% }
<option value="<%$value->Name%>"
% if ($Values) {
- <% $Values->HasEntry($value->Name) && ($selected = 1) && 'SELECTED' %>
+ <% ($Values->HasEntry($value->Name)||'') && ($$SelectedRef = 1) && 'SELECTED' %>
% } elsif ($Default) {
<% (ref $Default ? (grep {$_ eq $value->Name} @{$Default}) : ($Default eq $value->Name))
- && ($selected = 1) && 'SELECTED' %>
+ && ($$SelectedRef = 1) && 'SELECTED' %>
% }
><% $value->Name%></option>
% }
- <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option>
- </select>
-<%ARGS>
-$Object => undef
+% for (@levels) {
+ </optgroup>
+% }
+<%args>
$CustomField => undef
-$NamePrefix => undef
$Default => undef
$Values => undef
-$Multiple => 0
-$Cols
-$Rows
-</%ARGS>
+$SelectedRef => undef
+$CategoryRef => undef
+</%args>
+</%method>
diff --git a/rt/html/Elements/EditCustomFieldText b/rt/html/Elements/EditCustomFieldText
index 1aac3283b..b7569b003 100644
--- a/rt/html/Elements/EditCustomFieldText
+++ b/rt/html/Elements/EditCustomFieldText
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
% }
<%INIT>
# XXX - MultiValue textarea is for now outlawed.
diff --git a/rt/html/Elements/EditCustomFieldWikitext b/rt/html/Elements/EditCustomFieldWikitext
index 1aac3283b..b7569b003 100644
--- a/rt/html/Elements/EditCustomFieldWikitext
+++ b/rt/html/Elements/EditCustomFieldWikitext
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
% }
<%INIT>
# XXX - MultiValue textarea is for now outlawed.
diff --git a/rt/html/Elements/EditLinks b/rt/html/Elements/EditLinks
index 68c08dd16..32c75a5a4 100755
--- a/rt/html/Elements/EditLinks
+++ b/rt/html/Elements/EditLinks
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,9 +45,9 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE width=100%>
- <TR>
- <TD VALIGN=TOP WIDTH=50%>
+<table width="100%">
+ <tr>
+ <td valign="top" width="50%">
<h3><&|/l&>Current Links</&></h3>
<table>
@@ -57,8 +59,8 @@
<td class="labeltop"><&|/l&>Depends on</&>:</td>
<td class="value">
% while (my $link = $Object->DependsOn->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
- <& ShowLink, URI => $link->TargetURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
+ <& ShowLink, URI => $link->TargetURI &><br />
% }
</td>
</tr>
@@ -67,8 +69,8 @@
<td class="value">
% while (my $link = $Object->DependedOnBy->Next) {
% my $member = $link->BaseObj;
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
- <& ShowLink, URI => $link->BaseURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
+ <& ShowLink, URI => $link->BaseURI &><br />
% }
</td>
</tr>
@@ -76,8 +78,8 @@
<td class="labeltop"><&|/l&>Parents</&>:</td>
<td class="value">
% while (my $link = $Object->MemberOf->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
- <& ShowLink, URI => $link->TargetURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
+ <& ShowLink, URI => $link->TargetURI &><br />
% }
</td>
</tr>
@@ -85,8 +87,8 @@
<td class="labeltop"><&|/l&>Children</&>:</td>
<td class="value">
% while (my $link = $Object->Members->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
- <& ShowLink, URI => $link->BaseURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
+ <& ShowLink, URI => $link->BaseURI &><br />
% }
</td>
</tr>
@@ -94,8 +96,8 @@
<td class="labeltop"><&|/l&>Refers to</&>:</td>
<td class="value">
% while (my $link = $Object->RefersTo->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
- <& ShowLink, URI => $link->TargetURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
+ <& ShowLink, URI => $link->TargetURI &><br />
%}
</td>
</tr>
@@ -103,61 +105,63 @@
<td class="labeltop"><&|/l&>Referred to by</&>:</td>
<td class="value">
% while (my $link = $Object->ReferredToBy->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
- <& ShowLink, URI => $link->BaseURI &><br>
+% # Skip reminders
+% next if (UNIVERSAL::isa($link->BaseObj, 'RT::Ticket') && $link->BaseObj->Type eq 'reminder');
+ <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
+ <& ShowLink, URI => $link->BaseURI &><br />
% }
</td>
</tr>
</table>
-</TD>
-<TD VALIGN=TOP>
+</td>
+<td valign="top">
<h3><&|/l&>New Links</&></h3>
% if (ref($Object) eq 'RT::Ticket') {
<i><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&>
<& /Elements/Callback, _CallbackName => 'ExtraLinkInstructions' &>
-</i><br>
+</i><br />
% } elsif (ref($Object) eq 'RT::Queue') {
<i><&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces.</&>
-</i><br>
+</i><br />
% } else {
-<i><&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.</&></i><br>
+<i><&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.</&></i><br />
% }
-<TABLE>
+<table>
% if ($Merge) {
- <TR>
- <TD class="label"><&|/l&>Merge into</&>:</TD>
- <TD class="entry"><input name="<%$id%>-MergeInto"> <i><&|/l&>(only one ticket)</&></i></TD>
- </TR>
+ <tr>
+ <td class="label"><&|/l&>Merge into</&>:</td>
+ <td class="entry"><input name="<%$id%>-MergeInto" /> <i><&|/l&>(only one ticket)</&></i></td>
+ </tr>
% }
- <TR>
- <TD class="label"><&|/l&>Depends on</&>:</TD>
- <TD class="entry"><input name="<%$id%>-DependsOn"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Depended on by</&>:</TD>
- <TD class="entry"><input name="DependsOn-<%$id%>"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Parents</&>:</TD>
- <TD class="entry"><input name="<%$id%>-MemberOf"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Children</&>:</TD>
- <TD class="entry"> <input name="MemberOf-<%$id%>"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Refers to</&>:</TD>
- <TD class="entry"><input name="<%$id%>-RefersTo"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Referred to by</&>:</TD>
- <TD class="entry"> <input name="RefersTo-<%$id%>"></TD>
- </TR>
-</TABLE>
-</TD>
-</TR>
-</TABLE>
+ <tr>
+ <td class="label"><&|/l&>Depends on</&>:</td>
+ <td class="entry"><input name="<%$id%>-DependsOn" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Depended on by</&>:</td>
+ <td class="entry"><input name="DependsOn-<%$id%>" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Parents</&>:</td>
+ <td class="entry"><input name="<%$id%>-MemberOf" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Children</&>:</td>
+ <td class="entry"> <input name="MemberOf-<%$id%>" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Refers to</&>:</td>
+ <td class="entry"><input name="<%$id%>-RefersTo" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Referred to by</&>:</td>
+ <td class="entry"> <input name="RefersTo-<%$id%>" /></td>
+ </tr>
+</table>
+</td>
+</tr>
+</table>
<%INIT>
my $id;
diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error
index bc5a1880a..369327406 100644
--- a/rt/html/Elements/Error
+++ b/rt/html/Elements/Error
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,15 +46,13 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Elements/Callback, %ARGS, error => $error &>
-<& /Elements/Header, Code => $Code, Why => $Why &>
-<& /Elements/Tabs &>
-<& /Elements/TitleBoxStart, class=> "error", title => $Title &>
+<& /Elements/Header, Code => $Code, Why => $Why, Title => $Title &>
+<& /Elements/Tabs, Title => $Title &>
+<div class="error">
<%$Why%>
-<br>
-<font size=-1>
+<br />
<%$Details%>
-</font>
-<& /Elements/TitleBoxEnd &>
+</div>
<%cleanup>
$m->comp('/Elements/Footer');
@@ -61,7 +61,7 @@ $m->abort();
<%args>
$Code => undef
-$Details => undef
+$Details =>''
$Title => loc("RT Error")
$Why => loc("the calling component did not specify why")
</%args>
@@ -77,7 +77,7 @@ if ($] >= 5.007001) {
$RT::Logger->error($error);
-if ( $session{'SessionType'} eq 'REST' ) {
+if ( defined ($session{'SessionType'}) && $session{'SessionType'} eq 'REST' ) {
$r->content_type('text/plain');
$m->out( "Error: " . $Why . "\n" );
$m->out( $Details . "\n" );
diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket
index 869d57ef1..ad6ad1b15 100644
--- a/rt/html/Elements/GotoTicket
+++ b/rt/html/Elements/GotoTicket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,4 +45,4 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<FORM ACTION="<%$RT::WebPath%>/Ticket/Display.html"><input type=submit value="<&|/l&>Goto ticket</&>">&nbsp;<input size=5 name=id accesskey="0"></FORM>
+<form action="<%$RT::WebPath%>/Ticket/Display.html"><input type="submit" class="button" value="<&|/l&>Goto ticket</&>" />&nbsp;<input size="5" name="id" accesskey="0" /></form>
diff --git a/rt/html/Elements/ListActions b/rt/html/Elements/ListActions
index 8433d17e0..24f923a8a 100644
--- a/rt/html/Elements/ListActions
+++ b/rt/html/Elements/ListActions
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,22 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% if ($actions[0] ) {
-<& /Elements/TitleBoxStart, title => loc('Results') &>
-<UL>
+<&| /Widgets/TitleBox, title => loc('Results') &>
+ <ul class="action-results">
% foreach my $action (@actions) {
-% next unless ($action);
-% my $skip = 0;
-% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS);
-% next if $skip;
-<LI><%$action%></LI>
-% }
-</UL>
-<& /Elements/TitleBoxEnd &>
-<BR>
+% next unless $action;
+% my $skip = 0;
+% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS);
+% next if $skip;
+ <li><%$action%></li>
% }
+ </ul>
+</&>
<%init>
-@actions = grep (/./,@actions);
+@actions = grep $_, @actions;
+return unless @actions;
</%init>
<%ARGS>
@actions => undef
diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login
index 1d4bfd5ec..cd39b87d8 100644
--- a/rt/html/Elements/Login
+++ b/rt/html/Elements/Login
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,36 +53,58 @@ if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') {
$m->out("\n$Error\n") if $Error;
$m->abort;
}
+
+my $req_uri;
+
+if (UNIVERSAL::can($r, 'uri') and $r->uri =~ m{.*/(.*)}) {
+ $req_uri = $1;
+}
+
+my $form_action = defined $goto ? $goto
+ : defined $req_uri ? $req_uri
+ : $RT::WebPath
+ ;
</%INIT>
<& /Elements/Callback, %ARGS, _CallbackName => 'Header' &>
<& /Elements/Header, Title => loc('Login'), Focus => 'user' &>
-<DIV ALIGN=CENTER>
+%# End of div#quickbar from /Elements/Header
+</div>
+
+<div id="body" class="login-body">
+
% if ($Error) {
-<& /Elements/TitleBoxStart, title => loc('Error') &>
+<&| "/Widgets/TitleBox", title => loc('Error'), hideable => 0 &>
<% $Error %>
-<& /Elements/TitleBoxEnd &>
+</&>
% }
-<BR>
-<& /Elements/TitleBoxStart, width=> "40%", titleright => loc("RT [_1]", $RT::VERSION), title => loc('Login') ,
-contentbg=>"#cccccc" &>
+
+<& /Elements/Callback, %ARGS, _CallbackName => 'BeforeForm' &>
+
+<div id="login-box">
+<&| /Widgets/TitleBox, title => loc('Login'), titleright => $RT::VERSION, hideable => 0 &>
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<FORM id="login" name="login" METHOD=POST ACTION="<% (UNIVERSAL::can($r, 'uri') && ($r->uri) =~ m!.*/(.*)!) %>" >
-<TABLE BORDER=0 WIDTH=100%>
-<TR ALIGN=RIGHT>
-<TD ALIGN=RIGHT><&|/l&>Username</&>:</TD><TD ALIGN=LEFT><input name=user value="<%$user%>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Password</&>:</TD><TD ALIGN=LEFT><input type=password name=pass></TD></TR>
-<TR><TD colspan=2 align=right>
-<input type=submit Value="<&|/l&>Login</&>">
-</TD></TR>
-</TABLE>
+<form id="login" name="login" method="post" action="<% $form_action %>">
+
+<div class="input-row">
+ <span class="label"><&|/l&>Username</&>:</span>
+ <span class="input"><input name="user" value="<%$user%>" id="user" /></span>
+</div>
+
+<div class="input-row">
+ <span class="label"><&|/l&>Password</&>:</span>
+ <span class="input"><input type="password" name="pass" /></span>
+</div>
+
+<div class="button-row">
+ <span class="input"><input type="submit" class="button" value="<&|/l&>Login</&>" /></span>
+</div>
%# Give callbacks a chance to add more control elements
<& /Elements/Callback, %ARGS &>
-<&/Elements/TitleBoxEnd&>
% # From mason 1.0.1 forward, this doesn't work. in fact, it breaks things.
% # But on Mason 1.15 it's fixed again, so we still use it.
% # The code below iterates through everything in the passed in arguments
@@ -92,27 +116,19 @@ contentbg=>"#cccccc" &>
% if (($key ne 'user') and ($key ne 'pass')) {
% if (ref($ARGS{$key}) =~ /ARRAY/) {
% foreach $val (@{$ARGS{$key}}) {
-<input type=hidden name="<%$key %>" value="<% $val %>">
+<input type="hidden" class="hidden" name="<%$key %>" value="<% $val %>" />
% }
% }
% else {
-<input type="hidden" name="<% $key %>" value="<% $ARGS{$key} %>">
+<input type="hidden" class="hidden" name="<% $key %>" value="<% $ARGS{$key} %>" />
% }
% }
% }
-</FORM>
+</form>
% }
-</DIV>
-
-<BR>
-<!-- TODO: not yet implemented
-If you've forgotten your username or password, RT can <A
-href="/NoAuth/Reminder.html">send you a reminder</a>.
--->
-<BR>
-<BR>
-<BR>
-<HR>
+</&>
+</div><!-- #login-box -->
+<& /Elements/Callback, %ARGS, _CallbackName => 'AfterForm' &>
<& /Elements/Footer, Menu => 0 &>
<%ARGS>
$user => ""
diff --git a/rt/html/Elements/Logo b/rt/html/Elements/Logo
new file mode 100644
index 000000000..157f7bece
--- /dev/null
+++ b/rt/html/Elements/Logo
@@ -0,0 +1,56 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+ <div id="logo">
+ <a href="http://bestpractical.com"><img src="<%$RT::WebImagesURL%>/bplogo.gif" alt="<%loc("Best Practical Solutions, LLC corporate logo")%>" width="177" height="33" /></a>
+% if ($show_name) {
+ <div class="rtname"><% loc("RT for [_1]", $RT::rtname) %></div>
+% }
+ </div>
+<%args>
+ $show_name => 1
+</%args>
diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox
index dd48bec9a..0149e1b30 100644
--- a/rt/html/Elements/MessageBox
+++ b/rt/html/Elements/MessageBox
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,10 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<textarea class="messagebox" COLS=<%$Width%> ROWS=<%$Height%> WRAP=<%$Wrap%> NAME="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></textarea>
+<textarea class="messagebox" cols="<%$Width%>" rows="<%$Height%>" wrap="<%$Wrap%>" name="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></textarea>
<%INIT>
-my ($message);
+my $message = '';
if ($QuoteTransaction) {
my $transaction=RT::Transaction->new($session{'CurrentUser'});
diff --git a/rt/html/Elements/MyAdminQueues b/rt/html/Elements/MyAdminQueues
new file mode 100644
index 000000000..7e720ad71
--- /dev/null
+++ b/rt/html/Elements/MyAdminQueues
@@ -0,0 +1,54 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<&|/Widgets/TitleBox, title => loc("Queues I administer"), bodyclass => "" &>
+<& /Elements/QueueSummary,
+ cache => 'my_admin_queues',
+ queue_filter => sub { $_->CurrentUserHasRight('AdminQueue') },
+ conditions => [ {cond => "Status = 'new'", name => loc ('new') },
+ {cond => "Status = 'open'", name => loc ('open') }] &>
+</&>
diff --git a/rt/html/Elements/MyRT b/rt/html/Elements/MyRT
new file mode 100644
index 000000000..be487a433
--- /dev/null
+++ b/rt/html/Elements/MyRT
@@ -0,0 +1,100 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<table border="0" width="100%">
+<tr valign="top">
+
+<td class="boxcontainer" width="70%" <% $summary? 'width="70%"': '' %>>
+% $show_cb->($_) foreach @$body;
+</td>
+
+% if ( $summary ) {
+<td class="boxcontainer">
+% $show_cb->($_) foreach @$summary;
+</td>
+% }
+
+</tr>
+</table>
+
+<%INIT>
+
+my $user = $session{'CurrentUser'}->UserObj;
+unless (exists $session{'my_rt_portlets'}) {
+ my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
+ $session{'my_rt_portlets'} = $user->Preferences(
+ HomepageSettings => $default_portlets? $default_portlets->Content: {},
+ );
+}
+
+my ($body, $summary) = @{$session{'my_rt_portlets'}}{qw(body summary)};
+unless( $body && @$body ) {
+ $body = $summary || [];
+ $summary = undef;
+}
+$summary = undef unless $summary && @$summary;
+
+my $Rows = $user->Preferences( 'SummaryRows', ( $RT::DefaultSummaryRows || 10 ) );
+
+my $show_cb = sub {
+ my $entry = shift;
+ my $type = $entry->{type};
+ if ( $type eq 'component' ) {
+ my $name = $entry->{name};
+
+ # security check etc.
+ $m->comp( $name, %{ $entry->{arguments} || {} } );
+ } elsif ( $type eq 'system' ) {
+ $m->comp( '/Elements/ShowSearch', Name => $entry->{name}, Override => { Rows => $Rows } );
+ } elsif ( $type eq 'saved' ) {
+ $m->comp( '/Elements/ShowSearch', SavedSearch => $entry->{name}, Override => { Rows => $Rows } );
+ } else {
+ $RT::Logger->error("unknown portlet type $type");
+ }
+};
+
+</%INIT>
diff --git a/rt/html/Elements/MyReminders b/rt/html/Elements/MyReminders
new file mode 100755
index 000000000..1e962bd61
--- /dev/null
+++ b/rt/html/Elements/MyReminders
@@ -0,0 +1,73 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+%# DEPRECATED
+<&|/Widgets/TitleBox,
+ title => loc("Reminders") &>
+<table width="100%">
+% my $i =0;
+% while (my $reminder = $reminders->Next) {
+% $i++;
+% if ($reminder->RefersTo->First) {
+% my $ticket= $reminder->RefersTo->First->TargetObj;
+<tr class="<%$i%2 ? 'evenline' : 'oddline'%>"><td><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$ticket->id%>"><%$reminder->Subject%></a><br />
+<blockquote>
+#<%$ticket->id%>: <%$ticket->Subject%><br />
+<%$reminder->OwnerObj->Name %> <%$reminder->DueObj->Unix >0 ? '&bull; '.$reminder->DueObj->AgeAsString : '' |n %>
+</blockquote>
+</td>
+</tr>
+% }}
+</table>
+</&>
+
+<%init>
+my $reminders = RT::Tickets->new($session{'CurrentUser'});
+$reminders->FromSQL('(Owner = "Nobody" OR Owner = "'.$session{'CurrentUser'}->Name.'")' .
+ ' AND Type = "reminder" AND (Status = "new" OR Status = "open") AND Due > "1970-01-01"');
+$reminders->OrderBy(FIELD => 'Due', ORDER => 'DESC');
+</%init>
diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests
index 172b4a4fa..fc1e27095 100644
--- a/rt/html/Elements/MyRequests
+++ b/rt/html/Elements/MyRequests
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,28 +45,5 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&|/Elements/TitleBox,
- title => loc("[_1] newest unowned tickets", $rows),
- title_href => "Search/Results.html".$QueryString &>
-<& /Elements/TicketList,
- Format => "'<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', QueueName, ExtendedStatus, CreatedRelative, '<A HREF=\"$RT::WebPath/Ticket/Display.html?Action=Take&id=__id__\">".loc('Take')."</a>/TITLE:&nbsp;' ",
- Query => $Query,
- OrderBy => 'Created',
- Order => 'DESC',
- ShowNavigation => 0,
- Rows => $rows
-
- &>
-</&>
-<%init>
-my $rows = $RT::MyRequestsLength;
-
-my $Query = "Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')";
-
-my $QueryString = "";
-$QueryString = '?' . $m->comp('/Elements/QueryString',
- Query => $Query,
- Order => 'DESC',
- OrderBy => 'Priority') if ($Query);
-
-</%init>
+%# DEPRECATED
+<& /Elements/ShowSearch, Name => 'My Requests' &>
diff --git a/rt/html/Elements/MySupportQueues b/rt/html/Elements/MySupportQueues
new file mode 100644
index 000000000..f9e18a09a
--- /dev/null
+++ b/rt/html/Elements/MySupportQueues
@@ -0,0 +1,54 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<&|/Widgets/TitleBox, title => loc("Queues I'm an AdminCc for"), bodyclass => "" &>
+<& /Elements/QueueSummary,
+ cache => 'my_support_queues',
+ queue_filter => sub { $_->IsAdminCc($session{'CurrentUser'}->Id) },
+ conditions => [ {cond => "Status = 'new'", name => loc ('new') },
+ {cond => "Status = 'open'", name => loc ('open') }] &>
+</&>
diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets
index cf5225abc..8d657db3d 100644
--- a/rt/html/Elements/MyTickets
+++ b/rt/html/Elements/MyTickets
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,29 +45,5 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&|/Elements/TitleBox,
- title => loc('[_1] highest priority tickets I own', $rows),
- title_href => "Search/Results.html".$QueryString &>
-<& /Elements/TicketList,
- Format => "'<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', Priority, QueueName, ExtendedStatus",
-
- Query => $Query,
- OrderBy => 'Priority',
- Order => 'DESC',
- Rows => $rows,
- ShowNavigation => 0
- &>
-</&>
-<%init>
-my $rows = $RT::MyTicketsLength;
-
-my $Query = " Owner = '".$session{'CurrentUser'}->Id."' AND ( Status = 'new' OR Status = 'open')";
-
-my $QueryString = "";
-$QueryString = '?' . $m->comp('/Elements/QueryString',
- Query => $Query,
- Order => 'DESC',
- OrderBy => 'Priority') if ($Query);
-
-</%init>
-
+%# DEPRECATED
+<& /Elements/ShowSearch, Name => 'My Tickets' &>
diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString
index 1ddab85de..0176180d2 100644
--- a/rt/html/Elements/QueryString
+++ b/rt/html/Elements/QueryString
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,12 @@ while ( my ($key, $value) = each %ARGS ){
if( UNIVERSAL::isa( $value, 'ARRAY' ) ) {
push @params, map $key."=".$m->interp->apply_escapes($_,'u'), @$value;
} else {
- push @params, $key."=".$m->interp->apply_escapes($value,'u');
+ if (ref $value eq "ARRAY") {
+ push @params, $key."=".$m->interp->apply_escapes($_, 'u')
+ for @{$value};
+ } else {
+ push @params, $key."=".$m->interp->apply_escapes($value||"",'u');
+ }
}
}
return(join('&',@params));
diff --git a/rt/html/Elements/QueueSummary b/rt/html/Elements/QueueSummary
new file mode 100644
index 000000000..133539cc0
--- /dev/null
+++ b/rt/html/Elements/QueueSummary
@@ -0,0 +1,92 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<table border="0" cellspacing="0" cellpadding="1" width="100%">
+<tr>
+ <th class="collection-as-table"><&|/l&>Queue</&></th>
+% for my $condition (@$conditions) {
+ <th class="collection-as-table"><% $condition->{name} %></th>
+% }
+</tr>
+% my $i;
+% for my $queue (@queues) {
+% $i++;
+% my $queue_cond = "Queue = '$queue->{Name}' AND ";
+% my $all_q = $queue_cond . "(Status = 'open' OR Status = 'new' OR Status = 'stalled')";
+<tr class="<% $i%2 ? 'oddline' : 'evenline'%>" >
+<td><a href="<% $RT::WebPath%>/Search/Results.html?Query=<% $all_q |u,n %>" title="<% $queue->{Description} %>"><% $queue->{Name} %></a></td>
+% for my $condition (@$conditions) {
+% $Tickets->FromSQL( "Queue = $queue->{id} AND ". $condition->{cond} );
+<td align="right"><a href="<% $RT::WebPath%>/Search/Results.html?Query=<% $queue_cond.$condition->{cond} |u,n %>"><% $Tickets->Count %></a></td>
+% }
+</tr>
+% }
+</table>
+<%INIT>
+my @queues;
+
+if ($cache && exists $session{$cache}) {
+ @queues = @{$session{$cache}};
+}
+else {
+ my $Queues = RT::Queues->new($session{'CurrentUser'});
+ $Queues->UnLimit();
+ @queues = map {
+ { Name => $_->Name, Description => $_->Description,
+ id => $_->Id } }
+ grep $queue_filter->($_), @{$Queues->ItemsArrayRef};
+
+ $session{$cache} = \@queues if $cache;
+}
+
+my $Tickets = RT::Tickets->new($session{'CurrentUser'});
+</%INIT>
+<%ARGS>
+$cache => undef
+$queue_filter => undef
+$conditions => ()
+</%ARGS>
diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch
index d54f72e88..4acbc204d 100644
--- a/rt/html/Elements/Quicksearch
+++ b/rt/html/Elements/Quicksearch
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,46 +45,17 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &>
-
-<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
-<tr>
- <th class="collection-as-table" align=left><&|/l&>Queue</&></th>
- <th class="collection-as-table" align=right><&|/l&>New</&></th>
- <th class="collection-as-table" align=right><&|/l&>Open</&></th>
-</tr>
-
-<%PERL>
-my $i;
-while (my $queue = $Queues->Next) {
- next unless ($queue->CurrentUserHasRight('ShowTicket'));
-
- my $name = $queue->Name;
- $name =~ s|(['\\])|\\$1|g;
-
- my $new_q = "Queue = '$name' AND Status = 'new'";
- my $open_q = "Queue = '$name' AND Status = 'open'";
- my $all_q = "Queue = '$name' AND (Status = 'open' OR Status = 'new')";
-
- $Tickets->FromSQL($open_q);
- my $open = $Tickets->Count();
-
- $Tickets->FromSQL($new_q);
- my $new = $Tickets->Count();
-
- $i++;
-</%PERL>
-<TR class="<% $i%2 ? 'oddline' : 'evenline'%>" >
-<td><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$all_q |nu%>&Rows=50" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD>
-<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$new_q |nu%>&Rows=50"><%$new%></a></TD>
-<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$open_q |nu%>&Rows=50"><%$open%></a></TD>
-</TR>
-% }
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
+<div class="ticket-overview">
+<&|/Widgets/TitleBox, title => loc("Quick search"), bodyclass => "",
+ titleright => loc("Edit"), titleright_href => $RT::WebPath.'/Prefs/Quicksearch.html' &>
+<& /Elements/QueueSummary,
+ cache => 'quick_search_queues',
+ queue_filter => sub { $_->CurrentUserHasRight('ShowTicket') && !exists $unwanted->{$_->Name} },
+ conditions => [ {cond => "Status = 'new'", name => loc ('new') },
+ {cond => "Status = 'open'", name => loc ('open') },
+ {cond => "Status = 'stalled'", name => loc ('stalled') }] &>
+</&>
+</div>
<%INIT>
-my $Queues = RT::Queues->new($session{'CurrentUser'});
-$Queues->UnLimit();
-my $Tickets = RT::Tickets->new($session{'CurrentUser'});
+my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QuickSearch', {});
</%INIT>
diff --git a/rt/html/Elements/RT__Ticket/ColumnMap b/rt/html/Elements/RT__Ticket/ColumnMap
index 80e3c693c..21dc2a753 100644
--- a/rt/html/Elements/RT__Ticket/ColumnMap
+++ b/rt/html/Elements/RT__Ticket/ColumnMap
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,7 +54,7 @@ $Attr => undef
<%ONCE>
our ( $COLUMN_MAP );
-sub ColumnMap {
+my $ColumnMap = sub {
my $name = shift;
my $attr = shift;
@@ -77,20 +79,22 @@ sub ColumnMap {
# For Image custom fields we also show a thumbnail here.
return sub {
my $values = $_[0]->CustomFieldValues($field);
- return map {
+ my @values = map {
(
($_->CustomFieldObj->Type eq 'Image')
? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ ))
: $_->Content
),
- \'<br>',
- } @{ $values->ItemsArrayRef }
+ \'<br />',
+ } @{ $values->ItemsArrayRef };
+ pop @values; # Remove that last <br />
+ return @values;
};
}
}
-}
+};
-sub LinkCallback {
+my $LinkCallback = sub {
my $method = shift;
my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode};
@@ -101,14 +105,14 @@ sub LinkCallback {
return sub {
map {
- \'<A HREF="',
+ \'<a href="',
$_->$mode_uri->Resolver->HREF,
\'">',
( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ),
- \'</A><BR>',
+ \'</a><br />',
} @{ $_[0]->Links($other_mode,$type)->ItemsArrayRef }
}
-}
+};
$COLUMN_MAP = {
QueueName => {
@@ -194,12 +198,15 @@ $COLUMN_MAP = {
value => sub { return $_[0]->TimeEstimated }
},
Requestors => {
+ attribute => 'Requestor.EmailAddress',
value => sub { return $_[0]->Requestors->MemberEmailAddressesAsString }
},
Cc => {
+ attribute => 'Cc.EmailAddress',
value => sub { return $_[0]->Cc->MemberEmailAddressesAsString }
},
AdminCc => {
+ attribute => 'AdminCc.EmailAddress',
value => sub { return $_[0]->AdminCc->MemberEmailAddressesAsString }
},
StartsRelative => {
@@ -286,16 +293,22 @@ $COLUMN_MAP = {
# Everything from LINKTYPEMAP
(map {
- $_ => { value => LinkCallback( $_ ) }
+ $_ => { value => $LinkCallback->( $_ ) }
} keys %RT::Ticket::LINKTYPEMAP),
'_CLASS' => {
value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' }
},
+ '_CHECKBOX' => {
+ attribute => 'checkbox',
+ title => loc('Update'),
+ align => 'right',
+ value => sub { return \('<input type="checkbox" class="checkbox" name="UpdateTicket'.$_[0]->id.'" value="1" checked />') }
+ },
};
</%ONCE>
<%init>
$m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap');
-return ColumnMap($Name, $Attr);
+return $ColumnMap->( $Name, $Attr );
</%init>
diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh
index 9f241d279..6edec0967 100644
--- a/rt/html/Elements/Refresh
+++ b/rt/html/Elements/Refresh
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,20 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="-1"
+<select name="<%$Name%>">
+<option value="-1"
%unless ($Default) {
- SELECTED
+ selected
%}
-><&|/l&>Don't refresh this page.</&></OPTION>
+><&|/l&>Don't refresh this page.</&></option>
%foreach my $value (@refreshevery) {
-<OPTION VALUE="<%$value%>"
+<option value="<%$value%>"
% if ( $Default && ($value == $Default)) {
-SELECTED
+selected
% }
-><&|/l, $value/60 &>Refresh this page every [_1] minutes.</&></OPTION>
+><&|/l, $value/60 &>Refresh this page every [_1] minutes.</&></option>
%}
-</SELECT>
+</select>
<%INIT>
my @refreshevery = qw(120 300 600 1200 3600 7200);
diff --git a/rt/html/Elements/RefreshHomepage b/rt/html/Elements/RefreshHomepage
new file mode 100644
index 000000000..167a48cab
--- /dev/null
+++ b/rt/html/Elements/RefreshHomepage
@@ -0,0 +1,51 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<form method="get" action="<%$RT::WebPath%>/index.html">
+<& /Elements/Refresh, Name => 'HomeRefreshInterval', Default => $session {'home_refresh_interval'} &>
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
diff --git a/rt/html/Elements/ScrubHTML b/rt/html/Elements/ScrubHTML
index 443ded9c4..f382cc273 100644
--- a/rt/html/Elements/ScrubHTML
+++ b/rt/html/Elements/ScrubHTML
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,8 +54,8 @@ $scrubber->default(
'*' => 0,
id => 1,
class => 1,
- href => qr{^(?:http:|ftp:|https:|/)}i,
# Match http, ftp and relative urls
+ href => qr{^(?:http:|ftp:|https:|/|__Web(?:Path|BaseURL|URL)__)}i,
face => 1,
size => 1,
target => 1
diff --git a/rt/html/Elements/Section b/rt/html/Elements/Section
index afbb9cf38..befe2475f 100644
--- a/rt/html/Elements/Section
+++ b/rt/html/Elements/Section
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE WIDTH=100%>
-<TR>
-<TD>
-<font size=+4><%$title%></font>
-</TD>
-</TR>
-</TABLE>
-
+<h1><%$title%></h1>
<%ARGS>
$title => undef
</%ARGS>
diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField
index ea1528c03..8a37ca504 100644
--- a/rt/html/Elements/SelectAttachmentField
+++ b/rt/html/Elements/SelectAttachmentField
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,12 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="Subject"><&|/l&>Subject</&></OPTION>
-<OPTION VALUE="Content"><&|/l&>Content</&></OPTION>
-<OPTION VALUE="ContentType"><&|/l&>Content-Type</&></OPTION>
-<OPTION VALUE="Filename"><&|/l&>Filename</&></OPTION>
-</SELECT>
+<select name="<%$Name%>">
+<option value="Subject"><&|/l&>Subject</&></option>
+<option value="Content"><&|/l&>Content</&></option>
+<option value="ContentType"><&|/l&>Content-Type</&></option>
+<option value="Filename"><&|/l&>Filename</&></option>
+</select>
<%ARGS>
$Name => 'AttachmentField'
</%ARGS>
diff --git a/rt/html/Elements/SelectBoolean b/rt/html/Elements/SelectBoolean
index a3f08fdbc..b34e07a14 100644
--- a/rt/html/Elements/SelectBoolean
+++ b/rt/html/Elements/SelectBoolean
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,10 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="<%$TrueVal%>" <%$TrueDefault%>><%$True%></OPTION>
-<OPTION VALUE="<%$FalseVal%>" <%$FalseDefault%>><%$False%></OPTION>
-</SELECT>
+<select NAME ="<%$Name%>">
+<option value="<%$TrueVal%>" <%$TrueDefault%>><%$True%></option>
+<option value="<%$FalseVal%>" <%$FalseDefault%>><%$False%></option>
+</select>
<%ARGS>
$Name => undef
@@ -58,7 +60,8 @@ $False => loc("isn't")
</%ARGS>
<%INIT>
-my ($TrueDefault, $FalseDefault);
+my $TrueDefault = '';
+my $FalseDefault ='';
if ($Default && $Default !~ /true/i) {
$FalseDefault = "SELECTED";
}
diff --git a/rt/html/Elements/SelectCustomFieldOperator b/rt/html/Elements/SelectCustomFieldOperator
index 8f7ea618b..ecb306c58 100644
--- a/rt/html/Elements/SelectCustomFieldOperator
+++ b/rt/html/Elements/SelectCustomFieldOperator
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,20 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% while (my $option = shift @Options) {
% my $value = shift @Values;
-<OPTION VALUE="<%$value%>"
+<option value="<%$value%>"
% if ($Default eq $value) {
-SELECTED
+selected
% }
-><%$option%></OPTION>
+><%$option%></option>
% }
-</SELECT>
+</select>
<%ARGS>
$Name => undef
@Options => ( loc('contains'), loc("doesn't contain"), loc('is'), loc("isn't"), loc('less than'), loc('greater than'))
@Values => ('LIKE', 'NOT LIKE', '=', '!=', '<', '>')
-$Default => undef
+$Default => ''
</%ARGS>
diff --git a/rt/html/Elements/SelectCustomFieldValue b/rt/html/Elements/SelectCustomFieldValue
index 27d6c4995..2bcb35e9a 100644
--- a/rt/html/Elements/SelectCustomFieldValue
+++ b/rt/html/Elements/SelectCustomFieldValue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,7 +49,7 @@
% if ($CustomField->Type =~ /Select/i) {
% my $values = $CustomField->Values;
<select name="<%$Name%>">
-<option value="" SELECTED>-</option>
+<option value="" selected>-</option>
<option value="NULL"><&|/l&>(no value)</&></option>
% while (my $value = $values->Next) {
<option value="<%$value->Name%>"><%$value->Name%></option>
@@ -55,7 +57,7 @@
</select>
% }
% else {
-<input name="<%$Name%>" size="20">
+<input name="<%$Name%>" size="20" />
% }
<%args>
$Name => undef
diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate
index d3815798b..b43f324ac 100644
--- a/rt/html/Elements/SelectDate
+++ b/rt/html/Elements/SelectDate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,8 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<INPUT NAME="<%$Name%>" VALUE="<%$Default%>" size=<%$Size%>>
-
+<script type="text/javascript"><!--
+ onLoadHook('createCalendarLink("<% $Name %>");');
+--></script>
+<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
<%init>
unless ((defined $Default) or
($current <= 0)) {
@@ -65,7 +69,7 @@ unless ($Name) {
$ShowTime => undef
$menu_prefix=>''
$current=>time
-$Default => undef
+$Default => ''
$Name => undef
$Size => 16
</%args>
diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation
index ccf0c1121..9c80be4d7 100644
--- a/rt/html/Elements/SelectDateRelation
+++ b/rt/html/Elements/SelectDateRelation
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="&lt;"><%$Before%></OPTION>
-<OPTION VALUE="="><%$On%></OPTION>
-<OPTION VALUE="&gt;"><%$After%></OPTION>
-</SELECT>
+<select NAME ="<%$Name%>">
+<option value="&lt;"><%$Before%></option>
+<option value="="><%$On%></option>
+<option value="&gt;"><%$After%></option>
+</select>
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/SelectDateType b/rt/html/Elements/SelectDateType
index 7b3f0990f..653949a83 100644
--- a/rt/html/Elements/SelectDateType
+++ b/rt/html/Elements/SelectDateType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,16 +45,16 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="Created"><&|/l&>Created</&></OPTION>
-<OPTION VALUE="Started"><&|/l&>Started</&></OPTION>
-<OPTION VALUE="Resolved"><&|/l&>Resolved</&></OPTION>
-<OPTION VALUE="Told"><&|/l&>Last Contacted</&></OPTION>
-<OPTION VALUE="LastUpdated"><&|/l&>Last Updated</&></OPTION>
-<OPTION VALUE="Starts"><&|/l&>Starts</&></OPTION>
-<OPTION VALUE="Due"><&|/l&>Due</&></OPTION>
-<OPTION VALUE="Updated"><&|/l&>Updated</&></OPTION>
-</SELECT>
+<select name="<%$Name%>">
+<option value="Created"><&|/l&>Created</&></option>
+<option value="Started"><&|/l&>Started</&></option>
+<option value="Resolved"><&|/l&>Resolved</&></option>
+<option value="Told"><&|/l&>Last Contacted</&></option>
+<option value="LastUpdated"><&|/l&>Last Updated</&></option>
+<option value="Starts"><&|/l&>Starts</&></option>
+<option value="Due"><&|/l&>Due</&></option>
+<option value="Updated"><&|/l&>Updated</&></option>
+</select>
<%ARGS>
$Name => 'DateType'
</%ARGS>
diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator
index 0f8deea89..851add309 100644
--- a/rt/html/Elements/SelectEqualityOperator
+++ b/rt/html/Elements/SelectEqualityOperator
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,16 +45,16 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% while (my $option = shift @Options) {
% my $value = shift @Values;
-<OPTION VALUE="<%$value%>"
+<option value="<%$value%>"
% if ($Default eq $value) {
-SELECTED
+selected
% }
-><%$option%></OPTION>
+><%$option%></option>
% }
-</SELECT>
+</select>
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/SelectGroups b/rt/html/Elements/SelectGroups
index bc37fd69a..c1fb9df2a 100644
--- a/rt/html/Elements/SelectGroups
+++ b/rt/html/Elements/SelectGroups
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,14 +47,14 @@
%# END BPS TAGGED BLOCK }}}
<select name="GroupField">
% foreach my $col (RT::Group->BasicColumns) {
-<option value="<% $col->[0] %>"><% loc($col->[1]) %>
+<option value="<% $col->[0] %>"><% loc($col->[1]) %></option>
% }
% while (my $CF = $CFs->Next) {
-<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %>
+<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %></option>
% }
</select>
<& /Elements/SelectMatch, Name=> 'GroupOp' &>
-<input size=8 name="GroupString">
+<input size="8" name="GroupString" />
<%INIT>
my $CFs = RT::CustomFields->new($session{'CurrentUser'});
$CFs->LimitToChildType('RT::Group');
diff --git a/rt/html/Elements/SelectLang b/rt/html/Elements/SelectLang
index a439ea330..7640744c9 100644
--- a/rt/html/Elements/SelectLang
+++ b/rt/html/Elements/SelectLang
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,18 +45,18 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% if ($ShowNullOption) {
-<OPTION VALUE="">-</OPTION>
+<option value="">-</option>
% }
% foreach my $lang (@lang) {
-<OPTION VALUE="<%$lang%>" <%($Default && ($lang eq $Default)) && 'SELECTED'%>><% $lang_to_desc{$lang} %>
+<option value="<%$lang%>" <%($Default && ($lang eq $Default)) && 'SELECTED'%>><% $lang_to_desc{$lang} %>
% if (($Verbose) and (my $description = I18N::LangTags::List::native_name($lang)) ){
(<%$description%>)
% }
-</OPTION>
+</option>
% }
-</SELECT>
+</select>
<%ARGS>
$ShowNullOption => 1
$ShowAllQueues => 1
diff --git a/rt/html/Elements/SelectLinkType b/rt/html/Elements/SelectLinkType
index 28cb4419a..4617e7c1c 100644
--- a/rt/html/Elements/SelectLinkType
+++ b/rt/html/Elements/SelectLinkType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="MemberOf"><&|/l&>Member of</&></OPTION>
-<OPTION VALUE="DependsOn"><&|/l&>Depends on</&></OPTION>
-<OPTION VALUE="RefersTo"><&|/l&>Refers to</&></OPTION>
-</SELECT>
+<select NAME ="<%$Name%>">
+<option value="MemberOf"><&|/l&>Member of</&></option>
+<option value="DependsOn"><&|/l&>Depends on</&></option>
+<option value="RefersTo"><&|/l&>Refers to</&></option>
+</select>
<%ARGS>
$Name => "LinkType"
diff --git a/rt/html/Elements/SelectMatch b/rt/html/Elements/SelectMatch
index 60949d979..646ad4e31 100644
--- a/rt/html/Elements/SelectMatch
+++ b/rt/html/Elements/SelectMatch
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,12 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="LIKE" <%$LikeDefault%>><%$Like%></OPTION>
-<OPTION VALUE="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></OPTION>
-<OPTION VALUE="=" <%$TrueDefault%>><%$True%></OPTION>
-<OPTION VALUE="!=" <%$FalseDefault%>><%$False%></OPTION>
-</SELECT>
+<select NAME ="<%$Name%>">
+<option value="LIKE" <%$LikeDefault%>><%$Like%></option>
+<option value="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></option>
+<option value="=" <%$TrueDefault%>><%$True%></option>
+<option value="!=" <%$FalseDefault%>><%$False%></option>
+</select>
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/SelectNewTicketQueue b/rt/html/Elements/SelectNewTicketQueue
index d47b58a83..55dc7d2ea 100644
--- a/rt/html/Elements/SelectNewTicketQueue
+++ b/rt/html/Elements/SelectNewTicketQueue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,39 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<LABEL ACCESSKEY="9">
-<SELECT NAME ="<%$Name%>">
-% foreach my $queue (@{$session{'create_in_queues'}}) {
-<OPTION
- VALUE="<%$queue->{'id'}%>"
- <%$Default && ($queue->{'id'} == $Default) && 'SELECTED'%>>
-<%$queue->{'Name'}%>
-% if (($Verbose) and ($queue->{'Description'}) ){
-(<%$queue->{'Description'}%>)
-% }
-</OPTION>
-% }
-</SELECT>
-</LABEL>
-
-<%INIT>
-unless ($session{'create_in_queues'}) {
-
-@{$session{'create_in_queues'}} = ();
-my $q=new RT::Queues($session{'CurrentUser'});
-$q->UnLimit;
-while (my $queue=$q->Next) {
- if ($queue->CurrentUserHasRight('CreateTicket')) {
- my $ds = { Name => $queue->Name, Description => $queue->Description, id => $queue->id };
- push (@{$session{'create_in_queues'}}, $ds);
- }
-}
-}
-</%INIT>
-
-
-<%ARGS>
-$Name => 'Queue'
-$Verbose => 0
-$Default => 0
-</%ARGS>
+<label accesskey="9">
+ <& /Elements/SelectQueue, Name => 'Queue', %ARGS, ShowNullOption => 0, ShowAllQueues => 0 &>
+</label>
diff --git a/rt/html/Elements/SelectOwner b/rt/html/Elements/SelectOwner
index 85843e5f0..f33b346dc 100644
--- a/rt/html/Elements/SelectOwner
+++ b/rt/html/Elements/SelectOwner
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,20 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
%if ($DefaultValue) {
-<OPTION <% !$Default ? "SELECTED" : '' %> VALUE=""><%$DefaultLabel%></OPTION>
+<option <% !$Default ? "SELECTED" : '' %> value=""><%$DefaultLabel%></option>
%}
%foreach my $User ( @users) {
-<OPTION <% ($User->Id == $Default) ? "SELECTED" : ''%>
+<option <% ($User->Id == $Default) ? "SELECTED" : ''%>
%if ($ValueAttribute eq 'id') {
value="<%$User->id%>"
%} elsif ($ValueAttribute eq 'Name') {
value="<%$User->Name%>"
%}
-><%$User->Name()%></OPTION>
+><%$User->Name()%></option>
%}
-</SELECT>
+</select>
<%INIT>
my @objects;
my @users;
diff --git a/rt/html/Elements/SelectQueue b/rt/html/Elements/SelectQueue
index 56aede89f..0decb5bc9 100644
--- a/rt/html/Elements/SelectQueue
+++ b/rt/html/Elements/SelectQueue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,26 +46,26 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ($Lite) {
-% my $d = new RT::Queue($session{'CurrentUser'});
-% $d->Load($Default);
-<INPUT NAME="<%$Name%>" size=25 DEFAULT="<%$d->Name%>">
-% } else {
-<SELECT NAME ="<%$Name%>">
-% if ($ShowNullOption) {
-<OPTION VALUE="">-</OPTION>
+% my $d = new RT::Queue($session{'CurrentUser'});
+% $d->Load($Default);
+<input name="<%$Name%>" size="25" value="<%$d->Name%>" />
% }
-% while (my $queue=$q->Next) {
-% if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) {
-<OPTION VALUE="<%($NamedValues ? $queue->Name : $queue->Id) %>" <%( $queue->Id eq $Default ? 'SELECTED' : '')%>><%$queue->Name%>
-% if (($Verbose) and ($queue->Description) ){
-(<%$queue->Description%>)
-% }
-</OPTION>
+% else {
+<select name="<%$Name%>">
+% if ($ShowNullOption) {
+ <option value="">-</option>
+% }
+% for my $queue (@{$session{$cache_key}}) {
+ <option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>" <% ($queue->{Id} eq $Default ? 'selected="selected"' : '') |n %>>
+ <%$queue->{Name}%>
+% if ($Verbose and $queue->{Description}) {
+ (<%$queue->{Description}%>)
+% }
+ </option>
+% }
+</select>
% }
-% }
-</SELECT>
-% }
-<%ARGS>
+<%args>
$CheckQueueRight => 'CreateTicket'
$ShowNullOption => 1
$ShowAllQueues => 1
@@ -72,11 +74,24 @@ $Verbose => undef
$NamedValues => 0
$Default => 0
$Lite => 0
-</%ARGS>
-
-<%INIT>
-
-my $q=new RT::Queues($session{'CurrentUser'});
-$q->UnLimit;
+</%args>
+<%init>
+my $cache_key = "SelectQueue---"
+ . $session{'CurrentUser'}->Id
+ . "---$CheckQueueRight---$ShowAllQueues";
-</%INIT>
+if (not defined $session{$cache_key} and not $Lite) {
+ my $q = new RT::Queues($session{'CurrentUser'});
+ $q->UnLimit;
+
+ while (my $queue = $q->Next) {
+ if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) {
+ push @{$session{$cache_key}}, {
+ Id => $queue->Id,
+ Name => $queue->Name,
+ Description => $queue->Description,
+ };
+ }
+ }
+}
+</%init>
diff --git a/rt/html/Elements/SelectResultsPerPage b/rt/html/Elements/SelectResultsPerPage
index 65ed536d6..a83cfaab7 100644
--- a/rt/html/Elements/SelectResultsPerPage
+++ b/rt/html/Elements/SelectResultsPerPage
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,17 +47,18 @@
%# END BPS TAGGED BLOCK }}}
%# TODO: Better default handling
-<SELECT NAME ="<%$Name%>">
-% foreach my $value (@values) {
-<OPTION VALUE="<%$value%>" <% $value == $Default && 'SELECTED' %>>
+<select name="<% $Name %>">
+% foreach my $value ( @values ) {
+<option value="<% $value %>" <% $value == $Default? 'selected': '' %>>
<% shift @labels %>
-</OPTION>
+</option>
% }
-</SELECT>
+</select>
<%INIT>
my @values = qw(0 10 25 50 100);
my @labels = (loc('Unlimited'), qw(10 25 50 100));
+$Default = 50 unless defined $Default;
</%INIT>
<%ARGS>
diff --git a/rt/html/Elements/SelectSortOrder b/rt/html/Elements/SelectSortOrder
index f6dd70ded..2a2771777 100644
--- a/rt/html/Elements/SelectSortOrder
+++ b/rt/html/Elements/SelectSortOrder
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,13 +45,13 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
%foreach my $order (@orders) {
-<OPTION VALUE="<%$order%>" <%$order eq $Default && 'SELECTED' %>>
+<option value="<%$order%>" <%$order eq $Default && 'SELECTED' %>>
<% shift @order_names %>
-</OPTION>
+</option>
% }
-</SELECT>
+</select>
<%INIT>
my @orders = qw (ASC DESC);
diff --git a/rt/html/Elements/SelectStatus b/rt/html/Elements/SelectStatus
index fa76a3e5d..5f861af4f 100644
--- a/rt/html/Elements/SelectStatus
+++ b/rt/html/Elements/SelectStatus
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,15 +45,15 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
%if ($DefaultValue) {
-<OPTION <% !$Default && "SELECTED" %> VALUE=""><%$DefaultLabel%></OPTION>
+<option <% !$Default && "SELECTED" %> value=""><%$DefaultLabel%></option>
%}
%foreach my $status (@status) {
%next if ($SkipDeleted && $status eq 'deleted');
-<OPTION <% ($status eq $Default) && "SELECTED" %> VALUE="<%$status%>"><%loc($status)%></OPTION>
+<option <% ($status eq $Default) && "SELECTED" %> value="<%$status%>"><%loc($status)%></option>
% }
-</SELECT>
+</select>
<%ONCE>
my $queue = new RT::Queue($session{'CurrentUser'});
my @status = $queue->StatusArray();
diff --git a/rt/html/Elements/SelectTicketSortBy b/rt/html/Elements/SelectTicketSortBy
index 3e05dcce9..aca98f878 100644
--- a/rt/html/Elements/SelectTicketSortBy
+++ b/rt/html/Elements/SelectTicketSortBy
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
% foreach my $field (@sortfields) {
-<OPTION VALUE="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></OPTION>
+<option value="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></option>
% }
-</SELECT>
+</select>
<%INIT>
my $tickets = new RT::Tickets($session{'CurrentUser'});
diff --git a/rt/html/Elements/SelectTicketTypes b/rt/html/Elements/SelectTicketTypes
index a905f6067..5bacccf6c 100644
--- a/rt/html/Elements/SelectTicketTypes
+++ b/rt/html/Elements/SelectTicketTypes
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
%foreach (@Types) {
-<OPTION VALUE="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&>
+<option value="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&>
%}
-</SELECT>
+</select>
<%ARGS>
$Name => 'TickType'
diff --git a/rt/html/Elements/SelectTimeUnits b/rt/html/Elements/SelectTimeUnits
new file mode 100755
index 000000000..e1656f113
--- /dev/null
+++ b/rt/html/Elements/SelectTimeUnits
@@ -0,0 +1,57 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<select name="<% $Name %>">
+<option value="minutes" selected><% loc('Minutes') %></option>
+<option value="hours"><% loc('Hours') %></option>
+</select>
+<%INIT>
+$Name .= '-TimeUnits' unless $Name =~ /-TimeUnits$/io;
+</%INIT>
+<%ARGS>
+$Name => ''
+</%ARGS>
diff --git a/rt/html/Elements/SelectUsers b/rt/html/Elements/SelectUsers
index dfe816e49..52febb837 100644
--- a/rt/html/Elements/SelectUsers
+++ b/rt/html/Elements/SelectUsers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,14 +47,14 @@
%# END BPS TAGGED BLOCK }}}
<select name="UserField">
% foreach my $col (RT::User->BasicColumns) {
-<option value="<% $col->[0] %>"><% loc($col->[1]) %>
+<option value="<% $col->[0] %>"><% loc($col->[1]) %></option>
% }
% while (my $CF = $CFs->Next) {
-<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %>
+<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %></option>
% }
</select>
<& /Elements/SelectMatch, Name=> 'UserOp' &>
-<input size=8 name="UserString">
+<input size="8" name="UserString" />
<%INIT>
my $CFs = RT::CustomFields->new($session{'CurrentUser'});
$CFs->LimitToChildType('RT::User');
diff --git a/rt/html/Elements/SelectWatcherType b/rt/html/Elements/SelectWatcherType
index 6ba9c7aa0..26854a782 100644
--- a/rt/html/Elements/SelectWatcherType
+++ b/rt/html/Elements/SelectWatcherType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,14 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% if ($AllowNull) {
-<OPTION VALUE="">-</OPTION>
+<option value="">-</option>
% }
%for my $option (@types) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><%loc($option)%></OPTION>
+<option value="<%$option%>" <%defined($Default) && $option eq $Default && "SELECTED"%>><%loc($option)%></option>
%}
-</SELECT>
+</select>
<%INIT>
my @types;
diff --git a/rt/html/Elements/SetupSessionCookie b/rt/html/Elements/SetupSessionCookie
index bd7861355..087f8250e 100644
--- a/rt/html/Elements/SetupSessionCookie
+++ b/rt/html/Elements/SetupSessionCookie
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,69 +48,77 @@
<%init>
return if $m->is_subrequest; # avoid reentrancy, as suggested by masonbook
-my %cookies = CGI::Cookie->fetch();
-my $cookiename = "RT_SID_".$RT::rtname.".".$ENV{'SERVER_PORT'};
-my %backends = (
- mysql => 'Apache::Session::MySQL',
- Pg => 'Apache::Session::Postgres',
-# Oracle => 'Apache::Session::Oracle',
-) unless $RT::WebSessionClass;
-my $session_class = $RT::WebSessionClass || $backends{$RT::DatabaseType} || 'Apache::Session::File';
-my $pm = "$session_class.pm"; $pm =~ s|::|/|g; require $pm;
+my %cookies = CGI::Cookie->fetch();
+my $cookiename = "RT_SID_" . $RT::rtname . "." . $ENV{'SERVER_PORT'};
+$SessionCookie ||= $cookies{$cookiename} ? $cookies{$cookiename}->value : undef;
- # morning bug avoidance attempt -- pdh 20030815
- unless ($RT::Handle->dbh && $RT::Handle->dbh->ping) {
- $RT::Handle->Connect();
- }
+my %backends = (
+ mysql => 'Apache::Session::MySQL',
+ Pg => 'Apache::Session::Postgres',
+
+ # Oracle => 'Apache::Session::Oracle',
+);
+
+my $session_class = $RT::WebSessionClass
+ || $backends{$RT::DatabaseType}
+ || 'Apache::Session::File';
+my $pm = "$session_class.pm";
+$pm =~ s|::|/|g;
+require $pm;
+
+# morning bug avoidance attempt -- pdh 20030815
+unless ( $RT::Handle->dbh && $RT::Handle->dbh->ping ) {
+ $RT::Handle->Connect();
+}
+
+my $session_properties;
+if ( $session_class eq 'Apache::Session::File' ) {
+ $session_properties = {
+ Directory => $RT::MasonSessionDir,
+ LockDirectory => $RT::MasonSessionDir,
+ };
+} else {
+ $session_properties = {
+ Handle => $RT::Handle->dbh,
+ LockHandle => $RT::Handle->dbh,
+ };
+}
+
+eval {
+ tie %session, $session_class, $SessionCookie, $session_properties
+};
+if ($@) {
+
+ # If the session is invalid, create a new session.
eval {
- tie %session, $session_class,
- $SessionCookie || ( $cookies{$cookiename} ? $cookies{$cookiename}->value() : undef ),
- $backends{$RT::DatabaseType} ? {
- Handle => $RT::Handle->dbh,
- LockHandle => $RT::Handle->dbh,
- } : {
- Directory => $RT::MasonSessionDir,
- LockDirectory => $RT::MasonSessionDir,
- };
+ tie %session, $session_class, undef, $session_properties;
+ undef $cookies{$cookiename};
};
- if ($@) {
+}
- # If the session is invalid, create a new session.
- if ( $@ =~ /Object does not/i ) {
- tie %session, $session_class, undef, $backends{$RT::DatabaseType}
- ? {
- Handle => $RT::Handle->dbh,
- LockHandle => $RT::Handle->dbh,
- }
- : {
- Directory => $RT::MasonSessionDir,
- LockDirectory => $RT::MasonSessionDir,
- };
- undef $cookies{$cookiename};
- }
- else {
- die loc("RT couldn't store your session.") . "\n"
- . loc(
-"This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.",
- $RT::MasonSessionDir
- )
- . "\n\n"
- . $@;
- }
- }
+if ($@) {
+ die loc("RT couldn't store your session.") . "\n"
+ . loc(
+ "This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.",
+ $RT::MasonSessionDir
+ )
+ . "\n\n"
+ . $@;
+}
- if ( !$cookies{$cookiename} ) {
- my $cookie = new CGI::Cookie(
- -name => $cookiename,
- -value => $session{_session_id},
- -path => '/',
- );
- $r->headers_out->{'Set-Cookie'} = $cookie->as_string;
+if ( !$cookies{$cookiename} ) {
+ my $cookie = new CGI::Cookie(
+ -name => $cookiename,
+ -value => $session{_session_id},
+ -path => $RT::WebPath,
+ -secure => ($RT::WebSecureCookies ? 1 :0)
+ );
+ $r->headers_out->{'Set-Cookie'} = $cookie->as_string;
- }
+}
- return();
+return ();
</%init>
<%args>
-$SessionCookie => ''
+$SessionCookie => undef
</%args>
diff --git a/rt/html/Elements/ShowCustomFieldBinary b/rt/html/Elements/ShowCustomFieldBinary
index ea9e5ae83..9dd5faaf1 100644
--- a/rt/html/Elements/ShowCustomFieldBinary
+++ b/rt/html/Elements/ShowCustomFieldBinary
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/ShowCustomFieldImage b/rt/html/Elements/ShowCustomFieldImage
index 7fa5e46d1..c49ae0ecf 100644
--- a/rt/html/Elements/ShowCustomFieldImage
+++ b/rt/html/Elements/ShowCustomFieldImage
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,7 +47,7 @@
%# END BPS TAGGED BLOCK }}}
% my $url = $RT::WebPath . "/Download/CustomFieldValue/".$Object->Id.'/'.$Object->Content;
<a href="<% $url %>"><% $Object->Content %></a>
-<img type="<% $Object->ContentType %>" height=64 src="<% $url %>" align="middle">
+<img type="<% $Object->ContentType %>" height="64" src="<% $url %>" align="middle" />
<%ARGS>
$Object
</%ARGS>
diff --git a/rt/html/Elements/ShowCustomFieldWikitext b/rt/html/Elements/ShowCustomFieldWikitext
index ab7c27b8b..1ddd7da1f 100644
--- a/rt/html/Elements/ShowCustomFieldWikitext
+++ b/rt/html/Elements/ShowCustomFieldWikitext
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,7 +47,8 @@
%# END BPS TAGGED BLOCK }}}
% my $content = $Object->LargeContent || $Object->Content;
% $content = $m->comp('/Elements/ScrubHTML', Content => $content);
-% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1 });
+% my $base = $Object->Object->WikiBase;
+% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1, implicit_links => $RT::WikiImplicitLinks, prefix => $base} );
<%$wiki_content|n%>
<%init>
use Text::WikiFormat;
diff --git a/rt/html/Elements/ShowCustomFields b/rt/html/Elements/ShowCustomFields
index 986184120..06b599654 100644
--- a/rt/html/Elements/ShowCustomFields
+++ b/rt/html/Elements/ShowCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,36 +46,67 @@
%#
%# END BPS TAGGED BLOCK }}}
<table>
-% my @entry_fields;
-% while (my $CustomField = $CustomFields->Next()) {
-% my $Values = $Object->CustomFieldValues($CustomField->Id);
- <tr>
- <td class="label"><%$CustomField->Name%>:</td>
+% while ( my $CustomField = $CustomFields->Next ) {
+% my $Values = $Object->CustomFieldValues( $CustomField->Id );
+% my $count = $Values->Count;
+ <tr id="CF-<%$CustomField->id%>-ShowRow">
+ <td class="label"><% $CustomField->Name %>:</td>
<td class="value">
+% unless ( $count ) {
+<i><&|/l&>(no value)</&></i>
+% } elsif ( $count == 1 ) {
+% $print_value->( $CustomField, $Values->First );
+% } else {
<ul>
-% while (my $Value = $Values->Next()) {
-<li>
-% my $comp = "ShowCustomField".$CustomField->Type;
-% if ($m->comp_exists($comp)) {
-<& $comp, Object => $Value &>
-% } else {
-<%$Value->Content%>
-% }
-</li>
-% }
-% unless ($Values->Count()) {
-<li><i><&|/l&>(no value)</&></i></li>
+% while ( my $Value = $Values->Next ) {
+<li><% $print_value->( $CustomField, $Value ) |n %></li>
% }
</ul>
+% }
</td>
</tr>
% }
</table>
<%INIT>
my $CustomFields = $Object->CustomFields;
- $m->comp('/Elements/Callback', _CallbackName => 'MassageCustomFields',
+$m->comp('/Elements/Callback', _CallbackName => 'MassageCustomFields',
CustomFields => $CustomFields);
+my $print_value = sub {
+ my ($cf, $value) = @_;
+ my $linked = $cf->LinkValueTo;
+ if ( $linked ) {
+ $m->out('<a href="'. $value->LinkValueTo .'" target="_new">');
+ }
+ my $comp = "ShowCustomField". $cf->Type;
+ $m->comp('/Elements/Callback',
+ _CallbackName => 'ShowComponentName',
+ Name => \$comp,
+ CustomField => $cf,
+ Object => $Object
+ );
+ if ( $m->comp_exists( $comp ) ) {
+ $m->comp( $comp, Object => $value );
+ } else {
+ $m->print( $value->Content );
+ }
+ $m->out('</a>') if $linked;
+
+ # This section automatically populates a div with the "IncludeContentForValue" for this custom
+ # field if it's been defined
+ if ( $cf->IncludeContentForValue ) {
+ my $vid = $value->id;
+ $m->out( '<div class="object_cf_value_include" id="object_cf_value_'. $vid .'">' );
+ $m->print( loc("See also:") );
+ $m->out( '<a href="'. $value->IncludeContentForValue .'">' );
+ $m->print( $value->IncludeContentForValue );
+ $m->out( qq{</a></div>\n} );
+ $m->out( qq{<script><!--\nahah('} );
+ $m->print( $value->IncludeContentForValue );
+ $m->out( qq{', 'object_cf_value_$vid');\n--></script>\n} );
+ }
+};
+
</%INIT>
<%ARGS>
$Object => undef
diff --git a/rt/html/Elements/ShowLink b/rt/html/Elements/ShowLink
index 5929a968e..a1d6bdf97 100644
--- a/rt/html/Elements/ShowLink
+++ b/rt/html/Elements/ShowLink
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<A href="<%$URI->Resolver->HREF%>">
+<a href="<%$URI->Resolver->HREF%>">
% if ($URI->IsLocal) {
% my $member = $URI->Object;
% if (UNIVERSAL::isa($member, "RT::Ticket")) {
diff --git a/rt/html/Elements/ShowLinks b/rt/html/Elements/ShowLinks
index c9279a5db..913a4ee35 100755
--- a/rt/html/Elements/ShowLinks
+++ b/rt/html/Elements/ShowLinks
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -93,6 +95,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->ReferredToBy->Next) {
+% next if (UNIVERSAL::isa($Link->BaseObj, 'RT::Ticket') && $Link->BaseObj->Type eq 'reminder');
<li><& ShowLink, URI => $Link->BaseURI &>
% }
</ul>
diff --git a/rt/html/Elements/ShowMemberships b/rt/html/Elements/ShowMemberships
index 3936d5080..f6b2817d7 100644
--- a/rt/html/Elements/ShowMemberships
+++ b/rt/html/Elements/ShowMemberships
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/ShowSearch b/rt/html/Elements/ShowSearch
new file mode 100644
index 000000000..ded865b82
--- /dev/null
+++ b/rt/html/Elements/ShowSearch
@@ -0,0 +1,126 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<&|/Widgets/TitleBox,
+ title => loc($search->Description, $ProcessedSearchArg->{'Rows'}),
+ title_href => $query_link_url.$QueryString,
+ titleright => $customize ? loc('Edit') : '',
+ titleright_href => $customize &>
+<& $query_display_component, %$ProcessedSearchArg, ShowNavigation => 0 &>
+</&>
+<%init>
+my $search;
+my $user = $session{'CurrentUser'}->UserObj;
+my $SearchArg;
+my $customize;
+my $query_display_component = '/Elements/TicketList';
+my $query_link_url = 'Search/Results.html';
+
+if ($SavedSearch) {
+ my ( $container_object, $search_id ) = _parse_saved_search($SavedSearch);
+ $search = $container_object->Attributes->WithId($search_id);
+ unless ( $search->Id && ref( $SearchArg = $search->Content ) eq 'HASH' ) {
+ $m->out("Saved Search $SavedSearch not found");
+ return;
+ }
+ $SearchArg->{'SearchType'} ||= 'Ticket';
+ if ( $SearchArg->{SearchType} ne 'Ticket' ) {
+
+ # XXX: dispatch to different handler here
+ $query_display_component
+ = '/Search/Elements/' . $SearchArg->{SearchType};
+ $query_link_url = "Search/$SearchArg->{SearchType}.html";
+ } else {
+ $customize = $RT::WebPath . '/Search/Build.html?'
+ . $m->comp( '/Elements/QueryString',
+ LoadSavedSearch => $SavedSearch );
+ }
+} else {
+ ($search) = RT::System->new( $session{'CurrentUser'} ) ->Attributes->Named( 'Search - ' . $Name );
+ unless ( $search && $search->Id ) {
+ my (@custom_searches) = RT::System->new( $session{'CurrentUser'} )->Attributes->Named('SavedSearch');
+ foreach my $custom (@custom_searches) {
+ if ($custom->Description eq $Name) { $search = $custom; last }
+ }
+ unless ($search && $search->id) {
+ $m->out("Predefined search $Name not found");
+ return;
+ }
+ }
+
+ $SearchArg = $user->Preferences( $search, $search->Content );
+ $customize = $RT::WebPath . '/Prefs/Search.html?'
+ . $m->comp( '/Elements/QueryString',
+ name => ref($search) . '-' . $search->Id );
+}
+
+# ProcessedSearchArg is a search with overridings, but for link we use
+# orginal search's poperties
+my $ProcessedSearchArg = $SearchArg;
+$ProcessedSearchArg = { %$SearchArg, %Override } if keys %Override;
+
+$m->comp(
+ '/Elements/Callback', %ARGS,
+ _CallbackName => 'ModifySearch',
+ OriginalSearch => $SearchArg,
+ Search => $ProcessedSearchArg,
+);
+
+foreach ( $SearchArg, $ProcessedSearchArg ) {
+ $_->{'Query'} =~ s/__CurrentUser__/$session{'CurrentUser'}->Id/ge;
+ $_->{'Format'} =~ s/__WebPath__/$RT::WebPath/g;
+ $_->{'Format'} =~ s/__loc\(["']?(\w+)["']?\)__/loc("$1")/ge;
+}
+
+my $QueryString = '?' . $m->comp( '/Elements/QueryString', %$SearchArg );
+
+</%init>
+<%ARGS>
+$Name => undef
+$SavedSearch => undef
+%Override => ()
+</%ARGS>
diff --git a/rt/html/Elements/Submit b/rt/html/Elements/Submit
index 9d8dca20f..ee3e8b6f6 100644
--- a/rt/html/Elements/Submit
+++ b/rt/html/Elements/Submit
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,54 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% if ($CheckAll or $ClearAll) {
-<script><!--
-function set_checkbox (obj, val) {
- var i;
- var myfield = obj.form.getElementsByTagName('input');
- for (i = 0; i < myfield.length; i++) {
- if (myfield[i].type == 'checkbox') {
- myfield[i].checked = val;
- }
- }
-}
---></script>
-% }
-<TABLE WIDTH=100% BGCOLOR="<%$color%>" CELLSPACING=0 BORDER=0 CELLPADDING=0 >
-<TR>
-<TD>
+<div class="submit">
+ <div class="extra-buttons">
% if ($CheckAll) {
-<INPUT TYPE=BUTTON VALUE="<%$CheckAllLabel%>" ONCLICK="set_checkbox(this, true)">
+ <input type="button" value="<%$CheckAllLabel%>" onclick="setCheckbox(this.form, '<% $CheckboxName %>', true);return false;" class="button" />
% }
% if ($ClearAll) {
-<INPUT TYPE=BUTTON VALUE="<%$ClearAllLabel%>" ONCLICK="set_checkbox(this, false)">
+ <input type="button" value="<%$ClearAllLabel%>" onclick="setCheckbox(this.form, '<% $CheckboxName %>', false);return false;" class="button" />
% }
% if ($Reset) {
-<INPUT TYPE=RESET VALUE="<%$ResetLabel%>">
-%}
-</TD>
-<TD>
-&nbsp;
-</TD>
-<TD ALIGN=RIGHT VALIGN=CENTER><FONT COLOR=#ffd800>
-% if ($AlternateLabel) {
-<B><%$AlternateCaption%>
-<INPUT TYPE=SUBMIT
-%if ($Name) {
-NAME="<%$Name%>"
-%}
-VALUE='<%$AlternateLabel%>'></B>
+ <input type="reset" value="<%$ResetLabel%>" class="button" />
% }
-<B><%$Caption%> <INPUT TYPE=SUBMIT
-%if ($Name) {
-NAME="<%$Name%>"
+ </div>
+ <div class="buttons">
+% if ($AlternateLabel) {
+ <span class="caption"><%$AlternateCaption%></span>
+ <input type="submit" <% $Name && qq[ name="$Name"] | n %> value="<%$AlternateLabel%>" class="button" />
+% } else {
+ <span class="caption"><%$Caption%></span>
+ <input type="submit" <% $Name && qq[ name="$Name"] | n %> value="<%$Label%>" class="button" />
% }
- VALUE='<%$Label%>'></B></FONT>
-</TD>
-</TR>
-</TABLE>
+ </div>
+ <div class="submit-clear"></div>
+</div>
+
<%ARGS>
-$color => "#336699"
+$color => undef
$Caption => ''
$AlternateCaption => undef
$AlternateLabel => undef
@@ -100,6 +80,7 @@ $CheckAll => undef
$CheckAllLabel => loc('Check All')
$ClearAll => undef
$ClearAllLabel => loc('Clear All')
+$CheckboxName => ''
$Reset => undef
$ResetLabel => loc('Reset')
</%ARGS>
diff --git a/rt/html/Elements/TitleBox b/rt/html/Elements/TitleBox
index 3c638e2d3..dfab9ea82 100644
--- a/rt/html/Elements/TitleBox
+++ b/rt/html/Elements/TitleBox
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,4 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& TitleBoxStart, %ARGS&><%$m->content|n%><& TitleBoxEnd&>
+<%init>
+# For compatibility with 3.4
+$m->comp('/Widgets/TitleBox', %ARGS );
+</%init>
diff --git a/rt/html/Elements/TitleBoxEnd b/rt/html/Elements/TitleBoxEnd
index d791e3a4f..933d77000 100644
--- a/rt/html/Elements/TitleBoxEnd
+++ b/rt/html/Elements/TitleBoxEnd
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
- </TD>
- </TR>
-</TABLE>
-% #Manually flush the content buffer after each titlebox is displayed
-% $m->flush_buffer();
-
-<%ARGS>
-$title => undef
-$content => undef
-</%ARGS>
-
+<%init>
+# For compatibility with 3.4
+$m->comp('/Widgets/TitleBoxEnd', %ARGS );
+</%init>
diff --git a/rt/html/Elements/ValidateCustomFields b/rt/html/Elements/ValidateCustomFields
new file mode 100644
index 000000000..483021952
--- /dev/null
+++ b/rt/html/Elements/ValidateCustomFields
@@ -0,0 +1,81 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%INIT>
+my $valid = 1;
+$CustomFields->GotoFirstItem;
+while (my $CF = $CustomFields->Next) {
+ my $pattern = $CF->Pattern;
+ my $field = $NamePrefix . $CF->Id . "-Value";
+ my $value;
+
+ if ($ARGSRef->{"${field}s-Magic"} and exists $ARGSRef->{"${field}s"}) {
+ $value = $ARGSRef->{"${field}s"};
+
+ # We only validate Single Combos -- multis can never be user input
+ next if ref $value;
+ }
+ else {
+ $value = $ARGSRef->{$field};
+ }
+
+ $m->notes(('Field-' . $CF->Id) => $value);
+ next if $CF->MatchPattern($value);
+ $m->notes(
+ ('InvalidField-' . $CF->Id)
+ => (loc("Input must match [_1]", $CF->FriendlyPattern))
+ );
+ $valid = 0;
+}
+$m->notes('ValidFields', $valid);
+return $valid;
+</%INIT>
+<%ARGS>
+$CustomFields
+$ARGSRef
+$NamePrefix => "Object-RT::Ticket--CustomField-"
+</%ARGS>
diff --git a/rt/html/Helpers/CalPopup.html b/rt/html/Helpers/CalPopup.html
new file mode 100644
index 000000000..9509d13f4
--- /dev/null
+++ b/rt/html/Helpers/CalPopup.html
@@ -0,0 +1,129 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, ShowBar => 0 &>
+%# From /Elements/Header
+</div>
+<div id="body" class="calpopup">
+
+<a href="#" onclick="window.close(); return false;"><&|/l&>Close window</&></a>
+
+<div class="calendar">
+ <table>
+ <caption>
+ <a class="prev" href="CalPopup.html?DisplayedMonth=<%$prev_month%>&DisplayedYear=<%$prev_year%>&field=<%$field%>"><&|/l&>Prev</&></a>
+ <span class="month"><% $months[$DisplayedMonth-1] %> <% $DisplayedYear %></span>
+ <a class="next" href="CalPopup.html?DisplayedMonth=<%$next_month%>&DisplayedYear=<%$next_year%>&field=<%$field%>"><&|/l&>Next</&></a>
+ </caption>
+ <tr>
+% foreach my $wday (@weekdays) {
+ <th><%$wday%></th>
+% }
+ </tr>
+% foreach my $week (@cal) {
+ <tr>
+% foreach my $day (@{$week}) {
+ <td>
+% if ($day) {
+% my $datestr = sprintf('%04d-%02d-%02d', $DisplayedYear, $DisplayedMonth, $day);
+ <a href="#" onclick="updateParentField('<% $field %>','<% $datestr %>'); return false;"><% $day %></a>
+% } else {
+ &nbsp;
+% }
+ </td>
+% } #foreach $day
+ </tr>
+% } # foreach $week
+ </table>
+</div>
+</div>
+</body>
+</html>
+% $m->abort();
+
+<%init>
+use Calendar::Simple;
+my @today = localtime(time());
+
+my @weekdays;
+push @weekdays, loc($_)
+ for qw(Sun Mon Tue Wed Thu Fri Sat);
+
+my @months;
+push @months, loc($_)
+ for qw(January February March April May June July August
+ September October November December);
+
+unless ($DisplayedYear) {
+ $DisplayedMonth = $today[4] + 1;
+ $DisplayedYear = ($today[5] + 1900);
+}
+
+my ($prev_year, $next_year, $prev_month, $next_month);
+$prev_month = $next_month = $DisplayedMonth;
+$prev_year = $next_year = $DisplayedYear;
+
+$next_month++;
+$prev_month--;
+
+if ($DisplayedMonth == 12) {
+ $next_year++;
+ $next_month = 1;
+}
+elsif ($DisplayedMonth == 1) {
+ $prev_month = 12;
+ $prev_year--;
+}
+
+my @cal = calendar($DisplayedMonth, $DisplayedYear);
+</%init>
+
+<%args>
+$field => 'none'
+$DisplayedMonth => undef
+$DisplayedYear => undef
+</%args>
diff --git a/rt/html/NoAuth/Logout.html b/rt/html/NoAuth/Logout.html
index b6a238bac..49b7a4e59 100644
--- a/rt/html/NoAuth/Logout.html
+++ b/rt/html/NoAuth/Logout.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,25 +45,29 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<HTML>
-<HEAD>
-<TITLE>RT: Logout</TITLE>
- <META HTTP-EQUIV="Refresh" CONTENT="0;URL=<%$URL%>">
-</HEAD>
-<BODY>
+<html>
+<head>
+<title>RT: Logout</title>
+ <meta HTTP-EQUIV="Refresh" content="0;URL=<%$URL%>">
+</head>
+<body>
<p><&|/l&>You have been logged out of RT.</&>
-<br>
-<br>
-<A HREF="<%$URL%>"><&|/l&>You're welcome to login again</&></a>
+<br />
+<br />
+<a href="<%$URL%>"><&|/l&>You're welcome to login again</&></a>.
+% $m->abort();
+
+<%INIT>
+$m->comp('/Elements/Callback', _CallbackName => 'BeforeSessionDelete', %ARGS);
-<%PERL>
if (defined %session) {
- tied(%session)->delete;
+ tied(%session)->delete;
}
-$m->abort();
-</%PERL>
+
+$m->comp('/Elements/Callback', _CallbackName => 'AfterSessionDelete', %ARGS);
+</%INIT>
<%ARGS>
$URL => $RT::WebPath."/"
diff --git a/rt/html/NoAuth/Reminder.html b/rt/html/NoAuth/Reminder.html
index 0793f6c96..dc935d45e 100644
--- a/rt/html/NoAuth/Reminder.html
+++ b/rt/html/NoAuth/Reminder.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/NoAuth/css/3.4-compat/body.css b/rt/html/NoAuth/css/3.4-compat/body.css
new file mode 100644
index 000000000..6188951a4
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/body.css
@@ -0,0 +1,75 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#body {
+ margin: 0.5em 0.5em 0 0.5em;
+ float: left;
+ width: 80%;
+}
+
+#body h1 { font-size: 1.5em; }
+#body h2 { font-size: 1.3em; }
+#body h3 { font-size: 1.1em; }
+#body h4 { font-size: 1em; }
+#body h5 { font-size: 0.9em; }
+#body h6 { font-size: 0.8em; }
+
+#body h1, #body h2, #body h3, #body h4, #body h5, #body h6 {
+ font-weight: bold;
+}
+
+#body :link { color: black; }
+
+#body :link, #body :visited {
+ font-weight: bold;
+ text-decoration: none;
+}
+
+#body :link:hover, #body :visited:hover {
+ text-decoration: underline;
+}
+
diff --git a/rt/html/NoAuth/css/3.4-compat/footer.css b/rt/html/NoAuth/css/3.4-compat/footer.css
new file mode 100644
index 000000000..4e90c507c
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/footer.css
@@ -0,0 +1,61 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#footer {
+ clear: both;
+ font-size: 0.8em;
+ margin-top: 5em;
+ padding-bottom: 2em;
+ color: #888;
+}
+
+#footer p {
+ text-align: right;
+ padding: 0 0.5em 0 0;
+ margin: 0;
+}
+
diff --git a/rt/html/NoAuth/css/3.4-compat/forms.css b/rt/html/NoAuth/css/3.4-compat/forms.css
new file mode 100644
index 000000000..301f8f3e4
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/forms.css
@@ -0,0 +1,104 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+form .label, form label {
+ font-weight: bold;
+}
+
+.submit {
+ background: #069;
+%# These borders are needed so the container actually surrounds the floats inside it
+ border-top: 1px solid white;
+ border-bottom: 1px solid white;
+ color: #ffdb00;
+ font-weight: bold;
+}
+
+.submit .buttons { float: right; }
+.submit .extra-buttons { float: left; }
+.submit .button { font-size: 0.9em; }
+
+.submit .submit-clear { clear: right; }
+
+.input-row {
+ clear: both;
+ padding: 0.25em;
+}
+
+%# ComboBox styles... some properties like height and width must be dynamically
+%# set in the JS (at least for now).
+.combobox {
+ border: 2px inset ButtonHighlight;
+ padding-left: 0.5em;
+ padding-bottom: 0.1em;
+}
+
+.combobox .combo-button {
+ padding: 0 2px 0 2px;
+ margin: 0;
+ background: ButtonFace;
+ color: ButtonText;
+ border: 2px outset ButtonHighlight;
+ cursor: default;
+ font-size: 8pt;
+}
+
+.combobox .combo-text {
+ border: none;
+ margin: 0;
+ padding: 0;
+}
+
+.combobox .combo-list {
+ z-index: 200;
+}
+
+#quickbar #topactions form {
+ display: inline;
+ margin-left: 2em;
+}
+
diff --git a/rt/html/NoAuth/css/3.4-compat/header.css b/rt/html/NoAuth/css/3.4-compat/header.css
new file mode 100644
index 000000000..a8e3184ce
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/header.css
@@ -0,0 +1,88 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#header #page-menu {
+ display: none;
+}
+
+#header {
+ background: #4282b5;
+ margin-top: 0;
+ padding-bottom: 0.2em;
+ float: left;
+ width: 82%;
+}
+
+#header h1 {
+ background: #4282b5;
+ color: white;
+ font-size: 1.7em;
+ margin: 0;
+ padding: 0;
+}
+
+#header #actions-menu {
+ display: block;
+ margin: 0 1em 0 0;
+ padding: 0;
+ color: white;
+ text-align: right;
+ font-size: 1.2em;
+}
+
+#header #actions-menu li {
+ display: inline;
+}
+
+#header #actions-menu :link, #header #actions-menu :visited {
+ color: white;
+ text-decoration: none;
+}
+
+#header #actions-menu :link:hover, #header #actions-menu :visited:hover {
+ text-decoration: underline;
+}
diff --git a/rt/html/NoAuth/css/3.4-compat/login.css b/rt/html/NoAuth/css/3.4-compat/login.css
new file mode 100644
index 000000000..2b967e0f1
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/login.css
@@ -0,0 +1,54 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#body.login-body {
+ width: 98%;
+}
+
+#login-box {
+ width: 30em;
+}
diff --git a/rt/html/NoAuth/css/3.4-compat/main.css b/rt/html/NoAuth/css/3.4-compat/main.css
new file mode 100644
index 000000000..f2c9ad321
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/main.css
@@ -0,0 +1,69 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+%# Import the 3.5 styles we want to build off of...
+@import "../3.5-default/logo.css";
+@import "../3.5-default/misc.css";
+@import "../3.5-default/transactions.css";
+@import "../3.5-default/approvals.css";
+@import "../3.5-default/login.css";
+@import "../3.5-default/quickbar.css";
+@import "../3.5-default/ticket.css";
+
+%# ...and then import the 3.4 compat styles afterwards so they can cascade
+@import "nav.css";
+@import "footer.css";
+@import "body.css";
+@import "titlebox.css";
+@import "header.css";
+@import "forms.css";
+@import "transactions.css";
+@import "ticket.css";
+@import "login.css";
+@import "quickbar.css";
+@import "misc.css";
+
diff --git a/rt/html/NoAuth/css/3.4-compat/misc.css b/rt/html/NoAuth/css/3.4-compat/misc.css
new file mode 100644
index 000000000..09be77a51
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/misc.css
@@ -0,0 +1,49 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+.oddline { background: white; }
+.evenline { background: #cecfef; }
diff --git a/rt/html/NoAuth/css/3.4-compat/nav.css b/rt/html/NoAuth/css/3.4-compat/nav.css
new file mode 100644
index 000000000..f83c0fd2c
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/nav.css
@@ -0,0 +1,106 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#nav {
+ clear: left;
+ float: left;
+ width: 18%;
+ font-size: 1.4em;
+ color: #eee;
+ margin: 0;
+ background: #4282b5 url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right;
+}
+
+#nav #system-menu {
+ padding: 0 0.2em 0.2em 0.2em;
+ margin-top: 0;
+/* background: transparent url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right; */
+}
+
+#nav ul {
+ list-style: none;
+ padding-left: 0.5em;
+ margin-left: 0;
+}
+
+#nav ul .bullet, #nav ul .separator {
+ display: none;
+}
+
+#nav ul li {
+ padding: 0.4em 0 0.4em 0.2em;
+ border-bottom: 1px solid white;
+}
+
+#nav li ul {
+ font-size: 0.9em;
+}
+
+#nav li ul li {
+ border-bottom: none;
+ padding: 0.2em 0 0 0;
+}
+
+#nav :link, #nav :visited {
+ text-decoration: none;
+ color: #eee;
+}
+
+#nav :link:hover,
+#nav :visited:hover,
+#nav :link.selected,
+#nav :visited.selected
+{
+ color: #ff6;
+}
+
+#nav :link.selected,
+#nav :visited.selected
+{
+ text-decoration: underline;
+ font-weight: bold;
+}
diff --git a/rt/html/NoAuth/css/3.4-compat/quickbar.css b/rt/html/NoAuth/css/3.4-compat/quickbar.css
new file mode 100644
index 000000000..d7aac5d51
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/quickbar.css
@@ -0,0 +1,82 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#quickbar {
+ border: 1px solid transparent;
+}
+
+#quickbar #quick-personal {
+ display: inline;
+ color: #888;
+ padding: 0.5em 1em 0 0;
+ float: right;
+}
+
+#quickbar #quick-personal span {
+ font-weight: bold;
+}
+
+#quickbar #quick-personal :link,
+#quickbar #quick-personal :visited
+{
+ color: #888;
+ font-weight: bold;
+}
+
+#quickbar #quick-personal :link:hover,
+#quickbar #quick-personal :visited:hover
+{
+ color: black;
+}
+
+#quickbar #topactions {
+ color: white;
+ font-size: 0.9em;
+ position: relative;
+ right: 1em;
+ float: right;
+}
diff --git a/rt/html/NoAuth/css/3.4-compat/ticket.css b/rt/html/NoAuth/css/3.4-compat/ticket.css
new file mode 100644
index 000000000..2c808929d
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/ticket.css
@@ -0,0 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+.value {
+ font-weight: bold;
+}
diff --git a/rt/html/NoAuth/css/3.4-compat/titlebox.css b/rt/html/NoAuth/css/3.4-compat/titlebox.css
new file mode 100644
index 000000000..363da69d3
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/titlebox.css
@@ -0,0 +1,103 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+.titlebox {
+ margin: 0.5em 0;
+}
+
+.titlebox .titlebox-content {
+ padding: 0.05em;
+}
+
+.titlebox .titlebox-title {
+ background: #069;
+ padding: 0.2em 0.5em;
+ color: white;
+ border-top: 1px solid black;
+ border-bottom: 1px solid black;
+ font-weight: bold;
+ position: relative;
+}
+
+.titlebox .titlebox-title .right {
+ position: absolute;
+ right: 1.5em;
+ font-size: 0.9em;
+}
+
+#body .titlebox .titlebox-title :link, #body .titlebox .titlebox-title :visited {
+ color: white;
+}
+
+#body .titlebox .titlebox-title .widget :link, #body .titlebox .titlebox-title .widget :visited {
+ color: black;
+}
+
+.titlebox .titlebox-content hr.clear {
+ visibility: hidden;
+}
+
+%# TRS: I wish there was a more elegant way to do this... I essentially need to
+%# select all elements X that do NOT have element Y as a descendant... which I can
+%# fake with the child selector of CSS2, but IE is stupid and does not support that.
+
+% for (qw(index
+% Search-Build
+% User-Prefs
+% Approvals
+% Admin-Users-Modify
+% SelfService
+% SelfService-Closed
+% Ticket-ModifyAll
+% ))
+% {
+#comp-<%$_%> .titlebox .titlebox-content,
+% }
+.titlebox .titlebox .titlebox-content
+{
+ background: #cecfce;
+}
diff --git a/rt/html/NoAuth/css/3.4-compat/transactions.css b/rt/html/NoAuth/css/3.4-compat/transactions.css
new file mode 100644
index 000000000..2078a3147
--- /dev/null
+++ b/rt/html/NoAuth/css/3.4-compat/transactions.css
@@ -0,0 +1,83 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+.ticket-transaction {
+ margin: 0;
+ border: none;
+}
+
+.ticket-transaction .type {
+ width: 1em;
+}
+
+.ticket-transaction.even {
+ background: #cecfef;
+}
+
+.ticket-transaction.basics { border-color: #9c3031; }
+.ticket-transaction.basics .type { background: #9c3031; }
+.ticket-summary .ticket-info-basics .titlebox-content { border-left: none; }
+.ticket-summary .ticket-info-basics .titlebox-title { background: #9c3031; }
+
+.ticket-transaction.people { border-color: #31309c; }
+.ticket-transaction.people .type { background: #31309c; }
+.ticket-summary .ticket-info-people .titlebox-content { border-left: none; }
+.ticket-summary .ticket-info-people .titlebox-title { background: #31309c; }
+
+.ticket-transaction.links { border-color: #316531; }
+.ticket-transaction.links .type { background: #316531; }
+.ticket-summary .ticket-info-links .titlebox-content { border-left: none; }
+.ticket-summary .ticket-info-links .titlebox-title { background: #316531; }
+
+.ticket-transaction.dates { border-color: #633063; }
+.ticket-transaction.dates .type { background: #633063; }
+.ticket-summary .ticket-info-dates .titlebox-content { border-left: none; }
+.ticket-summary .ticket-info-dates .titlebox-title { background: #633063; }
+
+.ticket-transaction.message { border-color: #069; }
+.ticket-transaction.message .type { background: #069; }
+
diff --git a/rt/html/NoAuth/css/3.5-default/approvals.css b/rt/html/NoAuth/css/3.5-default/approvals.css
new file mode 100644
index 000000000..5bc836aa9
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/approvals.css
@@ -0,0 +1,97 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+.approval {
+ margin-bottom: 3em;
+ padding: 0 0 1em 0;
+ border: 1px solid #069;
+}
+
+.approval .name {
+ background: #069;
+ color: white;
+ font-size: 1.1em;
+ padding: 0.2em 0 0.4em 0.2em;
+}
+
+#body .approval .name :link, #body .approval .name :visited {
+ color: white;
+}
+
+.approval .originating-ticket {
+ margin: 0.5em;
+ border: 1px solid #aaa;
+}
+
+.approval .originating-ticket .link {
+ display: block;
+ background: #aaa;
+ padding: 0.2em 0 0.4em 0.2em;
+}
+
+.approval .originating-ticket .info {
+ padding: 0.5em;
+}
+
+#body .approval .originating-ticket .link :link,
+#body .approval .originating-ticket .link :visited {
+ color: black;
+}
+
+.approval .form {
+ margin: 1em 0.5em 0.5em 0.5em;
+}
+
+.approval .form .action, .approval .form .notes {
+ float: left;
+ margin-left: 1em;
+}
+
+.approval .form .action { padding-top: 1em; }
+
+.approval .form .action label { font-weight: normal; }
+.approval .form .notes label { display: block; }
diff --git a/rt/html/NoAuth/css/3.5-default/body.css b/rt/html/NoAuth/css/3.5-default/body.css
new file mode 100755
index 000000000..d4470343c
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/body.css
@@ -0,0 +1,81 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#body {
+ clear: both;
+ margin: 0 0.75em 0 2em;
+ padding-top: 0.5em;
+}
+
+#body h1 {
+ border-bottom: 1px dotted #069;
+ padding-left: 0.5em;
+}
+
+#body h1 { font-size: 1.5em; }
+#body h2 { font-size: 1.3em; }
+#body h3 { font-size: 1.1em; }
+#body h4 { font-size: 1em; }
+#body h5 { font-size: 0.9em; }
+#body h6 { font-size: 0.8em; }
+
+#body h1, #body h2, #body h3, #body h4, #body h5, #body h6 {
+ color: #930;
+ font-weight: bold;
+}
+
+#body :link { color: #069; }
+
+#body :link, #body :visited {
+ font-weight: bold;
+ text-decoration: none;
+}
+
+#body :link:hover, #body :visited:hover {
+ text-decoration: underline;
+}
+
diff --git a/rt/html/NoAuth/css/3.5-default/footer.css b/rt/html/NoAuth/css/3.5-default/footer.css
new file mode 100644
index 000000000..c46998293
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/footer.css
@@ -0,0 +1,91 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#footer {
+ clear: both;
+ font-size: 0.8em;
+ margin-top: 5em;
+ padding-bottom: 3em;
+}
+
+#footer p { float: left; }
+
+#footer #time {
+ color: white;
+ background: #069 url(<%$RT::WebImagesURL%>/css/ctr-b2g.gif) no-repeat top right;
+ padding: 0.2em 0 0.3em 0;
+ margin: 0;
+ position: relative;
+ z-index: 2;
+}
+
+#footer #time span {
+ padding: 0.2em 2em 0.3em 3em;
+ background: url(<%$RT::WebImagesURL%>/css/cbr-b2g.gif) no-repeat bottom right;
+}
+
+#footer #bpscredits {
+ background: #ccc url(<%$RT::WebImagesURL%>/css/ctr-gray.gif) no-repeat top right;
+ padding: 0.2em 0 0.3em 0;
+ margin: 0;
+ position: relative;
+ left: -10px;
+ z-index: 1;
+}
+
+#footer #bpscredits span {
+ padding: 0.2em 2em 0.3em 3em;
+ background: url(<%$RT::WebImagesURL%>/css/cbr-gray.gif) no-repeat bottom right;
+}
+
+#footer #legal {
+ float: none;
+ color: #888;
+ padding: 1em 0 0 2em;
+ clear: both;
+}
+
diff --git a/rt/html/NoAuth/css/3.5-default/forms.css b/rt/html/NoAuth/css/3.5-default/forms.css
new file mode 100755
index 000000000..e49c45f3a
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/forms.css
@@ -0,0 +1,136 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+form input.button {
+ border: 3px double #069;
+ border-top-color: #08c;
+ border-left-color: #08c;
+ padding: 0.25em;
+ background: white;
+ font-weight: bold;
+ font-size: 1em;
+ margin: 0.5em 0.5em 0 0.5em;
+}
+
+form input.button:active {
+ border: 3px double #08c;
+ border-top-color: #069;
+ border-left-color: #069;
+}
+
+form select {
+ border: 1px solid #069;
+ padding: 1px;
+}
+
+form input.field, form input, form textarea {
+ border: 1px solid #069;
+ padding: 3px;
+}
+
+form input.checkbox, form input.radio {
+ border: none;
+ padding: 0;
+}
+
+/* form .entry input, form .value input */
+
+.label, form label, .labeltop {
+ font-weight: bold;
+}
+
+.labeltop {
+ vertical-align: top;
+}
+
+.submit {
+ font-weight: bold;
+ color: #a00;
+ font-size: 1.1em;
+ padding: 0.3em 1.5em 0 1.5em;
+ border-top: 1px solid #930;
+ margin: 1.5em 0 2.5em 0;
+}
+
+.submit .buttons { float: right; }
+.submit .extra-buttons { float: left; }
+.submit .button { font-size: 0.9em; }
+.submit .submit-clear { display: none; }
+
+.input-row {
+ clear: both;
+ padding: 0.25em;
+}
+
+%# ComboBox styles... some properties like height and width must be dynamically
+%# set in the JS (at least for now).
+.combobox {
+ border: 2px inset #069;
+ padding-left: 0.5em;
+ padding-bottom: 0.1em;
+}
+
+.combobox .combo-button {
+ padding: 0 2px 0 2px;
+ margin: 0;
+ background: ButtonFace;
+ color: ButtonText;
+ border: 2px outset ButtonHighlight;
+ cursor: default;
+ font-size: 8pt;
+}
+
+.combobox .combo-text {
+ border: none;
+ margin: 0;
+ padding: 0;
+}
+
+.combobox .combo-list {
+ z-index: 200;
+}
+
diff --git a/rt/html/NoAuth/css/3.5-default/header.css b/rt/html/NoAuth/css/3.5-default/header.css
new file mode 100644
index 000000000..cc5c9e4b1
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/header.css
@@ -0,0 +1,152 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#header {
+ clear: both;
+ margin: 0 0.75em 0 0.75em;
+ padding-top: 1em;
+}
+
+#header h1 {
+ margin: 0;
+ padding: 0;
+ color: #930;
+ position: relative;
+ font-size: 2em;
+ font-weight: bold;
+ left: 1.3em;
+ top: 0.15em;
+ z-index: 3;
+ width: 95%;
+}
+
+#header ul {
+ margin: 0;
+ padding: 0;
+ color: #eee;
+ float: left;
+}
+
+#header #page-menu {
+ position: relative;
+ z-index: 2;
+ background: #069 url(<%$RT::WebImagesURL%>/css/ct.gif) no-repeat top left;
+ min-width: 65%;
+}
+
+%# This is an interesting bit of CSS. expression() is an IE-only extension to
+%# it's CSS implementation. Just in case other browsers might choke on it,
+%# the rule is enclosed in a selector only IE will (wrongly) match to an element.
+%#
+%# The expression() function takes Javascript, and basically what it's doing here
+%# is checking to see if the width of the menu would be greater than 65% of the body
+%# width. If it is, great, leave it alone to automatically resize. If it is not, set
+%# it to 65% of the body width. This amounts to emulating the min-width rule that
+%# compliant browsers understand above.
+* html #header ul#page-menu {
+ width: expression(document.body.clientWidth*0.65 < document.getElementById('page-menu').clientWidth ? "auto" : "65%");
+ overflow: visible;
+}
+
+#page-menu div {
+ position: relative;
+ z-index: 3;
+}
+
+#page-menu div { background: url(<%$RT::WebImagesURL%>/css/cb.gif) no-repeat bottom left; }
+#page-menu div div { background: url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right; }
+#page-menu div div div {
+ background: url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right;
+ padding: 0.2em 1em 0.4em 1em;
+}
+
+#page-menu.actions-present div div { background: url(<%$RT::WebImagesURL%>/css/cbr-b2lb.gif) no-repeat bottom right; }
+#page-menu.actions-present div div div { background: url(<%$RT::WebImagesURL%>/css/ctr-b2lb.gif) no-repeat top right; }
+
+#header ul li {
+ display: inline;
+}
+
+#header #actions-menu {
+ position: relative;
+ background: #08c;
+}
+
+#actions-menu div {
+ position: relative;
+ z-index: 2;
+}
+
+/*#actions-menu div { background: url(<%$RT::WebImagesURL%>/css/cb.gif) no-repeat bottom left; }*/
+#actions-menu div div { background: url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right; }
+#actions-menu div div div {
+ background: url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right;
+ padding: 0.2em 1em 0.4em 1em;
+}
+
+#header :link,
+#header :visited
+{
+ color: white;
+ text-decoration: none;
+}
+
+#header :link.selected,
+#header :visited.selected,
+#header :link:hover,
+#header :visited:hover
+{
+ color: #fc6; /*#ff6;*/
+}
+
+#header :link.selected,
+#header :visited.selected
+{
+ font-weight: bold;
+ text-decoration: underline;
+}
+
diff --git a/rt/html/NoAuth/css/3.5-default/login.css b/rt/html/NoAuth/css/3.5-default/login.css
new file mode 100644
index 000000000..b9e7aeb41
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/login.css
@@ -0,0 +1,85 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#login-box {
+ width: 50%;
+ margin: 0 auto 4em auto;
+}
+
+%# More rules only IE will recognize (but are still valid!) to correct for
+%# IE's incorrect handling of auto margins and the W3C defined behavior.
+%# text-align will affect a block element in IE, therefore centering it, like
+%# left and right auto margins *should*
+* html #login-box {
+ text-align: center;
+}
+
+%# ... and align the text back the way it should be
+* html #login-box .titlebox {
+ text-align: left;
+}
+
+#login-box .input-row {
+ padding: 0.5em;
+}
+
+#login-box .input-row .label {
+ width: 8em;
+ float: left;
+ text-align: right;
+ padding: 0.2em 1em 0 0;
+}
+
+#login-box .input-row .input {
+ float: left;
+}
+
+#login-box .button-row {
+ clear: both;
+ padding: 0.5em;
+ float: right;
+}
diff --git a/rt/html/NoAuth/css/3.5-default/logo.css b/rt/html/NoAuth/css/3.5-default/logo.css
new file mode 100644
index 000000000..e9c079cc0
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/logo.css
@@ -0,0 +1,60 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#logo {
+ float: left;
+ clear: left;
+
+ margin: 0.5em 0 0.5em 10px;
+}
+
+#logo img { border: none; }
+#logo div.rtname {
+ text-align: center;
+ font-weight: bold;
+}
+
diff --git a/rt/html/NoAuth/css/3.5-default/main.css b/rt/html/NoAuth/css/3.5-default/main.css
new file mode 100644
index 000000000..13f1ba621
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/main.css
@@ -0,0 +1,61 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+@import "misc.css";
+@import "login.css";
+@import "logo.css";
+@import "quickbar.css";
+@import "body.css";
+@import "approvals.css";
+@import "titlebox.css";
+@import "forms.css";
+@import "ticket.css";
+@import "transactions.css";
+@import "nav.css";
+@import "header.css";
+@import "footer.css";
+
diff --git a/rt/html/NoAuth/css/3.5-default/misc.css b/rt/html/NoAuth/css/3.5-default/misc.css
new file mode 100755
index 000000000..9e83ef448
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/misc.css
@@ -0,0 +1,91 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+body {
+ font-family: Verdana, sans-serif;
+ font-size: 76%;
+ margin: 0;
+ background-color: white;
+}
+
+.hide, .hidden { display: none !important; }
+
+#body.calpopup {
+ margin-left: 2em;
+}
+
+.calendar {
+ text-align: center;
+ margin: 2em 0 0 0;
+}
+
+.calendar td, .calendar th { padding: 0.1em 0.25em 0.1em 0.25em; }
+
+.calendar caption .month {
+ padding: 0 1em 0 1em;
+ font-size: 1.5em;
+}
+
+.evenline { background-color: white; }
+.oddline { background-color: #ddd; }
+
+td {
+ padding: 0.1em 0.5em 0.1em 0.5em;
+}
+
+.clear { clear: both; }
+
+ul.action-results {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+#comp-Search-Build .titlebox-content {
+ padding-left: 0.7em;
+ padding-right: 0.3em;
+}
+
diff --git a/rt/html/NoAuth/css/3.5-default/nav.css b/rt/html/NoAuth/css/3.5-default/nav.css
new file mode 100644
index 000000000..78323aa91
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/nav.css
@@ -0,0 +1,163 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#nav {
+ clear: both;
+ font-size: 1.1em;
+}
+
+#nav #system-menu,
+#nav ul
+{
+ min-width: 85%;
+}
+
+%# This is an interesting bit of CSS. expression() is an IE-only extension to
+%# it's CSS implementation. Just in case other browsers might choke on it,
+%# the rule is enclosed in a selector only IE will (wrongly) match to an element.
+%#
+%# The expression() function takes Javascript, and basically what it's doing here
+%# is checking to see if the width of the menu would be greater than 85% of the body
+%# width. If it is, great, leave it alone to automatically resize. If it is not, set
+%# it to 85% of the body width. This amounts to emulating the min-width rule that
+%# compliant browsers understand above.
+* html #nav #system-menu {
+ width: expression(document.body.clientWidth*0.85 < document.getElementById('page-menu').clientWidth ? "auto" : "85%");
+ overflow: visible;
+}
+
+#nav ul {
+ float: left;
+ clear: left;
+
+ color: #eee;
+ font-weight: bold;
+
+ margin: 0;
+ padding: 0;
+
+ list-style: none;
+}
+
+#nav li ul {
+ margin-top: 0.75em;
+}
+
+/*
+%# We need the extra padding above for browsers where we display the arrows
+%# but those don't work in IE so we don't want as much spacing
+%#
+%# IE wrongly matches the selector below even though there isn't an element
+%# above <html> in the doc tree
+*/
+* html #nav li ul {
+ margin-top: 0.25em;
+}
+
+#nav li {
+ display: inline;
+ margin-bottom: 1em;
+ padding: 0.2em 0 0.4em 0;
+}
+
+#nav li.first { padding-left: 1em; }
+
+#nav ul div div.wrapper {
+ text-align: left;
+ padding: 0.2em 1em 0.4em 0;
+}
+
+/****/
+
+#nav :link,
+#nav :visited
+{
+ color: #ececec;
+ text-decoration: none;
+}
+
+#nav :link.selected,
+#nav :visited.selected,
+#nav :link:hover,
+#nav :visited:hover
+{
+ color: #fc6; /*#ff6;*/
+}
+
+#nav :link.selected,
+#nav :visited.selected
+{
+ text-decoration: underline;
+}
+
+html>body #nav :link.selected,
+html>body #nav :visited.selected
+{
+ padding-bottom: 0.8em;
+ background: transparent url(<%$RT::WebImagesURL%>/css/dark-arrow.png) no-repeat bottom center;
+}
+
+html>body #nav :link.selected.odd,
+html>body #nav :visited.selected.odd
+{
+ padding-bottom: 0.8em;
+ background: transparent url(<%$RT::WebImagesURL%>/css/light-arrow.png) no-repeat bottom center;
+}
+
+/*
+#nav ul { background: #069 url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right; }
+#nav ul div { background: transparent url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right; }
+#nav ul.odd { background: #08c url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right; }
+#nav ul.odd div { background: transparent url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right; }
+*/
+
+
+#nav ul div.wrapper { background: transparent url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right; }
+#nav ul div { background: #069 url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right; }
+#nav ul.odd div.wrapper { background: transparent url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right; }
+#nav ul div.odd { background: #08c url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right; }
+
diff --git a/rt/html/NoAuth/css/3.5-default/quickbar.css b/rt/html/NoAuth/css/3.5-default/quickbar.css
new file mode 100644
index 000000000..16f83f789
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/quickbar.css
@@ -0,0 +1,98 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+#quickbar #quick-personal {
+ display: inline;
+ color: #888;
+ padding: 0.5em 1em 0 0;
+ float: right;
+}
+
+#quickbar #quick-personal span {
+ font-weight: bold;
+}
+
+#quickbar #quick-personal :link,
+#quickbar #quick-personal :visited
+{
+ color: #888;
+ font-weight: bold;
+}
+
+#quickbar #quick-personal :link:hover,
+#quickbar #quick-personal :visited:hover
+{
+ color: black;
+}
+
+#quickbar #topactions {
+ float: right;
+ clear: right;
+
+ font-size: 0.9em;
+ padding: 1em;
+}
+
+#quickbar #topactions form {
+ display: inline;
+ margin-left: 1em;
+}
+
+#quickbar #topactions form .button {
+ padding: 0 2px 0 2px;
+ font-size: 1em;
+ margin: 0;
+}
+
+#quickbar #topactions form .field {
+ padding: 1px;
+ font-size: 0.9em;
+}
+
+#quickbar #topactions form input.field {
+ padding: 3px;
+}
diff --git a/rt/html/NoAuth/css/3.5-default/ticket.css b/rt/html/NoAuth/css/3.5-default/ticket.css
new file mode 100644
index 000000000..5e8eeb78a
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/ticket.css
@@ -0,0 +1,57 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+.ticket-info-cfs .label {
+ vertical-align: top;
+}
+
+.ticket-info-cfs ul {
+ margin: 0;
+ padding: 0;
+ margin-left: 0.5em;
+ list-style: none;
+}
diff --git a/rt/html/NoAuth/css/3.5-default/titlebox.css b/rt/html/NoAuth/css/3.5-default/titlebox.css
new file mode 100644
index 000000000..d4320c090
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/titlebox.css
@@ -0,0 +1,189 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+.titlebox {
+ margin-bottom: 1em;
+}
+
+.titlebox .titlebox-content {
+ margin-top: -1px;
+ margin: 0;
+ /*margin: 1em 2em 0.5em 2em;*/
+}
+
+.titlebox .titlebox-content .titlebox-content table {
+ margin: 1em 2em 0.5em 2em;
+}
+.titlebox th {
+ font-size: 0.8em;
+
+}
+
+.titlebox .titlebox-content table {
+
+}
+
+
+%# TRS: I wish there was a more elegant way to do this... I essentially need to
+%# select all elements X that do NOT have element Y as a descendant... which I can
+%# fake with the child selector of CSS2, but IE is stupid and does not support that.
+
+% for (qw(index
+% Search-Build
+% User-Prefs
+% Approvals
+% Admin-Users-Modify
+% SelfService
+% SelfService-Closed
+% ))
+% {
+#comp-<%$_%> .titlebox .titlebox-content,
+% }
+.titlebox .titlebox .titlebox-content
+{
+ background: #eee;
+ border-bottom: 1px solid #ccc;
+ border-right: 1px solid #ccc;
+ border-left: 0.5em solid #069;
+}
+
+#login-box .titlebox .titlebox-content
+{
+ background: none;
+ border: none;
+}
+
+.titlebox .titlebox-title {
+ position: relative;
+ font-weight: bold;
+ color: #930;
+ font-size: 1.2em;
+ padding: 0.2em 0 0.2em 4em;
+ border-bottom: 1px solid #069;
+}
+
+.titlebox .titlebox-title .right {
+ position: absolute;
+ top: 0.5em;
+ right: 1.5em;
+ font-size: 0.9em;
+ color: #888;
+}
+
+.titlebox .titlebox-title .right .selected { color: #930; }
+
+#body .titlebox .titlebox-title .right :link,
+#body .titlebox .titlebox-title .right :visited {
+ color: #888;
+}
+
+#body .titlebox .titlebox-title .right :link:hover,
+#body .titlebox .titlebox-title .right :visited:hover {
+ color: #930;
+}
+
+.titlebox .titlebox-title .widget a {
+ display: block;
+ padding-top: 1em;
+ width: 20px;
+
+ background: url(<%$RT::WebImagesURL%>/css/rollup-arrow.gif) no-repeat center center;
+
+ margin: 0;
+ text-indent: -9999px;
+
+ position: absolute;
+ top: 0.4em;
+ left: 0.75em;
+ float: left;
+
+%# Basically IE5 will see those crazy backslashes and prematurely end the rule.
+%# This allows values for IE 5's broken box model to be set before the hack and
+%# the real values to be set after. We also set voice-family back to whatever it
+%# would have been on the off chance it's actually used.
+ /* WIN IE5 hack */
+ height: 7px;
+ voice-family: "\"}\"";
+ voice-family: inherit;
+ height: 0;
+ overflow: hidden;
+}
+
+%# IE also doesn't support the child selector ">", so we can use it to set values
+%# that only other browsers will see (in this case, playing nice with Opera, which
+%# also suffers from the backslash hack above.)
+html>body .titlebox .titlebox-title .widget a {
+ height: 0;
+ overflow: hidden;
+}
+
+%# Compensates for IE's bad box model by hiding this rule from other browsers
+* html .titlebox .titlebox-title .widget a {
+ background-position: center 0.3em;
+ left: -3.5em;
+}
+
+.titlebox.rolled-up .titlebox-title .widget a {
+ background-image: url(<%$RT::WebImagesURL%>/css/rolldown-arrow.gif);
+}
+
+#body .titlebox .titlebox-title :link,
+#body .titlebox .titlebox-title :visited
+{
+ color: #930;
+ text-decoration: none;
+}
+
+#body .titlebox .titlebox-title :link:hover,
+#body .titlebox .titlebox-title :visited:hover
+{
+ text-decoration: underline;
+}
+
+.titlebox .titlebox-content hr.clear {
+ visibility: hidden;
+}
diff --git a/rt/html/NoAuth/css/3.5-default/transactions.css b/rt/html/NoAuth/css/3.5-default/transactions.css
new file mode 100755
index 000000000..dfc4cb9d3
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/transactions.css
@@ -0,0 +1,146 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+.ticket-transaction {
+ border-bottom: 1px solid #ddd;
+ border-right: 3px solid #069;
+}
+
+#ticket-history .ticket-transaction {
+ border-bottom-color: #ccc;
+}
+
+.ticket-transaction.even {
+ background: #eee;
+}
+
+.ticket-transaction .date {
+ font-size: 0.9em;
+ width: 10em;
+}
+
+.ticket-transaction .description {
+ font-weight: bold;
+ font-size: 0.9em;
+ text-align: left;
+}
+
+.ticket-transaction .actions {
+ text-align: right;
+ font-weight: bold;
+}
+
+.ticket-transaction .type {
+ background: #888;
+ width: 1.2em;
+ color: white;
+ text-align: center;
+ font-size: 1em;
+}
+
+#body .ticket-transaction .type :link,
+#body .ticket-transaction .type :visited
+{
+ color: white;
+ font-weight: normal;
+}
+
+.ticket-transaction.basics { border-color: #b32; }
+.ticket-transaction.basics .type { background: #b32; }
+.ticket-summary .ticket-info-basics .titlebox-content { border-left: 0.5em solid #b32; }
+
+.ticket-transaction.people { border-color: #48c; }
+.ticket-transaction.people .type { background: #48c; }
+.ticket-summary .ticket-info-people .titlebox-content { border-left: 0.5em solid #48c; }
+
+%# light green - #ad8
+.ticket-transaction.links { border-color: #316531; }
+.ticket-transaction.links .type { background: #316531; }
+.ticket-summary .ticket-info-links .titlebox-content { border-left: 0.5em solid #316531; }
+
+%# orange - #d71
+.ticket-transaction.dates { border-color: #633063; }
+.ticket-transaction.dates .type { background: #633063; }
+.ticket-summary .ticket-info-dates .titlebox-content { border-left: 0.5em solid #633063; }
+
+.ticket-transaction.message { border-color: #069; }
+.ticket-transaction.message .type { background: #069; }
+
+.ticket-transaction.other { border-color: #888; }
+
+.ticket-transaction td .message-header-value {
+ padding: 0;
+}
+
+.ticket-transaction td .message-header-key {
+ padding: 0 1em 0 1.5em;
+ font-weight: bold;
+}
+
+.ticket-transaction .downloadattachment {
+ float: right;
+ font-size: 0.9em;
+ text-align: right;
+}
+
+.ticket-transaction .messagebody {
+ clear: both;
+ padding-left: 3em;
+ padding-bottom: 1em;
+}
+
+%# Message stanza colors
+.message-stanza-depth-0 { color: #000; }
+.message-stanza-depth-1 { color: #600; }
+.message-stanza-depth-2 { color: #060; }
+.message-stanza-depth-3 { color: #006; }
+.message-stanza-depth-4 { color: #c00; }
+.message-stanza-depth-5 { color: #0c0; }
+.message-stanza-depth-6 { color: #00c; }
+.message-stanza-depth-7 { color: #f00; }
+.message-stanza-depth-8 { color: #0f0; }
+.message-stanza-depth-9 { color: #00f; }
diff --git a/rt/html/NoAuth/css/autohandler b/rt/html/NoAuth/css/autohandler
new file mode 100644
index 000000000..980e5f09d
--- /dev/null
+++ b/rt/html/NoAuth/css/autohandler
@@ -0,0 +1,53 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%init>
+RT::Interface::Web::StaticFileHeaders();
+$r->content_type('text/css');
+$m->call_next();
+return();
+</%init>
diff --git a/rt/html/NoAuth/css/print.css b/rt/html/NoAuth/css/print.css
new file mode 100644
index 000000000..40d23d0d6
--- /dev/null
+++ b/rt/html/NoAuth/css/print.css
@@ -0,0 +1,85 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+* {
+ float: none;
+ position: static;
+}
+
+body {
+ margin: 1em;
+ font-size: 10pt;
+}
+
+#body {
+ margin: 0;
+}
+
+#header h1 {
+ margin-bottom: 2em;
+}
+
+#header {
+ padding: 0 !important;
+}
+
+#quickbar,
+#nav,
+#header #page-menu,
+#header #actions-menu,
+.titlebox .title .widget,
+#footer
+{
+display: none;
+}
+
+a:link, a:visited {
+ background: transparent;
+ font-weight: bold !important;
+ text-decoration: underline !important;
+}
+
diff --git a/rt/html/NoAuth/images/autohandler b/rt/html/NoAuth/images/autohandler
index 2e428c157..720979830 100644
--- a/rt/html/NoAuth/images/autohandler
+++ b/rt/html/NoAuth/images/autohandler
@@ -1,24 +1,28 @@
-<%init>
+<%INIT>
+&RT::Interface::Web::StaticFileHeaders();
# This autohandler will spit out RT's images if the user hasn't
# properly configured their webserver to stop RT from passing
# images through the mason handler.
-
my $file = $m->base_comp->source_file;
-my $type = "application/octet-stream";
+
+my $type = "application/octet-stream";
if ($file =~ /\.(gif|png|jpe?g)$/i) {
$type = "image/$1";
$type =~ s/jpg/jpeg/gi;
}
-die unless (-f $file && -r $file);
+die "file not found" unless -f $file && -r _;
+
$r->content_type($type);
-open (FILE, "<$file") || die;
+open my $fh, "<$file" or die "couldn't open file: $!";
+binmode($fh);
{
local $/ = \16384;
- $m->out($_) while (<FILE>);
- close(FILE);
+ $m->out($_) while (<$fh>);
+ $m->flush_buffer;
}
+close $fh;
$m->abort;
-</%init>
+</%INIT>
diff --git a/rt/html/NoAuth/images/bplogo.gif b/rt/html/NoAuth/images/bplogo.gif
index e2cf49c42..1bb0adfb4 100644
--- a/rt/html/NoAuth/images/bplogo.gif
+++ b/rt/html/NoAuth/images/bplogo.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cb-light.gif b/rt/html/NoAuth/images/css/cb-light.gif
new file mode 100644
index 000000000..d5e3059b0
--- /dev/null
+++ b/rt/html/NoAuth/images/css/cb-light.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cb.gif b/rt/html/NoAuth/images/css/cb.gif
new file mode 100644
index 000000000..53bb2aec2
--- /dev/null
+++ b/rt/html/NoAuth/images/css/cb.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cbr-b2g.gif b/rt/html/NoAuth/images/css/cbr-b2g.gif
new file mode 100644
index 000000000..6bca03d10
--- /dev/null
+++ b/rt/html/NoAuth/images/css/cbr-b2g.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cbr-b2lb.gif b/rt/html/NoAuth/images/css/cbr-b2lb.gif
new file mode 100644
index 000000000..d207f846b
--- /dev/null
+++ b/rt/html/NoAuth/images/css/cbr-b2lb.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cbr-gray.gif b/rt/html/NoAuth/images/css/cbr-gray.gif
new file mode 100644
index 000000000..d7327103a
--- /dev/null
+++ b/rt/html/NoAuth/images/css/cbr-gray.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cbr-trans.gif b/rt/html/NoAuth/images/css/cbr-trans.gif
new file mode 100644
index 000000000..dc272ee5d
--- /dev/null
+++ b/rt/html/NoAuth/images/css/cbr-trans.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cbr.gif b/rt/html/NoAuth/images/css/cbr.gif
new file mode 100644
index 000000000..754cee19b
--- /dev/null
+++ b/rt/html/NoAuth/images/css/cbr.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ct-light.gif b/rt/html/NoAuth/images/css/ct-light.gif
new file mode 100644
index 000000000..55125b0fa
--- /dev/null
+++ b/rt/html/NoAuth/images/css/ct-light.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ct.gif b/rt/html/NoAuth/images/css/ct.gif
new file mode 100644
index 000000000..d16a5c57f
--- /dev/null
+++ b/rt/html/NoAuth/images/css/ct.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ctr-b2g.gif b/rt/html/NoAuth/images/css/ctr-b2g.gif
new file mode 100644
index 000000000..540e6d0ef
--- /dev/null
+++ b/rt/html/NoAuth/images/css/ctr-b2g.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ctr-b2lb.gif b/rt/html/NoAuth/images/css/ctr-b2lb.gif
new file mode 100644
index 000000000..c98b18c9d
--- /dev/null
+++ b/rt/html/NoAuth/images/css/ctr-b2lb.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ctr-gray.gif b/rt/html/NoAuth/images/css/ctr-gray.gif
new file mode 100644
index 000000000..8d5e5dd32
--- /dev/null
+++ b/rt/html/NoAuth/images/css/ctr-gray.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ctr-trans.gif b/rt/html/NoAuth/images/css/ctr-trans.gif
new file mode 100644
index 000000000..bb316cf04
--- /dev/null
+++ b/rt/html/NoAuth/images/css/ctr-trans.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ctr.gif b/rt/html/NoAuth/images/css/ctr.gif
new file mode 100644
index 000000000..9754e1567
--- /dev/null
+++ b/rt/html/NoAuth/images/css/ctr.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/dark-arrow-up.png b/rt/html/NoAuth/images/css/dark-arrow-up.png
new file mode 100644
index 000000000..443096aa5
--- /dev/null
+++ b/rt/html/NoAuth/images/css/dark-arrow-up.png
Binary files differ
diff --git a/rt/html/NoAuth/images/css/dark-arrow.png b/rt/html/NoAuth/images/css/dark-arrow.png
new file mode 100644
index 000000000..a83500aad
--- /dev/null
+++ b/rt/html/NoAuth/images/css/dark-arrow.png
Binary files differ
diff --git a/rt/html/NoAuth/images/css/light-arrow-up.png b/rt/html/NoAuth/images/css/light-arrow-up.png
new file mode 100644
index 000000000..c209d4335
--- /dev/null
+++ b/rt/html/NoAuth/images/css/light-arrow-up.png
Binary files differ
diff --git a/rt/html/NoAuth/images/css/light-arrow.png b/rt/html/NoAuth/images/css/light-arrow.png
new file mode 100644
index 000000000..575d4e5ec
--- /dev/null
+++ b/rt/html/NoAuth/images/css/light-arrow.png
Binary files differ
diff --git a/rt/html/NoAuth/images/css/rolldown-arrow.gif b/rt/html/NoAuth/images/css/rolldown-arrow.gif
new file mode 100644
index 000000000..3c296dcae
--- /dev/null
+++ b/rt/html/NoAuth/images/css/rolldown-arrow.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/rolldown-arrow.png b/rt/html/NoAuth/images/css/rolldown-arrow.png
new file mode 100644
index 000000000..33d8ab1e2
--- /dev/null
+++ b/rt/html/NoAuth/images/css/rolldown-arrow.png
Binary files differ
diff --git a/rt/html/NoAuth/images/css/rollup-arrow.gif b/rt/html/NoAuth/images/css/rollup-arrow.gif
new file mode 100644
index 000000000..f009ff4c6
--- /dev/null
+++ b/rt/html/NoAuth/images/css/rollup-arrow.gif
Binary files differ
diff --git a/rt/html/NoAuth/js/ahah.js b/rt/html/NoAuth/js/ahah.js
new file mode 100644
index 000000000..03ed12a97
--- /dev/null
+++ b/rt/html/NoAuth/js/ahah.js
@@ -0,0 +1,80 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+/*
+% $r->content_type('application/x-javascript');
+*/
+// Fetched from http://www.opendarwin.org/~drernie/src/ahah.js
+function ahah(url, target, delay) {
+ // document.getElementById(target).innerHTML = 'Loading <a href="'+url+'">'+url +'</a>...';
+ if (window.XMLHttpRequest) {
+ req = new XMLHttpRequest();
+ } else if (window.ActiveXObject) {
+ req = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ if (req != undefined) {
+ req.onreadystatechange = function() {ahahDone(url, target, delay);};
+ req.open("GET", url, true);
+ req.send("");
+ }
+}
+
+function ahahDone(url, target, delay) {
+ if (req.readyState == 4) { // only if req is "loaded"
+ if (req.status == 200) { // only if "OK"
+ document.getElementById(target).innerHTML = req.responseText;
+ } else {
+ document.getElementById(target).innerHTML="Error loading '"+url+"':\n"+req.statusText;
+ }
+ if (delay != undefined) {
+ setTimeout("ahah(url,target,delay)", delay); // resubmit after delay
+ //server should ALSO delay before responding
+ }
+ }
+}
+
+% $m->abort();
diff --git a/rt/html/NoAuth/js/autohandler b/rt/html/NoAuth/js/autohandler
new file mode 100644
index 000000000..fd1b90075
--- /dev/null
+++ b/rt/html/NoAuth/js/autohandler
@@ -0,0 +1,53 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%init>
+&RT::Interface::Web::StaticFileHeaders();
+$r->content_type('application/x-javascript');
+$m->call_next();
+return();
+</%init>
diff --git a/rt/html/NoAuth/js/cascaded.js b/rt/html/NoAuth/js/cascaded.js
new file mode 100644
index 000000000..79da4167f
--- /dev/null
+++ b/rt/html/NoAuth/js/cascaded.js
@@ -0,0 +1,66 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+function filter_cascade (id, val) {
+ var select = document.getElementById(id);
+ if (!select) { return };
+ var i;
+ var children = select.childNodes;
+ for (i in children) {
+ var style = children[i].style;
+ if (!style) { continue };
+ if (val == '') {
+ style.display = 'block';
+ continue;
+ }
+ if (children[i].label.substr(0, val.length) == val) {
+ style.display = 'block';
+ continue;
+ }
+ style.display = 'none';
+ }
+}
diff --git a/rt/html/NoAuth/js/class.js b/rt/html/NoAuth/js/class.js
new file mode 100644
index 000000000..9e4c70ea5
--- /dev/null
+++ b/rt/html/NoAuth/js/class.js
@@ -0,0 +1,62 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+/* by TKirby, released under GPL */
+
+ function _ClassSetup(Object) {
+ this.prototype = Object;
+ return this;
+ }
+
+ function Class(name) {
+ var _newclass_;
+ eval("window."+name+" = new Function('this."+name+".apply(this,arguments);');");
+ eval("window."+name+".define = _ClassSetup;");
+ eval("_newclass_ = window."+name+";");
+ return _newclass_;
+ }
+
diff --git a/rt/html/NoAuth/js/combobox.js b/rt/html/NoAuth/js/combobox.js
new file mode 100644
index 000000000..9225870b6
--- /dev/null
+++ b/rt/html/NoAuth/js/combobox.js
@@ -0,0 +1,265 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+function ComboBox_InitWith(n) {
+ if ( typeof( window.addEventListener ) != "undefined" ) {
+ window.addEventListener("load", ComboBox_Init(n), false);
+ } else if ( typeof( window.attachEvent ) != "undefined" ) {
+ window.attachEvent("onload", ComboBox_Init(n));
+ } else {
+ ComboBox_Init(n)();
+ }
+}
+function ComboBox_Init(n) {
+ return function () {
+ if ( ComboBox_UplevelBrowser( n ) ) {
+ ComboBox_Load( n );
+ }
+ }
+}
+function ComboBox_UplevelBrowser( n ) {
+ if( typeof( document.getElementById ) == "undefined" ) return false;
+ var combo = document.getElementById( n + "_Container" );
+ if( combo == null || typeof( combo ) == "undefined" ) return false;
+ if( typeof( combo.style ) == "undefined" ) return false;
+ if( typeof( combo.innerHTML ) == "undefined" ) return false;
+ return true;
+}
+function ComboBox_Load( comboId ) {
+ var combo = document.getElementById( comboId + "_Container" );
+ var button = document.getElementById( comboId + "_Button" );
+ var list = document.getElementById( comboId + "_List" );
+ var text = document.getElementById( comboId );
+
+
+ combo.List = list;
+ combo.Button = button;
+ combo.Text = text;
+
+ button.Container = combo;
+ button.Toggle = ComboBox_ToggleList;
+ button.onclick = button.Toggle;
+ button.onmouseover = function(e) { this.Container.List.DisableBlur(e); };
+ button.onmouseout = function(e) { this.Container.List.EnableBlur(e); };
+ button.innerHTML = "\u25BC";
+ button.onselectstart = function(e){ return false; };
+ button.style.height = ( list.offsetHeight - 4 ) + "px";
+
+ text.Container = combo;
+ text.TypeDown = ComboBox_TextTypeDown;
+ text.KeyAccess = ComboBox_TextKeyAccess;
+ text.onkeyup = function(e) { this.KeyAccess(e); this.TypeDown(e); };
+ text.style.width = ( list.offsetWidth ) + "px";
+
+ list.Container = combo;
+ list.Show = ComboBox_ShowList;
+ list.Hide = ComboBox_HideList;
+ list.EnableBlur = ComboBox_ListEnableBlur;
+ list.DisableBlur = ComboBox_ListDisableBlur;
+ list.Select = ComboBox_ListItemSelect;
+ list.ClearSelection = ComboBox_ListClearSelection;
+ list.KeyAccess = ComboBox_ListKeyAccess;
+ list.FireTextChange = ComboBox_ListFireTextChange;
+ list.onchange = null;
+ list.onclick = function(e){ this.Select(e); this.ClearSelection(); this.FireTextChange(); };
+ list.onkeyup = function(e) { this.KeyAccess(e); };
+ list.EnableBlur(null);
+ list.style.position = "absolute";
+ list.size = ComboBox_GetListSize( list );
+ list.IsShowing = true;
+ list.Hide();
+
+}
+function ComboBox_InitEvent( e ) {
+ if( typeof( e ) == "undefined" && typeof( window.event ) != "undefined" ) e = window.event;
+ if( e == null ) e = new Object();
+ return e;
+}
+function ComboBox_ListClearSelection() {
+ if ( typeof( this.Container.Text.createTextRange ) == "undefined" ) return;
+ var rNew = this.Container.Text.createTextRange();
+ rNew.moveStart('character', this.Container.Text.value.length) ;
+ rNew.select();
+}
+function ComboBox_GetListSize( theList ) {
+ ComboBox_EnsureListSize( theList );
+ return theList.listSize;
+}
+function ComboBox_EnsureListSize( theList ) {
+ if ( typeof( theList.listSize ) == "undefined" ) {
+ if( typeof( theList.getAttribute ) != "undefined" ) {
+ if( theList.getAttribute( "listSize" ) != null && theList.getAttribute( "listSize" ) != "" ) {
+ theList.listSize = theList.getAttribute( "listSize" );
+ return;
+ }
+ }
+ if( theList.options.length > 0 ) {
+ theList.listSize = theList.options.length;
+ return;
+ }
+ theList.listSize = 4;
+ }
+}
+function ComboBox_ListKeyAccess(e) { //Make enter/space and escape do the right thing :)
+ e = ComboBox_InitEvent( e );
+ if( e.keyCode == 13 || e.keyCode == 32 ) {
+ this.Select();
+ return;
+ }
+ if( e.keyCode == 27 ) {
+ this.Hide();
+ this.Container.Text.focus();
+ return;
+ }
+}
+function ComboBox_TextKeyAccess(e) { //Make alt+arrow expand the list
+ e = ComboBox_InitEvent( e );
+ if( e.altKey && (e.keyCode == 38 || e.keyCode == 40) ) {
+ this.Container.List.Show();
+ }
+}
+function ComboBox_TextTypeDown(e) { //Make the textbox do a type-down on the list
+ e = ComboBox_InitEvent( e );
+ var items = this.Container.List.options;
+ if( this.value == "" ) return;
+ var ctrlKeys = Array( 8, 46, 37, 38, 39, 40, 33, 34, 35, 36, 45, 16, 20 );
+ for( var i = 0; i < ctrlKeys.length; i++ ) {
+ if( e.keyCode == ctrlKeys[i] ) return;
+ }
+ for( var i = 0; i < items.length; i++ ) {
+ var item = items[i];
+ if( item.text.toLowerCase().indexOf( this.value.toLowerCase() ) == 0 ) {
+ this.Container.List.selectedIndex = i;
+ if ( typeof( this.Container.Text.createTextRange ) != "undefined" ) {
+ this.Container.List.Select();
+ }
+ break;
+ }
+ }
+}
+function ComboBox_ListFireTextChange() {
+ var textOnChange = this.Container.Text.onchange;
+ if ( textOnChange != null && typeof(textOnChange) == "function" ) {
+ textOnChange();
+ }
+}
+function ComboBox_ListEnableBlur(e) {
+ this.onblur = this.Hide;
+}
+function ComboBox_ListDisableBlur(e) {
+ this.onblur = null;
+}
+function ComboBox_ListItemSelect(e) {
+ if( this.options.length > 0 ) {
+ var text = this.Container.Text;
+ var oldValue = text.value;
+ var newValue = this.options[ this.selectedIndex ].text;
+ text.value = newValue;
+ if ( typeof( text.createTextRange ) != "undefined" ) {
+ if (newValue != oldValue) {
+ var rNew = text.createTextRange();
+ rNew.moveStart('character', oldValue.length) ;
+ rNew.select();
+ }
+ }
+ }
+ this.Hide();
+ this.Container.Text.focus();
+}
+function ComboBox_ToggleList(e) {
+ if( this.Container.List.IsShowing == true ) {
+ this.Container.List.Hide();
+ } else {
+ this.Container.List.Show();
+ }
+}
+function ComboBox_ShowList(e) {
+ if ( !this.IsShowing && !this.disabled ) {
+ this.style.width = ( this.Container.offsetWidth ) + "px";
+ this.style.top = ( this.Container.offsetHeight + ComboBox_RecursiveOffsetTop(this.Container,true) ) + "px";
+ this.style.left = ( ComboBox_RecursiveOffsetLeft(this.Container,true) + 1 ) + "px";
+ ComboBox_SetVisibility(this,true);
+ this.focus();
+ this.IsShowing = true;
+ }
+}
+function ComboBox_HideList(e) {
+ if( this.IsShowing ) {
+ ComboBox_SetVisibility(this,false);
+ this.IsShowing = false;
+ }
+}
+function ComboBox_SetVisibility(theList, isVisible) {
+ setVisibility(theList, isVisible);
+}
+function ComboBox_RecursiveOffsetTop(thisObject,isFirst) {
+ if(thisObject.offsetParent) {
+ if ( thisObject.style.position == "absolute" && !isFirst && typeof(document.designMode) != "undefined" ) {
+ return 0;
+ }
+ return (thisObject.offsetTop + ComboBox_RecursiveOffsetTop(thisObject.offsetParent,false));
+ } else {
+ return thisObject.offsetTop;
+ }
+}
+function ComboBox_RecursiveOffsetLeft(thisObject,isFirst) {
+ if(thisObject.offsetParent) {
+ if ( thisObject.style.position == "absolute" && !isFirst && typeof(document.designMode) != "undefined" ) {
+ return 0;
+ }
+ return (thisObject.offsetLeft + ComboBox_RecursiveOffsetLeft(thisObject.offsetParent,false));
+ } else {
+ return thisObject.offsetLeft;
+ }
+}
+function ComboBox_SimpleAttach(selectElement,textElement) {
+ textElement.value = selectElement.options[ selectElement.options.selectedIndex ].text;
+ var textOnChange = textElement.onchange;
+ if ( textOnChange != null && typeof( textOnChange ) == "function" ) {
+ textOnChange();
+ }
+}
diff --git a/rt/html/NoAuth/js/list.js b/rt/html/NoAuth/js/list.js
new file mode 100644
index 000000000..9753b9771
--- /dev/null
+++ b/rt/html/NoAuth/js/list.js
@@ -0,0 +1,159 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+/* by TKirby, released under GPL */
+/* Define the "list" Class */
+Class("list").define({
+ name : null,
+ xml : null,
+ sels : null,
+ list : function (src, esrc, name) { this.init(src, esrc, name); },
+ read : function () {
+ var i = 0;
+ if(this.xml.readyState!=4) { setTimeout(this.name+".read()", 100); }
+ else if(this.xml.status!=200) alert("Document not available.");
+ else {
+ var doc = this.xml.responseXML;
+ var nNode = null;
+ if(doc.childNodes[0].nodeName=="parseerror") alert("Parse Error.");
+ doc = doc.getElementsByTagName("list")[0];
+ for(i=0;i<doc.childNodes.length;i++) {
+ if(doc.childNodes[i].childNodes.length>0) {
+ nNode = document.createElement("option");
+ nNode.appendChild(document.createTextNode(doc.childNodes[i].childNodes[0].nodeValue));
+ this.sels[0].appendChild(nNode);
+ }
+ }
+ }
+ },
+
+ init : function (src,esrc,name) {
+ if(!src) return;
+ this.name = name;
+ this.sels = new Array();
+ var i = 0;
+ for(i=0;i<src.childNodes.length;i++) {
+ if(src.childNodes[i].nodeName=="select" || src.childNodes[i].nodeName=="SELECT") {
+ this.sels.push(src.childNodes[i]);
+ }
+
+ if((src.childNodes[i].nodeName=="input" || src.childNodes[i].nodeName=="INPUT")
+ && (src.childNodes[i].name=="fromjs")) {
+ src.childNodes[i].value = 1;
+ }
+
+ if((src.childNodes[i].nodeName=="input" || src.childNodes[i].nodeName=="INPUT")
+ && (src.childNodes[i].type=="submit" || src.childNodes[i].type=="SUBMIT")) {
+
+ if (src.childNodes[i].name.indexOf("Save") < 0) {
+ var tmp = document.createElement("input");
+ tmp.type = "button";
+ tmp.name = src.childNodes[i].name;
+ tmp.value = src.childNodes[i].value;
+ src.replaceChild(tmp,src.childNodes[i]);
+ }
+
+ if(src.childNodes[i].name=="add")
+ src.childNodes[i].onclick = new Function(this.name+".add();");
+ if(src.childNodes[i].name=="remove")
+ src.childNodes[i].onclick = new Function(this.name+".remove();");
+ if(src.childNodes[i].name=="moveup")
+ src.childNodes[i].onclick = new Function(this.name+".moveup();");
+ if(src.childNodes[i].name=="movedown")
+ src.childNodes[i].onclick = new Function(this.name+".movedown();");
+ }
+ }
+ if (esrc) {
+ this.xml = (window.navigator.appName!="Microsoft Internet Explorer"
+ ?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP"));
+ this.xml.open("GET", esrc);
+ this.xml.send("");
+ setTimeout(this.name+".read()", 100);
+ }
+ },
+
+ add : function() {
+ var i, j = 0;
+ var dNode = null;
+ for(i=0;i<this.sels[0].length;i++) if(this.sels[0][i].selected) {
+ for(j=0;j<this.sels[1].length;j++) if(this.sels[1][j].value==this.sels[0][i].value) break;
+ if(j==this.sels[1].length) dNode = this.sels[0][i].cloneNode(true),
+ this.sels[1].appendChild(dNode);
+ }
+ },
+
+ moveup : function() { this.move(-1); },
+ movedown : function() { this.move(1); },
+ move : function(v) {
+ var i = 0;
+ if(v<0) for(i=0;i<this.sels[1].length;i++) this.moveOne(v, i);
+ else if(v>0) for(i=this.sels[1].length-1;i>=0;i--)this.moveOne(v, i);
+ },
+
+ moveOne : function(v, i) {
+ var ins = v + i;
+ if(ins<0 || ins>=this.sels[1].length) return;
+ if(this.sels[1][ins].selected) return;
+ if(this.sels[1][i].selected) {
+ Node = this.sels[1][i];
+ this.sels[1].removeChild(Node);
+ this.sels[1].insertBefore(Node, this.sels[1][ins]);
+ }
+ },
+
+ remove : function() {
+ var i = 0;
+ for(i=this.sels[1].length-1;i>=0;i--) if(this.sels[1][i].selected)
+ this.sels[1].removeChild(this.sels[1][i]);
+ },
+
+ selectAll: function() {
+ var i = 0;
+ for(i=0;i<this.sels[0].length;i++) this.sels[0][i].selected = false;
+ for(i=0;i<this.sels[1].length;i++) this.sels[1][i].selected = true;
+ }
+});
diff --git a/rt/html/NoAuth/js/titlebox-state.js b/rt/html/NoAuth/js/titlebox-state.js
new file mode 100644
index 000000000..8950f9e62
--- /dev/null
+++ b/rt/html/NoAuth/js/titlebox-state.js
@@ -0,0 +1,83 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+function createCookie(name,value,days) {
+ var path = "<%$RT::WebPath%>" ? "<%$RT::WebPath%>" : "/";
+
+ if (days) {
+ var date = new Date();
+ date.setTime(date.getTime()+(days*24*60*60*1000));
+ var expires = "; expires="+date.toGMTString();
+ }
+ else
+ expires = "";
+
+ document.cookie = name+"="+value+expires+"; path="+path;
+}
+
+function loadTitleBoxStates() {
+ var cookies = document.cookie.split(/;\s*/);
+ var len = cookies.length;
+
+ for (var i = 0; i < len; i++) {
+ var c = cookies[i].split('=');
+
+ if (c[0].match(/^TitleBox--/)) {
+ var e = document.getElementById(c[0]);
+ if (e) {
+ var e2 = e.parentNode;
+
+ if (c[1] != 0) {
+ set_rollup_state(e,e2,'shown');
+ }
+ else {
+ set_rollup_state(e,e2,'hidden');
+ }
+ }
+ }
+ }
+}
diff --git a/rt/html/NoAuth/js/util.js b/rt/html/NoAuth/js/util.js
new file mode 100644
index 000000000..0de071ad3
--- /dev/null
+++ b/rt/html/NoAuth/js/util.js
@@ -0,0 +1,250 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+/* $(...)
+ Returns DOM node or array of nodes (if more then one argument passed).
+ If argument is node object allready then do nothing.
+ // Stolen from Prototype
+*/
+function $() {
+ var elements = new Array();
+
+ for (var i = 0; i < arguments.length; i++) {
+ var element = arguments[i];
+ if (typeof element == 'string')
+ element = document.getElementById(element);
+
+ if (arguments.length == 1)
+ return element;
+
+ elements.push(element);
+ }
+
+ return elements;
+}
+
+/* Visibility */
+
+function show(id) { delClass( id, 'hidden' ) }
+function hide(id) { addClass( id, 'hidden' ) }
+
+function hideshow(id) { return toggleVisibility( id ) }
+function toggleVisibility(id) {
+ var e = $(id);
+
+ if ( e.className.match( /\bhidden\b/ ) )
+ show(e);
+ else
+ hide(e);
+
+ return false;
+}
+
+function setVisibility(id, visibility) {
+ if ( visibility ) show(id);
+ else hide(id);
+}
+
+function switchVisibility(id1, id2) {
+ // Show both and then hide the one we want
+ show(id1);
+ show(id2);
+ hide(id2);
+ return false;
+}
+
+/* Classes */
+
+function addClass(id, value) {
+ var e = $(id);
+ if ( e.className.match( new RegExp('\b'+ value +'\b') ) )
+ return;
+ e.className += e.className? ' '+value : value;
+}
+
+function delClass(id, value) {
+ var e = $(id);
+ e.className = e.className.replace( new RegExp('\\s?\\b'+ value +'\\b', 'g'), '' );
+}
+
+/* Rollups */
+
+function rollup(id) {
+ var e = $(id);
+ var e2 = e.parentNode;
+
+ if (e.className.match(/\bhidden\b/)) {
+ set_rollup_state(e,e2,'shown');
+ createCookie(id,1,365);
+ }
+ else {
+ set_rollup_state(e,e2,'hidden');
+ createCookie(id,0,365);
+ }
+ return false;
+}
+
+function set_rollup_state(e,e2,state) {
+ if (e && e2) {
+ if (state == 'shown') {
+ show(e);
+ delClass( e2, 'rolled-up' );
+ }
+ else if (state == 'hidden') {
+ hide(e);
+ addClass( e2, 'rolled-up' );
+ }
+ }
+}
+
+
+/* onload handlers */
+
+var onLoadStack = new Array();
+var onLoadLastStack = new Array();
+var onLoadExecuted = 0;
+
+function onLoadHook(commandStr) {
+ if(typeof(commandStr) == "string") {
+ onLoadStack[ onLoadStack.length ] = commandStr;
+ return true;
+ }
+ return false;
+}
+
+// some things *really* need to be done after everything else
+function onLoadLastHook(commandStr) {
+ if(typeof(commandStr) == "string"){
+ onLoadLastStack[onLoadLastStack.length] = commandStr;
+ return true;
+ }
+ return false;
+}
+
+function doOnLoadHooks() {
+ if(onLoadExecuted) return;
+
+ var i;
+ for ( i in onLoadStack ) {
+ eval( onLoadStack[i] );
+ }
+ for ( i in onLoadLastStack ) {
+ eval( onLoadLastStack[i] );
+ }
+ onLoadExecuted = 1;
+}
+
+window.onload = doOnLoadHooks;
+
+/* calendar functions */
+
+function openCalWindow(field) {
+ var objWindow = window.open('<%$RT::WebPath%>/Helpers/CalPopup.html?field='+field,
+ 'RT_Calendar',
+ 'height=235,width=285,scrollbars=1');
+ objWindow.focus();
+}
+
+function createCalendarLink(input) {
+ var e = $(input);
+ if (e) {
+ var link = document.createElement('a');
+ link.setAttribute('href', '#');
+
+ clickevent = function clickevent(e) { openCalWindow(input); return false; };
+ if (! addEvent(link, "click", clickevent)) {
+ return false;
+ }
+
+ var text = document.createTextNode('<% loc("Choose a date") %>');
+ link.appendChild(text);
+
+ var space = document.createTextNode(' ');
+
+ e.parentNode.insertBefore(link, e.nextSibling);
+ e.parentNode.insertBefore(space, e.nextSibling);
+
+ return true;
+ }
+ return false;
+}
+
+/* other utils */
+
+function focusElementById(id) {
+ var e = $(id);
+ if (e) e.focus();
+}
+
+function updateParentField(field, value) {
+ if (window.opener) {
+ window.opener.$(field).value = value;
+ window.close();
+ }
+}
+
+function addEvent(obj, sType, fn) {
+ if (obj.addEventListener) {
+ obj.addEventListener(sType, fn, false);
+ } else if (obj.attachEvent) {
+ var r = obj.attachEvent("on"+sType, fn);
+ } else {
+ return false;
+ }
+ return true;
+}
+
+function setCheckbox(form, name, val) {
+ var myfield = form.getElementsByTagName('input');
+ for ( var i = 0; i < myfield.length; i++ ) {
+ if ( name && myfield[i].name != name ) continue;
+ if ( myfield[i].type != 'checkbox' ) continue;
+
+ myfield[i].checked = val;
+ }
+}
+
diff --git a/rt/html/Prefs/Elements/Tabs b/rt/html/Prefs/Elements/Tabs
new file mode 100644
index 000000000..e706d9a73
--- /dev/null
+++ b/rt/html/Prefs/Elements/Tabs
@@ -0,0 +1,72 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /User/Elements/Tabs,
+ subtabs => $tabs,
+ current_tab => 'Prefs/MyRT.html',
+ current_subtab => $current_subtab,
+ Title => $Title &>
+
+<%INIT>
+my $tabs;
+unless ($Searches) {
+ $Searches = [$m->comp("/Search/Elements/SearchesForObject", Object => RT::System->new($session{'CurrentUser'}))];
+}
+
+$tabs->{a} = { title => loc('Quick search'),
+ path => 'Prefs/Quicksearch.html' };
+for my $search (@$Searches) {
+ $tabs->{$search->[0]} = { title => $search->[0],
+ path => "Prefs/Search.html?".$m->comp('/Elements/QueryString', name => ref($search->[1]).'-'.$search->[1]->Id) };
+}
+</%INIT>
+<%ARGS>
+$GroupObj => undef
+$current_subtab => undef
+$Title => undef
+$Searches => undef
+</%ARGS>
diff --git a/rt/html/Prefs/MyRT.html b/rt/html/Prefs/MyRT.html
new file mode 100644
index 000000000..ba35fd214
--- /dev/null
+++ b/rt/html/Prefs/MyRT.html
@@ -0,0 +1,151 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => $title &>
+<& /Prefs/Elements/Tabs,
+ current_tab => 'Prefs/MyRT.html',
+ Title => $title,
+ Searches => \@sys_searches
+&>
+
+<& /Widgets/SelectionBox:header, nojs => 1 &>
+
+<& /Elements/ListActions, actions => \@actions &>
+<br />
+
+<form method="post" action="MyRT.html">
+<input type="hidden" name="Reset" value="1" />
+<input type="submit" class="button" value="<%loc('Reset to default')%>">
+</form>
+
+<br />
+
+% for my $pane (@panes) {
+<&|/Widgets/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &>
+<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &></&>
+<br />
+% }
+<&|/Widgets/TitleBox, title => loc('Options'), bodyclass => "" &>
+<form method="post" action="MyRT.html">
+ <&|/l&>Rows per box</&>:<input name="SummaryRows" value="<% $ARGS{SummaryRows} %>" /> <input type="submit" class="button" value="<%loc('Save')%>" />
+</form>
+</&>
+<%INIT>
+my @actions;
+
+my $title = loc("Customize").' '.loc("RT at a glance");
+my $user = $session{'CurrentUser'}->UserObj;
+
+if ($ARGS{Reset}) {
+ $user->SetPreferences('HomepageSettings', {});
+ delete $session{'my_rt_portlets'};
+}
+
+unless (exists $session{'my_rt_portlets'}) {
+ my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
+ my $portlets = $default_portlets ? $default_portlets->Content : {};
+ $session{'my_rt_portlets'} = $user->Preferences('HomepageSettings', $portlets);
+}
+if ($ARGS{SummaryRows}) {
+ $user->SetPreferences('SummaryRows', $ARGS{SummaryRows});
+ push @actions, loc ('Preferences saved for [_1].', loc('summary rows'));
+}
+else {
+ $ARGS{SummaryRows} = $user->Preferences('SummaryRows', $RT::DefaultSummaryRows);
+}
+
+
+my $portlets = $session{'my_rt_portlets'};
+
+my %allowed_components = map {$_ => 1} @{$RT::HomepageComponents};
+my @items;
+
+push @items, map {["component-$_", $_]} sort keys %allowed_components;
+
+my $sys = RT::System->new($session{'CurrentUser'});
+my @objs = ($sys);
+
+push @objs, RT::SavedSearches->new( $session{CurrentUser} )->_PrivacyObjects
+ if $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch',
+ Object => $RT::System );
+
+my @sys_searches;
+for my $object (@objs) {
+ for ($m->comp("/Search/Elements/SearchesForObject", Object => $object)) {
+ my ($desc, $search) = @$_;
+ my $SearchType = $search->Content->{'SearchType'} || 'Ticket';
+ if ($object eq $sys && $SearchType eq 'Ticket') {
+ push @items, ["system-$desc", $desc];
+ push @sys_searches, [$desc, $search];
+ }
+ else {
+ my $oid = ref($object).'-'.$object->Id.'-SavedSearch-'.$search->Id;
+ my $type = ($SearchType eq 'Ticket')
+ ? 'Saved Search' : $SearchType; # loc
+ push @items, ["saved-$oid", loc($type).": $desc"];
+ }
+ }
+}
+
+my @panes = $m->comp(
+ '/Admin/Elements/ConfigureMyRT',
+ panes => ['body', 'summary'],
+ Action => 'MyRT.html',
+ items => \@items,
+ current_portlets => $portlets,
+ OnSave => sub {
+ my ( $conf, $pane ) = @_;
+ $user->SetPreferences( 'HomepageSettings', $conf );
+ push @actions, loc( 'Preferences saved for [_1].', $pane );
+ delete $session{'my_rt_portlets'};
+ }
+);
+
+$m->comp( '/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1 )
+ for @panes;
+
+</%INIT>
diff --git a/rt/html/Prefs/Quicksearch.html b/rt/html/Prefs/Quicksearch.html
new file mode 100644
index 000000000..f4becc74a
--- /dev/null
+++ b/rt/html/Prefs/Quicksearch.html
@@ -0,0 +1,96 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => $title &>
+<& /Prefs/Elements/Tabs,
+ current_tab => 'Prefs/MyRT.html',
+ current_subtab => 'Prefs/Quicksearch.html',
+ Title => $title
+&>
+<& /Elements/ListActions, actions => \@actions &>
+<h1><&|/l&>Select queues to be displayed on the "RT at a glance" page</&></h1>
+<form method="post" action="Quicksearch.html" name="Preferences">
+<ul>
+% for my $queue (@queues) {
+<li><input type="checkbox" class="checkbox" name="Want-<%$queue->Name%>" value="1"
+% unless ($unwanted->{$queue->Name}) {
+checked
+% }
+/><%$queue->Name%>: <%$queue->Description%></li>
+% }
+</ul>
+<& /Elements/Submit, Caption => loc("Save Changes"), Label => loc('Save'), Name => 'Save'&>
+
+</form>
+
+<%INIT>
+my @actions;
+my $title = loc("Customize").' '.loc("Quick search");
+# The queue list is not loaded from cache, so it might be a bit inconsistent
+my $user = $session{'CurrentUser'}->UserObj;
+my $unwanted = $user->Preferences('QuickSearch', {});
+my $Queues = RT::Queues->new($session{'CurrentUser'});
+$Queues->UnLimit;
+my @queues = grep {$_->CurrentUserHasRight('ShowTicket')} @{$Queues->ItemsArrayRef};
+
+if ($ARGS{'Save'}) {
+ for my $queue (@queues) {
+ if ($ARGS{"Want-".$queue->Name}) {
+ delete $unwanted->{$queue->Name};
+ }
+ else {
+ ++$unwanted->{$queue->Name};
+ }
+ }
+
+ $user->SetPreferences('QuickSearch', $unwanted);
+ push @actions, loc ('Preferences saved.');
+ # Let QueueSummary rebuild the cache
+ delete $session{'quick_search_queues'};
+}
+
+</%INIT>
diff --git a/rt/html/Prefs/Search.html b/rt/html/Prefs/Search.html
new file mode 100644
index 000000000..8754d535d
--- /dev/null
+++ b/rt/html/Prefs/Search.html
@@ -0,0 +1,108 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => $title &>
+<& /Prefs/Elements/Tabs,
+ current_tab => 'Prefs/MyRT.html',
+# current_subtab => 'Prefs/Search.html?name='.$m->comp('/Elements/QueryString', name => $ARGS{name}),
+ current_subtab => 'Prefs/Search.html?name='.$ARGS{name},
+ Title => $title
+&>
+<& /Elements/ListActions, actions => \@actions &>
+% if ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) {
+<p>
+ <&|/l&>You can also edit the predefined search itself</&>:
+ <a href="<% $RT::WebPath.'/Search/Build.html?'.
+ $m->comp('/Elements/QueryString',
+ LoadSavedSearch => 'RT::System-1-SavedSearch-'.$id) %>"><% $search->Name %></a>
+</p>
+% }
+
+<form method="post" action="Search.html" name="BuildQuery">
+<input type="hidden" name="name" value="<%$ARGS{name}%>" class="hidden" />
+<input type="hidden" name="Format" value="<%$ARGS{Format}%>" class="hidden" />
+
+<& /Search/Elements/DisplayOptions, %$SearchArg, %ARGS,
+ AvailableColumns => $AvailableColumns, CurrentFormat => $CurrentFormat &>
+<& /Elements/Submit, Caption => loc("Save"), Label => loc('Save'), Name => 'Save'&>
+
+</form>
+
+<%INIT>
+my @actions;
+my $title = loc("Customize").' ';
+
+my @fields = qw(Format Order OrderBy RowsPerPage);
+my ($class, $id) = ( $ARGS{name} =~ m/^(.*)-(\d+)$/ );
+
+Abort('No search specified')
+ unless $class eq 'RT::Attribute';
+
+my $search = $class->new ($session{'CurrentUser'});
+$search->LoadById ($id);
+$title .= loc ($search->Description, loc ('"N"'));
+my $user = $session{'CurrentUser'}->UserObj;
+my $SearchArg = $user->Preferences($search, $search->Content);
+for (@fields) {
+ $ARGS{$_} = $SearchArg->{$_} unless defined $ARGS{$_};
+}
+$ARGS{'Order'} = join '|', grep defined && /\S/, (ref $ARGS{'Order'})? @{$ARGS{'Order'}}: $ARGS{'Order'};
+$ARGS{'OrderBy'} = join '|', grep defined && /\S/, (ref $ARGS{'OrderBy'})? @{$ARGS{'OrderBy'}}: $ARGS{'OrderBy'};
+
+my ( $AvailableColumns, $CurrentFormat );
+( $ARGS{Format}, $AvailableColumns, $CurrentFormat ) = $m->comp(
+ '/Search/Elements/BuildFormatString',
+ cfqueues => {}, %ARGS
+);
+
+if ($ARGS{'Save'}) {
+ my $hash = {map { $_ => $ARGS{$_}} @fields};
+ my $pref = $user->SetPreferences ($search, $hash);
+ push @actions, loc ('Preferences saved.');
+}
+
+</%INIT>
diff --git a/rt/html/Prefs/SearchOptions.html b/rt/html/Prefs/SearchOptions.html
new file mode 100644
index 000000000..7cc71b0cd
--- /dev/null
+++ b/rt/html/Prefs/SearchOptions.html
@@ -0,0 +1,114 @@
+
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => loc("Search Preferences") &>
+<& /User/Elements/Tabs,
+ current_tab => "Prefs/SearchOptions.html",
+ Title => loc("Search Preferences")
+&>
+
+<form method="post" action="SearchOptions.html">
+<input type="hidden" class="hidden" name="Format" value="<%$Format%>" />
+ <& /Search/Elements/DisplayOptions, %ARGS,
+ Format=> $Format,
+ AvailableColumns => $AvailableColumns,
+ CurrentFormat => $CurrentFormat,
+ RowsPerPage => $RowsPerPage,
+ OrderBy => $OrderBy,
+ Order => $Order &>
+
+<& /Elements/Submit, Name => 'SavePreferences', Label => loc('Save Changes') &>
+</form>
+
+<%INIT>
+
+# {{{ If we're saving search preferences, do that now
+$Order = join '|', grep defined && /\S/, (ref $Order)? @{$Order}: $Order;
+$OrderBy = join '|', grep defined && /\S/, (ref $OrderBy)? @{$OrderBy}: $OrderBy;
+
+if ($ARGS{'SavePreferences'}) {
+ $session{'CurrentUser'}->UserObj->SetPreferences("SearchDisplay",
+ {
+ Format => $Format,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ RowsPerPage => $RowsPerPage,
+ });
+}
+
+# }}}
+
+
+
+
+
+
+
+# Read from user preferences
+my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
+
+$Format ||= $prefs->{'Format'};
+$Order ||= $prefs->{'Order'} || 'ASC';
+$OrderBy ||= $prefs->{'OrderBy'} || 'id';
+($RowsPerPage = defined( $prefs->{'RowsPerPage'} ) ? $prefs->{'RowsPerPage'} : 50) unless defined ($RowsPerPage);
+
+my ( $AvailableColumns, $CurrentFormat );
+( $Format, $AvailableColumns, $CurrentFormat ) = $m->comp(
+ '/Search/Elements/BuildFormatString',
+ %ARGS, Format => $Format
+);
+</%INIT>
+
+<%ARGS>
+$Format => undef
+$Description => undef
+$Order => undef
+$OrderBy => undef
+$RowsPerPage => undef
+</%ARGS>
+
diff --git a/rt/html/REST/1.0/Forms/queue/default b/rt/html/REST/1.0/Forms/queue/default
index c87c33cce..cfc4b5291 100644
--- a/rt/html/REST/1.0/Forms/queue/default
+++ b/rt/html/REST/1.0/Forms/queue/default
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/Forms/queue/ns b/rt/html/REST/1.0/Forms/queue/ns
index b0ba0036a..227318944 100644
--- a/rt/html/REST/1.0/Forms/queue/ns
+++ b/rt/html/REST/1.0/Forms/queue/ns
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/Forms/ticket/attachments b/rt/html/REST/1.0/Forms/ticket/attachments
index ca75ce0d1..4ee409bdc 100644
--- a/rt/html/REST/1.0/Forms/ticket/attachments
+++ b/rt/html/REST/1.0/Forms/ticket/attachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,7 @@
$id
$args => undef
</%ARGS>
-<%perl>
+<%INIT>
my @data;
my ($c, $o, $k, $e) = ("", [], {}, "");
my $ticket = new RT::Ticket $session{CurrentUser};
@@ -80,7 +82,12 @@ if ($aid) {
return [ "# Invalid attachment id: $aid", [], {}, 1 ];
}
if ($content) {
- $c = $attachment->OriginalContent;
+ $c = $attachment->OriginalContent;
+ # if we're sending a binary attachment (and only the attachment)
+ # flag it so bin/rt knows to special case it
+ if ($attachment->ContentType !~ /^text\//) {
+ $r->content_type($attachment->ContentType);
+ }
} else {
my @data;
push @data, [ id => $attachment->Id ];
@@ -125,4 +132,4 @@ else {
}
return [ $c, $o, $k, $e ];
-</%perl>
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/comment b/rt/html/REST/1.0/Forms/ticket/comment
new file mode 100755
index 000000000..4ed2da8af
--- /dev/null
+++ b/rt/html/REST/1.0/Forms/ticket/comment
@@ -0,0 +1,152 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+%# REST/1.0/Forms/ticket/comment
+%#
+<%ARGS>
+$id
+%changes
+</%ARGS>
+<%INIT>
+use MIME::Entity;
+use LWP::MediaTypes;
+use RT::Interface::REST;
+use File::Temp qw(tempfile);
+
+$RT::Logger->debug("Got ticket id=$id for comment");
+$RT::Logger->debug("Got args @{[keys(%changes)]}.");
+
+my $ticket = new RT::Ticket $session{CurrentUser};
+my ($c, $o, $k, $e) = ("", [], {}, 0);
+
+# http://.../REST/1.0/ticket/1/comment
+$ticket->Load($id);
+if (!$ticket->Id) {
+ $e = 1;
+ $c = "# Ticket $id does not exist.";
+ goto OUTPUT;
+}
+
+my $action;
+($action = $changes{Action}) =~ s/^(.)(.*)$/\U$1\L$2\E/;
+unless ($action =~ /^(?:Comment|Correspond)$/) {
+ $e = 1;
+ $c = "# Invalid action: `$action'.";
+ goto OUTPUT;
+}
+
+my $text = $changes{Text};
+my @atts = @{ vsplit($changes{Attachment}) };
+
+if (!$changes{Text} && @atts == 0) {
+ $e = 1;
+ $c = "# Empty comment with no attachments submitted.";
+ goto OUTPUT;
+}
+
+my $cgi = $m->cgi_object;
+my $ent = MIME::Entity->build(Type => "multipart/mixed");
+$ent->attach(Data => $changes{Text}) if $changes{Text};
+
+my $i = 1;
+foreach my $att (@atts) {
+ local $/=undef;
+ my $file = $att;
+ $file =~ s#^.*[\\/]##;
+
+ my $fh = $cgi->upload("attachment_$i");
+ if ($fh) {
+ my $buf;
+ my ($w, $tmp) = tempfile();
+ my $info = $cgi->uploadInfo();
+
+ while (sysread($fh, $buf, 8192)) {
+ syswrite($w, $buf);
+ }
+
+ $ent->attach(
+ Path => $tmp,
+ Type => $info->{'Content-Type'} || guess_media_type($tmp),
+ Filename => $file,
+ Disposition => "attachment"
+ );
+ }
+ else {
+ $e = 1;
+ $c = "# No attachment for $att.";
+ goto OUTPUT;
+ }
+
+ $i++;
+}
+
+unless ($ticket->CurrentUserHasRight('ModifyTicket') ||
+ ($action eq "Comment" &&
+ $ticket->CurrentUserHasRight("CommentOnTicket")) ||
+ ($action eq "Correspond" &&
+ $ticket->CurrentUserHasRight("ReplyToTicket")))
+{
+ $e = 1;
+ $c = "# You are not allowed to $action on ticket $id.";
+ goto OUTPUT;
+}
+
+my $cc = join ", ", @{ vsplit($changes{Cc}) };
+my $bcc = join ", ", @{ vsplit($changes{Bcc}) };
+my ($n, $s) = $ticket->$action(MIMEObj => $ent,
+ CcMessageTo => $cc,
+ BccMessageTo => $bcc,
+ TimeTaken => $changes{TimeWorked} || 0);
+$c = "# ".$s;
+if ($changes{Status}) {
+ my ($status_n, $status_s) = $ticket->SetStatus($changes{'Status'} );
+ $c .= "\n# ".$status_s;
+}
+
+OUTPUT:
+return [ $c, $o, $k, $e ];
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/default b/rt/html/REST/1.0/Forms/ticket/default
index 78f6c9562..69e385f57 100644
--- a/rt/html/REST/1.0/Forms/ticket/default
+++ b/rt/html/REST/1.0/Forms/ticket/default
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,15 +51,16 @@
$id
$changes => {}
$fields => undef
+$args => undef
</%ARGS>
-<%perl>
+<%INIT>
use MIME::Entity;
my @comments;
my ($c, $o, $k, $e) = ("", [], {}, 0);
my %data = %$changes;
my $ticket = new RT::Ticket $session{CurrentUser};
-my @dates = qw(Created Starts Started Due Resolved Told);
+my @dates = qw(Created Starts Started Due Resolved Told LastUpdated);
my @people = qw(Requestors Cc AdminCc);
my @create = qw(Queue Requestor Subject Cc AdminCc Owner Status Priority
InitialPriority FinalPriority TimeEstimated TimeWorked
@@ -83,7 +86,7 @@ if ($id ne 'new') {
}
}
else {
- if (%data == 0) {
+ if (!keys(%data)) {
# GET ticket/new: Return a suitable default form.
# We get defaults from queue/1 (XXX: What if it isn't there?).
my $due = new RT::Date $session{CurrentUser};
@@ -95,7 +98,7 @@ else {
$starts->SetToNow;
return [
- "# Required: Queue, Requestor, Subject",
+ "# Required: id, Queue",
[ qw(id Queue Requestor Subject Cc AdminCc Owner Status Priority
InitialPriority FinalPriority TimeEstimated Starts Due Text) ],
{
@@ -127,11 +130,26 @@ else {
if (exists $create{lc $k}) {
$v{$create{lc $k}} = delete $data{$k};
}
+ # Set custom field
+ elsif ($k =~ /^CF-/i) {
+ my $cf = RT::CustomField->new( $RT::SystemUser );
+ my $cfk = $k;
+ $cfk =~ s/^CF-//i;
+ unless($cf->LoadByName( Name => $cfk )) {
+ push @comments, "# Invalid custom field name ($cfk)";
+ delete $data{$k};
+ next;
+ }
+ $v{"CustomField-".$cf->Id()} = delete $data{$k};
+ }
elsif (lc $k eq 'text') {
$text = delete $data{$k};
}
}
+ # people fields allow multiple values
+ $v{$_} = vsplit($v{$_}) foreach ( grep $create{lc $_}, @people );
+
if ($text) {
$v{MIMEObj} =
MIME::Entity->build(
@@ -141,20 +159,23 @@ else {
);
}
- $ticket->Create(%v);
- unless ($ticket->Id) {
- return [ "# Could not create ticket.", [], {}, 1 ];
+ my($tid,$trid,$terr) = $ticket->Create(%v);
+ unless ($tid) {
+ push(@comments, "# Could not create ticket.");
+ push(@comments, "# " . $terr);
+ goto DONE;
}
delete $data{id};
$id = $ticket->Id;
push(@comments, "# Ticket $id created.");
- goto DONE if %data == 0;
+ # see if the hash is empty
+ goto DONE if ! keys(%data);
}
}
# Now we know we're dealing with an existing ticket.
-if (%data == 0) {
+if (!keys(%data)) {
my ($time, $key, $val, @data);
push @data, [ id => "ticket/".$ticket->Id ];
@@ -171,7 +192,7 @@ if (%data == 0) {
}
foreach $key (@people) {
- next unless (!%$fields || (exists $fields->{lc $key}));
+ next unless (!%$fields || (exists $fields->{lc $key}));
push @data, [ $key => [ $ticket->$key->MemberEmailAddresses ] ];
}
@@ -190,6 +211,18 @@ if (%data == 0) {
push @data, [ $key => $val ];
}
+ # Display custom fields
+ my $CustomFields = $ticket->QueueObj->TicketCustomFields();
+ while (my $cf = $CustomFields->Next()) {
+ next unless (!%$fields || (exists $fields->{"cf-".lc $cf->Name}));
+ my $vals = $ticket->CustomFieldValues($cf->Id());
+ my @out = ();
+ while (my $v = $vals->Next()) {
+ push @out, $v->Content;
+ }
+ push @data, [ 'CF-' . $cf->Name => join ',', @out ];
+ }
+
my %k = map {@$_} @data;
$o = [ map {$_->[0]} @data ];
$k = \%k;
@@ -271,6 +304,20 @@ else {
$s =~ s/^# //;
}
}
+ # Set custom field
+ elsif ($key =~ /^CF-/i) {
+ my $cf = RT::CustomField->new( $RT::SystemUser );
+ $key =~ s/^CF-//i;
+ if (not $cf->LoadByName( Name => $key )) {
+ $n = 0;
+ $s = "Unknown custom field.";
+ }
+ else {
+ ($n, $s) = $ticket->AddCustomFieldValue(
+ Field => $cf, Value => $val );
+ $s =~ s/^# // if defined $s;
+ }
+ }
elsif ($key ne 'id' && $key ne 'type' && $key ne 'creator') {
$n = 0;
$s = "Unknown field.";
@@ -295,4 +342,4 @@ DONE:
$c ||= join("\n", @comments) if @comments;
return [$c, $o, $k, $e];
-</%perl>
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/history b/rt/html/REST/1.0/Forms/ticket/history
index 4663e97ee..5dd7417d0 100644
--- a/rt/html/REST/1.0/Forms/ticket/history
+++ b/rt/html/REST/1.0/Forms/ticket/history
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,7 +53,7 @@ $args => undef
$format => undef
$fields => undef
</%ARGS>
-<%perl>
+<%INIT>
my $ticket = new RT::Ticket $session{CurrentUser};
my ($c, $o, $k, $e) = ("", [], {}, "");
@@ -94,7 +96,19 @@ if ($type) {
if ($tid) {
my @data;
my $t = new RT::Transaction $session{CurrentUser};
- $t->Load($tid);
+
+ # this paragraph limits the transaction ID query to transactions on this ticket.
+ # Otherwise you can query any transaction from any ticket, which makes no sense.
+ my $Transactions = $ticket->Transactions;
+ my $tok=0;
+ while (my $T = $Transactions->Next()) {
+ $tok=1 if ($T->Id == $tid)
+ }
+ if ($tok) {
+ $t->Load($tid);
+ } else {
+ return [ "# Transaction $tid is not related to Ticket $id", [], {}, 1 ];
+ }
push @data, [ id => $t->Id ];
push @data, [ Ticket => $t->Ticket ]
@@ -168,8 +182,7 @@ if ($tid) {
$fieldstring .= $key;
}
my ($content, $forms);
-
- $m->subexec("$RT::WebPath/REST/1.0/show",
+ $m->subexec("/REST/1.0/show",
id => \@tid,
format => $format,
fields => $fieldstring);
@@ -184,4 +197,4 @@ if (!$c) {
return [ $c, $o, $k, $e ];
-</%perl>
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/links b/rt/html/REST/1.0/Forms/ticket/links
index 9f14da4e3..6b2ed222d 100644
--- a/rt/html/REST/1.0/Forms/ticket/links
+++ b/rt/html/REST/1.0/Forms/ticket/links
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,7 +52,7 @@ $id
$format => 's'
$changes => undef
</%ARGS>
-<%perl>
+<%INIT>
my @data;
my $ticket = new RT::Ticket $session{CurrentUser};
@@ -167,4 +169,4 @@ else {
}
return [ $c, $o, $k, $e ];
-</%perl>
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/merge b/rt/html/REST/1.0/Forms/ticket/merge
new file mode 100755
index 000000000..69af6c8e1
--- /dev/null
+++ b/rt/html/REST/1.0/Forms/ticket/merge
@@ -0,0 +1,96 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+%# REST/1.0/Forms/ticket/merge
+%#
+<%ARGS>
+$id
+$args
+</%ARGS>
+<%INIT>
+use RT::Interface::REST;
+
+my $into = $args;
+
+my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket_into = new RT::Ticket $session{CurrentUser};
+my ($c, $o, $k, $e) = ("", [], {}, 0);
+
+# http://.../REST/1.0/ticket/1/merge/6 (merges ticket 1 into ticket 6)
+
+$ticket->Load($id);
+if (!$ticket->Id) {
+ $e = 1;
+ $c = "# Ticket $id does not exist.";
+ goto OUTPUT;
+}
+$ticket_into->Load($into);
+if (!$ticket_into->Id) {
+ $e = 1;
+ $c = "# Ticket $into does not exist.";
+ goto OUTPUT;
+}
+
+if (!$ticket->CurrentUserHasRight('ModifyTicket')) {
+ $e = 1;
+ $c = "# You are not allowed to modify ticket $id.";
+ goto OUTPUT;
+}
+
+my ($n, $s) = $ticket->MergeInto($into);
+
+if ($n == 0) {
+ $e = 1;
+ $c = "# Could not complete the merge.";
+}
+else {
+ $c = "# Merge completed.";
+}
+
+OUTPUT:
+return [ $c, $o, $k, $e ];
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/take b/rt/html/REST/1.0/Forms/ticket/take
new file mode 100755
index 000000000..35ee11fa7
--- /dev/null
+++ b/rt/html/REST/1.0/Forms/ticket/take
@@ -0,0 +1,135 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+%# REST/1.0/Forms/ticket/take
+%#
+<%ARGS>
+$id
+%changes
+</%ARGS>
+<%INIT>
+use RT::Interface::REST;
+
+my $ticket = new RT::Ticket $session{CurrentUser};
+my ($c, $o, $k, $e) = ("", [], {}, 0);
+
+# http://.../REST/1.0/ticket/1/take
+$ticket->Load( $id );
+unless ( $ticket->Id ) {
+ $e = 1;
+ $c = "# Ticket $id does not exist.";
+ goto OUTPUT;
+}
+
+my $action;
+
+my @comments;
+
+($action = $changes{Action}) =~ s/^(.)(.*)$/\U$1\L$2\E/;
+unless ($action =~ /^(?:Take|Steal|Untake)$/) {
+ $e = 1;
+ $c = "# Invalid action: `$action'.";
+ goto OUTPUT;
+}
+
+my ($status, $msg) = $ticket->$action();
+$c = "# $msg";
+$e = 1 unless $status;
+goto OUTPUT;
+
+#unless ($ticket->CurrentUserHasRight('ModifyTicket') ||
+# ( ($action eq "Take" || $action eq 'Untake') &&
+# $ticket->CurrentUserHasRight("TakeTicket")) ||
+# ($action eq "Steal" &&
+# $ticket->CurrentUserHasRight("StealTicket")))
+#{
+# $e = 1;
+# $c = "# You are not allowed to $action ticket $id.";
+# goto OUTPUT;
+#}
+
+#if ( keys %changes ) {
+#}
+#else {
+# # process the form data structure
+# my ($key, $val);
+#
+# foreach $key (keys %data) {
+# $val = $data{$key};
+#
+# if ($key =~ /^force$/i) {
+# if ($val !~ /^(?:0|1)$/) {
+# push(@comments, "# invalid value for 'force': $val");
+# goto DONE;
+# }
+# my ($ret_id, $msg);
+#
+# ### take
+# if ($val == 0) {
+# ($ret_id, $msg) = $ticket->Take;
+# if (!$ret_id) {
+# push(@comments, "# Couldn't take ticket $id: $msg");
+# goto DONE;
+# }
+# push(@comments, "# Ticket $id taken.");
+# }
+# ### steal
+# else {
+# ($ret_id, $msg) = $ticket->Steal;
+# if (!$ret_id) {
+# push(@comments, "# Couldn't steal ticket $id: $msg");
+# goto DONE;
+# }
+# push(@comments, "# Ticket $id stolen.");
+# }
+# }
+# }
+#}
+
+OUTPUT:
+return [ $c, $o, $k, $e ];
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/transaction/default b/rt/html/REST/1.0/Forms/transaction/default
new file mode 100644
index 000000000..e23098a66
--- /dev/null
+++ b/rt/html/REST/1.0/Forms/transaction/default
@@ -0,0 +1,143 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+%# REST/1.0/Forms/transaction
+%#
+<%ARGS>
+$id
+$args => undef
+$format => undef
+$fields => undef
+</%ARGS>
+<%INIT>
+my $trans = new RT::Transactions $session{CurrentUser};
+my ($c, $o, $k, $e) = ("", [], {} , "");
+
+chomp $args;
+my @arglist = split('/', $args);
+my $tid = $id;
+
+$trans->Limit(FIELD => 'Id', OPERATOR => '=', VALUE => $tid);
+
+if ($tid) {
+ my @data;
+ my $t = new RT::Transaction $session{CurrentUser};
+ $t->Load($tid);
+ if ($format eq "l") {
+ push @data, [ id => $t->Id ];
+ push @data, [ Ticket => $t->Ticket ]
+ if (!%$fields || exists $fields->{lc 'Ticket'});
+ push @data, [ TimeTaken => $t->TimeTaken ]
+ if (!%$fields || exists $fields->{lc 'TimeTaken'});
+ push @data, [ Type => $t->Type ]
+ if (!%$fields || exists $fields->{lc 'Type'});
+ push @data, [ Field => $t->Field ]
+ if (!%$fields || exists $fields->{lc 'Field'});
+ push @data, [ OldValue => $t->OldValue ]
+ if (!%$fields || exists $fields->{lc 'OldValue'});
+ push @data, [ NewValue => $t->NewValue ]
+ if (!%$fields || exists $fields->{lc 'NewValue'});
+ push @data, [ Data => $t->Data ]
+ if (!%$fields || exists $fields->{lc 'Data'});
+ push @data, [ Description => $t->Description ]
+ if (!%$fields || exists $fields->{lc 'Description'});
+ push @data, [ Content => $t->Content ]
+ if (!%$fields || exists $fields->{lc 'Content'});
+
+ if (!%$fields || exists $fields->{lc 'Content'}) {
+ my $creator = new RT::User $session{CurrentUser};
+ $creator->Load($t->Creator);
+ push @data, [ Creator => $creator->Name ];
+ }
+ push @data, [ Created => $t->Created ]
+ if (!%$fields || exists $fields->{lc 'Created'});
+
+ if (!%$fields || exists $fields->{lc 'Attachments'}) {
+ my $attachlist;
+ my $attachments = $t->Attachments;
+ while (my $a = $attachments->Next) {
+ my $size = length($a->Content);
+ if ($size > 1024) {
+ $size = int($size/102.4)/10 . "k";
+ }
+ else {
+ $size .= "b";
+ }
+ $attachlist .= "\n" . $a->Id.": ".($a->Filename || "untitled")." (".$size.")";
+ }
+ push @data, [Attachments => $attachlist];
+ }
+
+ } else {
+ push @data, [ id => $t->Id ];
+ push @data, [ Description => $t->Description ];
+ }
+
+ my %k = map {@$_} @data;
+ $o = [ map {$_->[0]} @data ];
+ $k = \%k;
+}
+#else {
+# my (@data, $tids);
+# $format ||= "s";
+# $format = "l" if (%$fields);
+#
+# while (my $t = $trans->Next) {
+# my $tid = $t->Id;
+# if ($format eq "l") {
+# $tids .= "," if $tids;
+# $tids .= $tid;
+# } else {
+# push @$o, $tid;
+# $k->{$tid} = $t->Description;
+# }
+# }
+#}
+
+return [ $c, $o, $k, $e ];
+
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/user/default b/rt/html/REST/1.0/Forms/user/default
index ad2ebd57a..621e96dfa 100644
--- a/rt/html/REST/1.0/Forms/user/default
+++ b/rt/html/REST/1.0/Forms/user/default
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/Forms/user/ns b/rt/html/REST/1.0/Forms/user/ns
index 406156304..3503d8ace 100644
--- a/rt/html/REST/1.0/Forms/user/ns
+++ b/rt/html/REST/1.0/Forms/user/ns
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/NoAuth/mail-gateway b/rt/html/REST/1.0/NoAuth/mail-gateway
index 5252c1968..739dace9d 100644
--- a/rt/html/REST/1.0/NoAuth/mail-gateway
+++ b/rt/html/REST/1.0/NoAuth/mail-gateway
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,26 +54,31 @@ $action => "correspond"
$ticket => undef
</%ARGS>
<%init>
-use RT::Interface::Email;
+$m->comp('/Elements/Callback', _CallbackName => 'Pre', %ARGS);
+use RT::Interface::Email (); # It's an exporter, but we don't care
$r->content_type('text/plain; charset=utf-8');
$m->error_format('text');
-my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway(\%ARGS);
- if ($status == -75 ) {
-$m->out("temporary failure - ". $error);
- }
- elsif ($status == 1) {
-$m->out('ok');
- if ( $Ticket->Id ) {
-$m->out('Ticket: '. $Ticket->Id);
-$m->out('Queue: '. $Ticket->QueueObj->Name );
-$m->out('Owner: '. $Ticket->OwnerObj->Name);
-$m->out('Status: '. $Ticket->Status );
-$m->out('Subject: '. $Ticket->Subject );
-$m->out('Requestor: '. $Ticket->Requestors->MemberEmailAddressesAsString );
- }
- } else {
-$m->out('not ok - '.$error);
- }
-
+my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%ARGS );
+if ( $status == 1 ) {
+ $m->out('ok');
+ if ( $Ticket->Id ) {
+ $m->out( 'Ticket: ' . ($Ticket->Id || '') );
+ $m->out( 'Queue: ' . ($Ticket->QueueObj->Name || '') );
+ $m->out( 'Owner: ' . ($Ticket->OwnerObj->Name || '') );
+ $m->out( 'Status: ' . ($Ticket->Status || '') );
+ $m->out( 'Subject: ' . ($Ticket->Subject || '') );
+ $m->out(
+ 'Requestor: ' . ($Ticket->Requestors->MemberEmailAddressesAsString || '') );
+ }
+}
+else {
+ $RT::Logger->error( "Could not record email: " . $error );
+ if ( $status == -75 ) {
+ $m->out( "temporary failure - " . $error );
+ }
+ else {
+ $m->out( 'not ok - ' . $error );
+ }
+}
$m->abort();
</%init>
diff --git a/rt/html/REST/1.0/autohandler b/rt/html/REST/1.0/autohandler
index 8e3fb164d..e8247b18e 100644
--- a/rt/html/REST/1.0/autohandler
+++ b/rt/html/REST/1.0/autohandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/dhandler b/rt/html/REST/1.0/dhandler
index 6cf45b000..52d6973f1 100644
--- a/rt/html/REST/1.0/dhandler
+++ b/rt/html/REST/1.0/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -72,6 +74,7 @@ my $labels = "(?:$label,)*$label";
# http://.../REST/1.0/ticket/edit
# 4. http://.../REST/1.0/ticket/nn (all possibly with a single form).
# http://.../REST/1.0/ticket/nn/history
+# http://.../REST/1.0/ticket/nn/comment
# http://.../REST/1.0/ticket/nn/attachment/1
#
# Objects are specified by their type, and either a unique numeric ID,
@@ -290,7 +293,12 @@ foreach $object (@objects) {
# We won't pass $e through to compose, trusting instead that the
# handler added suitable comments for the user.
if ($e) {
- $status = "409 Syntax Error" if @$o;
+ if (@$o) {
+ $status = "409 Syntax Error";
+ }
+ else {
+ $status = "400 Bad Request";
+ }
push @output, [ $c, $o, $k ];
}
else {
@@ -303,7 +311,6 @@ unshift(@output, [ join "\n", @comments ]) if @comments;
$output = form_compose(\@output);
OUTPUT:
+$m->out("RT/".$RT::VERSION ." ".$status ."\n\n$output\n") if ($output || $status != 200);
+return;
</%INIT>
-RT/<% $RT::VERSION %> <% $status %>
-
-<% $output |n %>
diff --git a/rt/html/REST/1.0/logout b/rt/html/REST/1.0/logout
index 470cb0915..4152a7ee0 100644
--- a/rt/html/REST/1.0/logout
+++ b/rt/html/REST/1.0/logout
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/search/dhandler b/rt/html/REST/1.0/search/dhandler
index 1915a4644..3e6b314b7 100644
--- a/rt/html/REST/1.0/search/dhandler
+++ b/rt/html/REST/1.0/search/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/search/ticket b/rt/html/REST/1.0/search/ticket
index d0ab59e98..8f4604d56 100644
--- a/rt/html/REST/1.0/search/ticket
+++ b/rt/html/REST/1.0/search/ticket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -60,7 +62,7 @@ my $tickets = new RT::Tickets $session{CurrentUser};
my $field = '[a-zA-Z][a-zA-Z0-9_-]*';
my (%fields, @fields);
if ($fields) {
- $format = "l";
+ $format ||= "l";
unless ($fields =~ /^(?:$field,)*$field$/) {
$status = "400 Bad Request";
$output = "Invalid field specification: $fields";
@@ -115,15 +117,29 @@ my @output;
while (my $ticket = $tickets->Next) {
$n++;
+ my $id = $ticket->Id;
if ($format eq "i") {
- $output .= "ticket/" . $ticket->Id . "\n";
+ $output .= "ticket/" . $id . "\n";
}
elsif ($format eq "s") {
- $output .= $ticket->Id . ": ". $ticket->Subject . "\n";
+ if ($fields) {
+ my $result = $m->comp("/REST/1.0/Forms/ticket/default", id => $id, format => $format, fields => \%fields);
+ my ($notes, $order, $key_values, $errors) = @$result;
+ # If it's the first time through, add our header
+ if ($n == 1) {
+ $output .= join("\t",@$order)."\n";
+ }
+ # Cut off the annoying ticket/ before the id;
+ $key_values->{'id'} = $id;
+ $output .= join("\t", map {$key_values->{$_}} @$order)."\n";
+
+
+ } else {
+ $output .= $ticket->Id . ": ". $ticket->Subject . "\n";
+ }
}
else {
- my $id = $ticket->Id;
- my $d = $m->comp("$RT::WebPath/REST/1.0/Forms/ticket/default", id => $id, format => $format, fields => \%fields);
+ my $d = $m->comp("/REST/1.0/Forms/ticket/default", id => $id, format => $format, fields => \%fields);
my ($c, $o, $k, $e) = @$d;
push @output, [ $c, $o, $k ];
}
@@ -138,4 +154,5 @@ OUTPUT:
$m->out("RT/". $RT::VERSION . " " . $status ."\n\n");
$m->out($output );
+return();
</%INIT>
diff --git a/rt/html/REST/1.0/ticket/comment b/rt/html/REST/1.0/ticket/comment
index e27bfcc1e..240dd90fb 100644
--- a/rt/html/REST/1.0/ticket/comment
+++ b/rt/html/REST/1.0/ticket/comment
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -60,7 +62,7 @@ my $status = "200 Ok";
my $output;
my $action;
-# http://.../REST/1.0/ticket/comment/1
+# http://.../REST/1.0/ticket/1/comment
my ($c, $o, $k, $e) = @{ form_parse($content)->[0] };
if ($e || !$o) {
if (!$o) {
diff --git a/rt/html/REST/1.0/ticket/link b/rt/html/REST/1.0/ticket/link
index 6556a5ef7..766e12624 100644
--- a/rt/html/REST/1.0/ticket/link
+++ b/rt/html/REST/1.0/ticket/link
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -72,7 +74,7 @@ my %lfields = (
# http://.../REST/1.0/ticket/link/1
-$object =~ s#^/##;
+$object =~ s#^/REST/1.0/ticket/link##;
if ($id && $object && $id != $object) {
$output = "Different ids in URL (`$object') and submitted form (`$id').\n";
$status = "400 Bad Request";
@@ -109,6 +111,9 @@ my $op = $del ? "DeleteLink" : "AddLink";
($n, $output) = $ticket->$op(Type => $type, $mode => $to);
if ($n == 0) {
$status = "500 Error";
+} else {
+ my $action = $del ? "Deleted" : "Created";
+ $output .= " $action link " . $ticket->Id . " $rel $to";
}
OUTPUT:
diff --git a/rt/html/REST/1.0/ticket/merge b/rt/html/REST/1.0/ticket/merge
index 3db52111b..d6ae96f83 100644
--- a/rt/html/REST/1.0/ticket/merge
+++ b/rt/html/REST/1.0/ticket/merge
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Search/Build.html b/rt/html/Search/Build.html
index 5a66e02c9..ba5f7a1dd 100644
--- a/rt/html/Search/Build.html
+++ b/rt/html/Search/Build.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -74,15 +76,15 @@
Rows => $RowsPerPage
&>
-<FORM METHOD="POST" ACTION="Build.html" NAME="BuildQuery">
-<input type=hidden name=SearchId value="<%$SearchId%>">
-<input type=hidden name=Query value="<%$Query%>">
-<input type=hidden name=Format value="<%$Format%>">
-<table width=100% border="0" cellpadding="5">
+<form method="post" action="Build.html" name="BuildQuery">
+<input type="hidden" class="hidden" name="SearchId" value="<%$SearchId%>" />
+<input type="hidden" class="hidden" name="Query" value="<%$Query%>" />
+<input type="hidden" class="hidden" name="Format" value="<%$Format%>" />
+<table width="100%" border="0" cellpadding="5">
<tr valign="top">
<td class="boxcontainer" rowspan="2" width="65%">
<& Elements/PickCriteria, query => $Query, cfqueues => $queues &>
-<& /Elements/Submit, Caption => loc('Add additional criteria'), Label => loc('Add'), Name => 'AddClause'&>
+<& /Elements/Submit, Caption => loc('Add these terms to your search'), Label => loc('Add'), Name => 'AddClause'&>
</td>
<td>
@@ -91,6 +93,7 @@
actions => \@actions,
optionlist => $optionlist,
Description => $Description &>
+<& /Elements/Submit, Label => loc('Add and Search'), Name => 'DoSearch'&>
</td>
</tr>
@@ -101,19 +104,15 @@
</tr>
<tr>
-<td colspan=2 class="boxcontainer">
+<td colspan="2" class="boxcontainer">
<& Elements/DisplayOptions, %ARGS, Format=> $Format,
AvailableColumns => $AvailableColumns, CurrentFormat => $CurrentFormat, RowsPerPage => $RowsPerPage, OrderBy => $OrderBy, Order => $Order &>
-</td>
-</tr>
-<tr>
-<td colspan=2 class="boxcontainer">
-<& /Elements/Submit, Caption => loc("Do the Search"), Label => loc('Search'), Name => 'DoSearch'&>
+<& /Elements/Submit, Label => loc('Add and Search'), Name => 'DoSearch'&>
</td>
</tr>
</table>
-</FORM>
+</form>
<%INIT>
use RT::Interface::Web::QueryBuilder;
@@ -134,7 +133,7 @@ if ( $NewQuery or $ARGS{'Delete'} ) {
$SearchId = '';
$Order = '';
$OrderBy = '';
- $RowsPerPage = '';
+ $RowsPerPage = undef;
# ($search hasn't been set yet; no need to clear)
@@ -147,22 +146,43 @@ if ( $NewQuery or $ARGS{'Delete'} ) {
# }}}
+if (ref $OrderBy eq "ARRAY") {
+ $OrderBy = join("|", @$OrderBy);
+}
+if (ref $Order eq "ARRAY") {
+ $Order = join("|", @$Order);
+}
+
# {{{ Attempt to load what we can from the session, set defaults
# We don't read or write to the session again until the end
$search_hash = $session{'CurrentSearchHash'};
+# Read from user preferences
+my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
+
# These variables are what define a search_hash; this is also
# where we give sane defaults.
$Query ||= $search_hash->{'Query'};
-$Format ||= $search_hash->{'Format'};
+$Format ||= $search_hash->{'Format'} || $prefs->{'Format'};
$Description ||= $search_hash->{'Description'};
$SearchId ||= $search_hash->{'SearchId'} || 'new';
-$Order ||= $search_hash->{'Order'} || 'ASC';
-$OrderBy ||= $search_hash->{'OrderBy'} || 'id';
-$RowsPerPage = ( $search_hash->{'RowsPerPage'} || 50 )
- unless defined($RowsPerPage);
-$search ||= $search_hash->{'Object'};
+$Order ||= $search_hash->{'Order'} || $prefs->{'Order'} || 'ASC';
+$OrderBy ||= $search_hash->{'OrderBy'} || $prefs->{'OrderBy'} || 'id';
+
+unless ( defined $RowsPerPage ) {
+ if ( defined $search_hash->{'RowsPerPage'} ) {
+ $RowsPerPage = $search_hash->{'RowsPerPage'};
+ }
+ elsif ( defined $prefs->{'RowsPerPage'} ) {
+ $RowsPerPage = $prefs->{'RowsPerPage'};
+ }
+ else {
+ $RowsPerPage = 50;
+ }
+}
+
+ $search ||= $search_hash->{'Object'};
# }}}
@@ -175,31 +195,14 @@ $Format = $m->comp( '/Elements/ScrubHTML', Content => $Format ) if ($Format);
if ( $ARGS{'Delete'} ) {
# We set $SearchId to 'new' above already, so peek into the %ARGS
- if ( $ARGS{'SearchId'} =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
- my $obj_type = $1;
- my $obj_id = $2;
- my $search_id = $3;
-
- my $container_object;
- if ( $obj_type eq 'RT::User' && $obj_id == $session{'CurrentUser'}->Id )
- {
- $container_object = $session{'CurrentUser'}->UserObj;
- }
- elsif ( $obj_type eq 'RT::Group' ) {
- $container_object = RT::Group->new( $session{'CurrentUser'} );
- $container_object->Load($obj_id);
- }
-
- if ( $container_object->id ) {
-
- # We have the object the entry is an attribute on; delete
- # the entry..
- $container_object->Attributes->DeleteEntry(
- Name => 'SavedSearch',
- id => $search_id
+ my ($container_object, $search_id) = _parse_saved_search ($ARGS{'SearchId'});
+ if ($container_object && $container_object->id) {
+ # We have the object the entry is an attribute on; delete the
+ # entry..
+ $container_object->Attributes->DeleteEntry(
+ Name => 'SavedSearch',
+ id => $search_id
);
- }
-
}
}
@@ -223,25 +226,8 @@ if ( $ARGS{'Revert'} ) {
# {{{ if we're asked to load a search, load it.
-if ( $ARGS{'LoadSavedSearch'} =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
- my $obj_type = $1;
- my $obj_id = $2;
- my $search_id = $3;
-
- # We explicitly list out the available types (user and group) and
- # don't trust user input here
- if ( ( $obj_type eq 'RT::User' )
- && ( $obj_id == $session{'CurrentUser'}->id ) )
- {
- $search =
- $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
-
- }
- elsif ( $obj_type eq 'RT::Group' ) {
- my $group = RT::Group->new( $session{'CurrentUser'} );
- $group->Load($obj_id);
- $search = $group->Attributes->WithId($search_id);
- }
+if ( my ($container_object, $search_id ) = _parse_saved_search ($ARGS{'LoadSavedSearch'})) {
+ $search = $container_object->Attributes->WithId($search_id);
# We have a $search and now; import the others
$SearchId = $ARGS{'LoadSavedSearch'};
@@ -255,6 +241,62 @@ if ( $ARGS{'LoadSavedSearch'} =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
# }}}
+# {{{ if we're asked to save the current search, save it
+if ( $ARGS{'Save'} ) {
+ if ( $search && $search->id ) {
+ # permission check
+ if ($search->Object->isa('RT::System')) {
+ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) {
+ Abort("No permission to save system-wide searches");
+ }
+ }
+
+ # This search is based on a previously loaded search -- so
+ # just update the current search object with new values
+ $search->SetSubValues(
+ Format => $Format,
+ Query => $Query,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ RowsPerPage => $RowsPerPage,
+ );
+ $search->SetDescription($Description);
+
+ }
+ elsif ( $SearchId eq 'new' ) {
+ my $saved_search = RT::SavedSearch->new( $session{'CurrentUser'} );
+ my ( $ok, $search_msg ) = $saved_search->Save(
+ Privacy => $ARGS{'Owner'},
+ Name => $Description,
+ SearchParams => {
+ Format => $Format,
+ Query => $Query,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ RowsPerPage => $RowsPerPage } );
+
+ if ($ok) {
+ $search = $session{'CurrentUser'}->UserObj->Attributes->WithId($saved_search->Id);
+ # Build new SearchId
+ $SearchId =
+ ref( $session{'CurrentUser'}->UserObj ) . '-'
+ . $session{'CurrentUser'}->UserObj->Id
+ . '-SavedSearch-'
+ . $search->Id;
+ }
+ else {
+ push @actions, [ loc("Can't find a saved search to work with").': '.loc($search_msg), 0 ];
+ }
+ }
+ else {
+ push @actions, [ loc("Can't save this search"), 0 ];
+ }
+
+}
+
+# }}}
+
+
# {{{ Parse the query
use Regexp::Common qw /delimited/;
@@ -278,7 +320,7 @@ my $_match = sub {
my $ParseQuery = sub {
my $string = shift;
my $tree = shift;
- my @actions = shift;
+ my $actions = shift;
my $want = KEYWORD | PAREN;
my $last = undef;
@@ -287,9 +329,12 @@ my $ParseQuery = sub {
# make a tree root
$$tree = RT::Interface::Web::QueryBuilder::Tree->new;
my $root = RT::Interface::Web::QueryBuilder::Tree->new( 'AND', $$tree );
- my $lastnode = $root;
my $parentnode = $root;
+ # on new searches, we're passed undef but still need to construct the
+ # RT::Interface::Web::QueryBuilder::Tree. Quiet warning
+ return unless defined $string;
+
# get the FIELDS from Tickets_Overlay
my $tickets = new RT::Tickets( $session{'CurrentUser'} );
my %FIELDS = %{ $tickets->FIELDS };
@@ -339,13 +384,10 @@ my $ParseQuery = sub {
# Error
# FIXME: I will only print out the highest $want value
my $token = $tokens[ ( ( log $want ) / ( log 2 ) ) ];
- push @actions,
+ push @$actions,
[
- loc(
-"current: $current, want $want, Error near ->$val<- expecting a "
- . $token
- . " in '$string'\n"
- ),
+ loc("Error near ->[_1]<- expecting a [_2] in '[_3]'",
+ $val, $token, $string ),
-1
];
}
@@ -364,13 +406,13 @@ my $ParseQuery = sub {
else {
$depth--;
$parentnode = $parentnode->getParent();
- $lastnode = $parentnode;
}
$want = KEYWORD | PAREN | AGGREG;
}
elsif ( $current & AGGREG ) {
$ea = $val;
+ $parentnode->setNodeValue($ea);
$want = KEYWORD | PAREN;
}
elsif ( $current & KEYWORD ) {
@@ -400,20 +442,28 @@ my $ParseQuery = sub {
$val =~ s!\\(.)!$1!g;
my $class;
- if ( exists $lcfields{ lc $key } ) {
- $key = $lcfields{ lc $key };
- $class = $FIELDS{$key}->[0];
+
+ my ($key_base, $subkey) = split(/\./,$key,2);
+ $key_base =~ s/\..*$//; # Strip off .EmailAddress, for example
+
+ if ( exists $lcfields{lc $key_base } ) {
+ $key = $lcfields{lc $key_base } . (defined $subkey ? '.'.$subkey : '');
+ $class = $FIELDS{$key_base}->[0];
+ }
+ elsif ( $key =~ /^C(?:ustom)?F(?:ield)?\.{(.*)}$/i ) {
+ $class = $FIELDS{'CF'}->[0];
}
+
if ( $class ne 'INT' ) {
$val = "'$val'";
}
- push @actions, [ loc("Unknown field: $key"), -1 ] unless $class;
+ push @$actions, [ loc("Unknown field: $key"), -1 ] unless $class;
$want = PAREN | AGGREG;
}
else {
- push @actions, [ loc("I'm lost"), -1 ];
+ push @$actions, [ loc("I'm lost"), -1 ];
}
if ( $current & VALUE ) {
@@ -427,33 +477,40 @@ my $ParseQuery = sub {
};
# explicity add a child to it
- $lastnode = RT::Interface::Web::QueryBuilder::Tree->new( $clause, $parentnode );
- $lastnode->getParent()->setNodeValue($ea);
+ RT::Interface::Web::QueryBuilder::Tree->new( $clause, $parentnode );
( $ea, $key, $op, $value ) = ( "", "", "", "" );
+
}
$last = $current;
} # while
- push @actions, [ loc("Incomplete query"), -1 ]
+ push @$actions, [ loc("Incomplete query"), -1 ]
unless ( ( $want | PAREN ) || ( $want | KEYWORD ) );
- push @actions, [ loc("Incomplete Query"), -1 ]
+ push @$actions, [ loc("Incomplete Query"), -1 ]
unless ( $last && ( $last | PAREN ) || ( $last || VALUE ) );
# This will never happen, because the parser will complain
- push @actions, [ loc("Mismatched parentheses"), -1 ]
+ push @$actions, [ loc("Mismatched parentheses"), -1 ]
unless $depth == 1;
};
my $tree;
-$ParseQuery->( $Query, \$tree, \@actions );
-
-# if parsing went poorly, send them to the edit page to fix it
-if ( $actions[0] ) {
- $m->comp( "Edit.html", Query => $Query, actions => \@actions );
- $m->abort();
+{
+ my @parsing_errors;
+ $ParseQuery->( $Query, \$tree, \@parsing_errors );
+
+ # if parsing went poorly, send them to the edit page
+ # to fix it
+ if ( @parsing_errors ) {
+ return $m->comp(
+ "Edit.html",
+ Query => $Query,
+ actions => \@parsing_errors
+ );
+ }
}
$Query = "";
@@ -583,7 +640,7 @@ elsif ( $ARGS{"Toggle"} ) {
# {{{ Try to find if we're adding a clause
foreach my $arg ( keys %ARGS ) {
if (
- $arg =~ m/^ValueOf(.+)/
+ $arg =~ m/^ValueOf(\w+|'CF.{.*?}')$/
&& ( ref $ARGS{$arg} eq "ARRAY"
? grep { $_ ne "" } @{ $ARGS{$arg} }
: $ARGS{$arg} ne "" )
@@ -695,77 +752,6 @@ my ( $AvailableColumns, $CurrentFormat );
# }}}
-# {{{ if we're asked to save the current search, save it
-if ( $ARGS{'Save'} ) {
-
- if ( $search && $search->id ) {
-
- # This search is based on a previously loaded search -- so
- # just update the current search object with new values
- $search->SetSubValues(
- Format => $Format,
- Query => $Query,
- Order => $Order,
- OrderBy => $OrderBy,
- RowsPerPage => $RowsPerPage,
- );
- $search->SetDescription($Description);
-
- }
- elsif ( $SearchId eq 'new' && $ARGS{'Owner'} =~ /^(.*?)-(\d+)$/ ) {
-
- # We're saving a new search
- my $obj_type = $1;
- my $obj_id = $2;
-
- # Find out if we're saving on the user, or a group
- my $container_object;
- if ( $obj_type eq 'RT::User' && $obj_id == $session{'CurrentUser'}->Id )
- {
- $container_object = $session{'CurrentUser'}->UserObj;
- }
- elsif ( $obj_type eq 'RT::Group' ) {
- $container_object = RT::Group->new( $session{'CurrentUser'} );
- $container_object->Load($obj_id);
- }
-
- if ( $container_object->id ) {
-
- # If we got one or the other, add the saerch
- my ( $search_id, $search_msg ) = $container_object->AddAttribute(
- Name => 'SavedSearch',
- Description => $Description,
- Content => {
- Format => $Format,
- Query => $Query,
- Order => $Order,
- OrderBy => $OrderBy,
- RowsPerPage => $RowsPerPage,
- }
- );
- $search =
- $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
-
- # Build new SearchId
- $SearchId =
- ref( $session{'CurrentUser'}->UserObj ) . '-'
- . $session{'CurrentUser'}->UserObj->Id
- . '-SavedSearch-'
- . $search->Id;
- }
- unless ( $search->id ) {
- push @actions, [ loc("Can't find a saved search to work with"), 0 ];
- }
-
- }
- else {
- push @actions, [ loc("Can't save this search"), 0 ];
- }
-
-}
-
-# }}}
-
# {{{ If we're modifying an old query, check if it has changed
my $dirty = 0;
$dirty = 1
@@ -793,7 +779,7 @@ $session{'CurrentSearchHash'} = $search_hash;
# }}}
# {{{ Show the results, if we were asked.
-if ( $ARGS{"DoSearch"} ) {
+if ( $ARGS{"DoSearch"}) {
$m->comp(
"Results.html",
Query => $Query,
@@ -802,6 +788,7 @@ if ( $ARGS{"DoSearch"} ) {
OrderBy => $OrderBy,
Rows => $RowsPerPage
);
+ $m->comp('/Elements/Footer');
$m->abort();
}
diff --git a/rt/html/Search/Chart b/rt/html/Search/Chart
new file mode 100644
index 000000000..ea52bb1f9
--- /dev/null
+++ b/rt/html/Search/Chart
@@ -0,0 +1,148 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Query => "id > 0"
+$PrimaryGroupBy => 'Queue'
+$SecondaryGroupBy => undef
+$ChartStyle => 'bars'
+</%args>
+<%init>
+my @keys;
+my @values;
+my $chart_class;
+use GD;
+use GD::Text;
+
+if ($ChartStyle eq 'pie') {
+ require GD::Graph::pie;
+ $chart_class = "GD::Graph::pie";
+} else {
+ require GD::Graph::bars;
+ $chart_class = "GD::Graph::bars";
+}
+
+use RT::Report::Tickets;
+my $tix = RT::Report::Tickets->new( $session{'CurrentUser'} );
+$tix->FromSQL( $Query );
+my $count_name = $tix->Column( FUNCTION => 'COUNT', FIELD => 'id' );
+$tix->GroupBy( FIELD => $PrimaryGroupBy );
+my $value_name = $tix->Column( FIELD => $PrimaryGroupBy );
+
+my $chart = $chart_class->new( 600 => 400 );
+if ($chart_class eq "GD::Graph::bars") {
+ $chart->set(
+ x_label => $tix->Label( $PrimaryGroupBy ),
+ x_labels_vertical => 1,
+ y_label => 'Tickets',
+ show_values => 1
+ );
+ $chart->set_legend_font( ['verdana', 'arial', gdMediumBoldFont], 12);
+}
+
+my %class = (
+ Queue => 'RT::Queue',
+ Owner => 'RT::User',
+);
+my $class = $class{ $PrimaryGroupBy };
+
+while ( my $entry = $tix->Next ) {
+ if ( $class ) {
+ my $q = $class->new( $session{'CurrentUser'} );
+ $q->Load( $entry->__Value( $value_name ) );
+ push @keys, $q->Name;
+ }
+ else {
+ push @keys, $entry->__Value($value_name);
+ }
+
+ $keys[-1] ||= loc('(no value)');
+ if ($chart_class eq 'GD::Graph::pie') {
+ $keys[-1] .= " - ". $entry->__Value( $count_name );
+ }
+ push @values, $entry->__Value($count_name);
+}
+
+# XXX: Convert 1970-01-01 date to the 'Not Set'
+# this code should be generalized!!!
+if ( $PrimaryGroupBy =~ /(Daily|Monthly|Annually)$/ ) {
+ my $re;
+ $re = qr{1970-01-01} if $PrimaryGroupBy =~ /Daily$/;
+ $re = qr{1970-01} if $PrimaryGroupBy =~ /Monthly$/;
+ $re = qr{1970} if $PrimaryGroupBy =~ /Annually$/;
+ foreach (@keys) {
+ s/^$re/loc('Not Set')/e;
+ }
+}
+
+unless (@keys && @values) {
+ @keys = ('');
+ @values = (0);
+}
+
+my %data;
+foreach my $key (@keys) { $data{$key} = shift @values; }
+my @sorted_keys = sort @keys;
+my @sorted_values = map { $data{$_}} @sorted_keys;
+
+
+
+my $plot = $chart->plot( [ [@sorted_keys], [@sorted_values] ] ) or die $chart->error;
+
+if ( $plot->can('png') ) {
+ $r->content_type('image/png');
+ $m->out( $plot->png );
+}
+elsif ( $plot->can('gif') ) {
+ $r->content_type('image/gif');
+ $m->out( $plot->gif );
+}
+else {
+ die "Your GD library appears to support neither PNG nor GIF";
+}
+$m->abort();
+</%init>
diff --git a/rt/html/Search/Chart.html b/rt/html/Search/Chart.html
new file mode 100644
index 000000000..a07d89502
--- /dev/null
+++ b/rt/html/Search/Chart.html
@@ -0,0 +1,73 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Query => "id > 0"
+$PrimaryGroupBy => 'Queue'
+$SecondaryGroupBy => ''
+$ChartStyle => 'bars'
+$Description => undef
+</%args>
+<%init>
+$ARGS{SecondaryGroupBy} ||= '';
+
+my $title = loc( "Search results grouped by [_1]", $PrimaryGroupBy );
+
+my $saved_search = $m->comp( '/Widgets/SavedSearch:new',
+ SearchType => 'Chart',
+ SearchFields => [qw(Query PrimaryGroupBy SecondaryGroupBy ChartStyle)] );
+
+my @actions = $m->comp( '/Widgets/SavedSearch:process', args => \%ARGS, self => $saved_search );
+
+</%init>
+<& /Elements/Header, Title => $title &>
+<& /Ticket/Elements/Tabs, Title => $title &>
+<& /Elements/ListActions, actions => \@actions &>
+<& /Search/Elements/Chart, %ARGS &>
+
+
+<& /Widgets/SavedSearch:show, %ARGS, Action => 'Chart.html', self => $saved_search, Title => 'Saved charts' &>
diff --git a/rt/html/Search/Edit.html b/rt/html/Search/Edit.html
index 16e8a0e71..21df0db97 100755
--- a/rt/html/Search/Edit.html
+++ b/rt/html/Search/Edit.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -56,11 +58,11 @@
<& Elements/NewListActions, actions => \@actions &>
<form method="post" action="Build.html">
-<input type="hidden" name="SearchId" value="<%$SearchId%>">
+<input type="hidden" class="hidden" name="SearchId" value="<%$SearchId%>" />
<textarea name="Query" rows="8" cols="72"><%$Query%></textarea>
-<br>
+<br />
<textarea name="Format" rows="8" cols="72"><%$Format%></textarea>
-<br>
+<br />
<& /Elements/Submit, Label => loc("Apply"), Reset => 1, Caption => loc("Apply your changes")&>
</form>
diff --git a/rt/html/Search/Elements/BuildFormatString b/rt/html/Search/Elements/BuildFormatString
index cffb81a48..3bd39b5c2 100644
--- a/rt/html/Search/Elements/BuildFormatString
+++ b/rt/html/Search/Elements/BuildFormatString
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -171,12 +173,12 @@ elsif ( $AddCol ) {
$column{Column} = $col;
if ( $Face eq "Bold" ) {
- $column{Prefix} .= "<B>";
- $column{Suffix} .= "</B>";
+ $column{Prefix} .= "<b>";
+ $column{Suffix} .= "</b>";
}
if ( $Face eq "Italic" ) {
- $column{Prefix} .= "<I>";
- $column{Suffix} .= "</I>";
+ $column{Prefix} .= "<i>";
+ $column{Suffix} .= "</i>";
}
if ($Size) {
$column{Prefix} .= "<" . $m->interp->apply_escapes( $Size, 'h' ) . ">";
@@ -184,11 +186,11 @@ elsif ( $AddCol ) {
}
if ( $Link eq "Display" ) {
$column{Prefix} .=
- "<A HREF=\"" . $RT::WebPath . "/Ticket/Display.html?id=__id__\">";
+ "<a HREF=\"" . $RT::WebPath . "/Ticket/Display.html?id=__id__\">";
$column{Suffix} .= "</a>";
}
elsif ( $Link eq "Take" ) {
- $column{Prefix} .= "<A HREF=\"" . $RT::WebPath
+ $column{Prefix} .= "<a HREF=\"" . $RT::WebPath
. "/Ticket/Display.html?Action=Take&id=__id__\">";
$column{Suffix} .= "</a>";
}
@@ -223,10 +225,13 @@ elsif ( $ColDown ) {
my @format_string;
foreach my $field (@seen) {
next unless $field;
- my $row = "'" . $field->{Prefix};
- $row .= "__" . $m->interp->apply_escapes( $field->{Column}, 'h' ) . "__"
+ my $row = "'";
+ $row .= $field->{Prefix} if $field->{Prefix};
+ $row .= "__" . ($field->{Column} =~ m/\(/ ? $field->{Column} # func, don't escape
+ : $m->interp->apply_escapes( $field->{Column}, 'h' )) . "__"
unless ( $field->{Column} eq "<blank>" );
- $row .= $field->{Suffix} . "'";
+ $row .= $field->{Suffix} if $field->{Suffix};
+ $row .= "'";
push( @format_string, $row );
}
diff --git a/rt/html/Search/Elements/Chart b/rt/html/Search/Elements/Chart
new file mode 100644
index 000000000..2eca6afda
--- /dev/null
+++ b/rt/html/Search/Elements/Chart
@@ -0,0 +1,139 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Query => "id > 0"
+$PrimaryGroupBy => 'Queue'
+$SecondaryGroupBy => undef
+$ChartStyle => 'bars'
+</%args>
+<%init>
+use RT::Report::Tickets;
+my $tix = RT::Report::Tickets->new( $session{'CurrentUser'} );
+$tix->FromSQL( $Query );
+my $count_name = $tix->Column( FUNCTION => 'COUNT', FIELD => 'id' );
+$tix->GroupBy( FIELD => $PrimaryGroupBy );
+my $value_name = $tix->Column( FIELD => $PrimaryGroupBy );
+
+my %class = (
+ Queue => 'RT::Queue',
+ Owner => 'RT::User',
+);
+my $class = $class{ $PrimaryGroupBy };
+
+my (@keys, @values);
+while ( my $entry = $tix->Next ) {
+ if ($class) {
+ my $q = $class->new( $session{'CurrentUser'} );
+ $q->Load( $entry->__Value( $value_name ) );
+ push @keys, $q->Name;
+ }
+ else {
+ push @keys, $entry->__Value( $value_name );
+ }
+ $keys[-1] ||= loc('(no value)');
+ push @values, $entry->__Value( $count_name );
+}
+
+# XXX: Convert 1970-01-01 date to the 'Not Set'
+# this code should be generalized!!!
+if ( $PrimaryGroupBy =~ /(Daily|Monthly|Annually)$/ ) {
+ my $re;
+ $re = qr{1970-01-01} if $PrimaryGroupBy =~ /Daily$/;
+ $re = qr{1970-01} if $PrimaryGroupBy =~ /Monthly$/;
+ $re = qr{1970} if $PrimaryGroupBy =~ /Annually$/;
+ foreach (@keys) {
+ s/^$re/loc('Not Set')/e;
+ }
+}
+
+my %data;
+foreach my $key (@keys) { $data{$key} = shift @values; }
+my @sorted_keys = sort @keys;
+my @sorted_values = map { $data{$_}} @sorted_keys;
+
+
+my $query_string = $m->comp('/Elements/QueryString', %ARGS);
+</%init>
+
+<% loc('Query:') %>&nbsp;<% $Query %><br />
+
+<img src="<%$RT::WebPath%>/Search/Chart?<%$query_string|n%>" /><br />
+
+<table class="collection-as-table">
+<tr>
+<th class="collection-as-table"><% $tix->Label($PrimaryGroupBy) %>
+</th>
+<th class="collection-as-table"><&|/l&>Tickets</&>
+</th>
+</tr>
+% my ($i,$total);
+% while (my $key = shift @sorted_keys) {
+% $i++;
+% my $value = shift @sorted_values;
+% $total += $value;
+<tr class="<%$i%2 ? 'evenline' : 'oddline' %>">
+<td class="label collection-as-table">
+<%$key%>
+</td>
+<td class="value collection-as-table">
+<%$value%>
+</td>
+</tr>
+% }
+
+%$i++;
+<tr class="<%$i%2 ? 'evenline' : 'oddline' %>">
+<td class="label collection-as-table">
+<%loc('Total')%>
+</td>
+<td class="value collection-as-table">
+<%$total%>
+</td>
+</tr>
+
+</table>
diff --git a/rt/html/Search/Elements/DisplayOptions b/rt/html/Search/Elements/DisplayOptions
index 43a9d9998..4bed0902b 100644
--- a/rt/html/Search/Elements/DisplayOptions
+++ b/rt/html/Search/Elements/DisplayOptions
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,43 +45,53 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc("Display Columns") &>
+<&| /Widgets/TitleBox, title => loc("Display Columns") &>
<table>
<tr>
<td>
<& EditFormat, %ARGS &>
</td>
-<td valign=top>
-<table valign=top>
+<td valign="top">
+<table valign="top">
+
+% for my $o (0..3) {
<tr>
-<td class=label>
+<td class="label">
+% if ($o == 0) {
<&|/l&>Order by</&>:
-</td><td class=value>
+% }
+</td>
+<td class="value">
<select name="OrderBy">
-% foreach my $field (keys %fields) {
+% if ($o > 0) {
+<option value="">[none]</option>
+% }
+% foreach my $field (sort keys %fields) {
% next unless $field;
-<option value=<%$field%>
-% if ($field =~ /^$OrderBy$/i) {
-SELECTED
+<option value="<%$field%>"
+% if (defined $OrderBy[$o] and $field eq $OrderBy[$o]) {
+selected
% }
><&|/l&><%$field%></&></option>
% }
</select>
<select name="Order">
<option value="ASC"
-% if ($Order eq "ASC") {
-SELECTED
+% unless ( ($Order[$o]||'') eq "DESC" ) {
+selected
% }
-><&|/l&>Ascending</&></option>
+><&|/l&>Asc</&></option>
<option value="DESC"
-% if ($Order eq "DESC") {
-SELECTED
+% if ( ($Order[$o]||'') eq "DESC" ) {
+selected
% }
-><&|/l&>Descending</&></option>
+><&|/l&>Desc</&></option>
</select>
</td>
</tr>
-<td class=label>
+% }
+<tr>
+<td class="label">
<&|/l&>Rows per page</&>:
</td><td class="value">
<& /Elements/SelectResultsPerPage,
@@ -91,14 +103,34 @@ SELECTED
</td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
+</&>
<%INIT>
my $tickets = new RT::Tickets($session{'CurrentUser'});
my %fields = %{$tickets->FIELDS};
map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING)$/ || delete $fields{$_} } keys %fields;
delete $fields{'EffectiveId'};
+$fields{ $_ . '.EmailAddress' } = 1 foreach( qw(Requestor Cc AdminCc) );
+
+# Add all available CustomFields to the list of sortable columns.
+my @cfs = grep /^CustomField/, @{$ARGS{AvailableColumns}};
+$fields{$_}=1 for @cfs;
+
+# Add PAW sort
+$fields{'Custom.Ownership'} = 1;
+my @Order;
+my @OrderBy;
+if ($OrderBy =~ /\|/) {
+ @OrderBy = split /\|/, $OrderBy;
+} else {
+ @OrderBy = ( $OrderBy );
+}
+if ($Order =~ /\|/) {
+ @Order = split /\|/, $Order;
+} else {
+ @Order = ( $Order );
+}
</%INIT>
@@ -107,4 +139,5 @@ $Order => undef
$OrderBy => undef
$RowsPerPage => undef
$Format => undef
+$GroupBy => 'id'
</%ARGS>
diff --git a/rt/html/Search/Elements/EditFormat b/rt/html/Search/Elements/EditFormat
index dc8720f26..fa0ac96e0 100644
--- a/rt/html/Search/Elements/EditFormat
+++ b/rt/html/Search/Elements/EditFormat
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -56,7 +58,7 @@
<&|/l&>Show Columns</&>:
</td>
<tr>
-<td valign=top>
+<td valign="top">
<select size="6" name="SelectDisplayColumns" multiple>
% foreach my $field ( @$AvailableColumns) {
<option value="<%$field%>"><% loc( $field) %></option>
@@ -71,14 +73,14 @@
<option value="Display"><&|/l&>Display</&></option>
<option value="Take"><&|/l&>Take</&></option>
</select>
-<br><&|/l&>Title</&>: <input name="Title" size=10>
-<br><&|/l&>Size</&>:
+<br /><&|/l&>Title</&>: <input name="Title" size="10" />
+<br /><&|/l&>Size</&>:
<select name="Size">
<option value="">-</option>
<option value="Small"><&|/l&>Small</&></option>
<option value="Large"><&|/l&>Large</&></option>
</select>
-<br><&|/l&>Style</&>:
+<br /><&|/l&>Style</&>:
<select name="Face">
<option value="">-</option>
<option value="Bold"><&|/l&>Bold</&></option>
@@ -86,24 +88,24 @@
</select>
</td>
<td>
-<input type=submit name="AddCol" value="->">
+<input type="submit" class="button" name="AddCol" value=" &rarr; " />
</td>
-<td valign=top>
-<select size=4 name="CurrentDisplayColumns">
+<td valign="top">
+<select size="4" name="CurrentDisplayColumns">
% my $i=0;
% foreach my $field (@$CurrentFormat) {
<option value="<%$i++%>><%$field->{Column}%>">
<%loc( $field->{Column}) %></option>
% }
</select>
-<br>
+<br />
<center>
-<input type="submit" name="ColUp" value="^">
-<input type="submit" name="ColDown" value="v">
-<input type="submit" name="RemoveCol" value="<%loc('Delete')%>">
+<input type="submit" class="button" name="ColUp" value=" &uarr; " />
+<input type="submit" class="button" name="ColDown" value=" &darr; " />
+<input type="submit" class="button" name="RemoveCol" value="<%loc('Delete')%>" />
</center>
</td>
-<td colspan=3 align=center>
+<td colspan="3" align="center">
</td>
</tr>
</table>
diff --git a/rt/html/Search/Elements/EditQuery b/rt/html/Search/Elements/EditQuery
index 783541a64..5c40c2573 100644
--- a/rt/html/Search/Elements/EditQuery
+++ b/rt/html/Search/Elements/EditQuery
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,20 +46,20 @@
%#
%# END BPS TAGGED BLOCK }}}
<& NewListActions, actions => $actions &>
-<& /Elements/TitleBoxStart, title => join(': ', grep defined, loc("Query"), $Description) &>
+<&|/Widgets/TitleBox, title => join(': ', grep defined, loc("Current search"), $Description) &>
<select size="10" name="clauses" style="width: 100%" multiple>
% $m->out($optionlist);
</select>
<p align="center">
-<input type=submit name="Up" value="^">
-<input type=submit name="Down" value="v">
-<input type=submit name="Left" value="<">
-<input type=submit name="Right" value=">">
-<input type=submit name="Toggle" value="<&|/l&>And/Or</&>">
-<input type=submit name="DeleteClause" value="<&|/l&>Delete</&>">
-%#<input type=submit name="EditQuery" value="Advanced">
+<input type="submit" class="button" name="Up" value=" &uarr; " />
+<input type="submit" class="button" name="Down" value=" &darr; " />
+<input type="submit" class="button" name="Left" value=" &larr; " />
+<input type="submit" class="button" name="Right" value=" &rarr; " />
+<input type="submit" class="button" name="Toggle" value="<&|/l&>And/Or</&>" />
+<input type="submit" class="button" name="DeleteClause" value="<&|/l&>Delete</&>" />
+%#<input type="submit" class="button" name="EditQuery" value="Advanced" />
</p>
-<& /Elements/TitleBoxEnd &>
+</&>
<%ARGS>
$Description
$optionlist
diff --git a/rt/html/Search/Elements/EditSearches b/rt/html/Search/Elements/EditSearches
index bc6b80e6f..9ab9f944d 100644
--- a/rt/html/Search/Elements/EditSearches
+++ b/rt/html/Search/Elements/EditSearches
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,62 +45,59 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc('Saved searches') &>
+<&| /Widgets/TitleBox, title => loc($Title)&>
%# Hide all the save functionality if the user shouldn't see it.
% if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch',
% Object=> $RT::System )) {
<&|/l&>Privacy:</&>
% if ($CurrentSearch->{'Object'} && $CurrentSearch->{'Object'}->id) {
-<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &><br>
+<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &><br />
% } else {
-<& SelectSearchObject, Name => 'Owner', Objects => \@Objects &><br>
+<& SelectSearchObject, Name => 'Owner', Objects => \@Objects &><br />
% }
<&|/l&>Description</&>:<br>
-<font size="-1"><input size="25" name="Description" value="<%$CurrentSearch->{'Description'}%>"></font>
+<font size="-1"><input size="25" name="Description" value="<%$CurrentSearch->{'Description'} || ''%>" /></font>
<nobr>
% if ($SearchId ne 'new') {
% if ($Dirty) {
-<input type="submit" name="Revert" value="<%loc('Revert')%>">
+<input type="submit" class="button" name="Revert" value="<%loc('Revert')%>" />
% }
-<input type="submit" name="Delete" value="<%loc('Delete')%>">
-<input type="submit" name="CopySearch" value="<%loc('Copy')%>">
-</nobr>
-
+<input type="submit" class="button" name="Delete" value="<%loc('Delete')%>" />
+% if ($AllowCopy) {
+<input type="submit" class="button" name="CopySearch" value="<%loc('Copy')%>" />
% }
+</nobr>
-% if ($Dirty or $SearchId eq 'new') {
-<input type="submit" name="Save" value="<%loc('Save')%>">
% }
-<hr>
+<input type="submit" name="Save" value="<%loc('Save')%>" class="button" />
+<hr />
% }
-<&|/l&>Load saved search:</&><br>
-<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects&>
-<input value="<%loc('Load')%>" type="submit">
-<& /Elements/TitleBoxEnd &>
+<&|/l&>Load saved search:</&><br />
+<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects, SearchType => $SearchType &>
+<input value="<%loc('Load')%>" type="submit" class="button" />
+</&>
<%init>
-
unless ($session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch',
- Object=> $RT::System )) {
+ Object=> $RT::System )) {
return;
}
-my @Objects;
-
-push @Objects, $session{CurrentUser}->UserObj;
-
-my $groups = RT::Groups->new($session{'CurrentUser'});
-$groups->LimitToUserDefinedGroups;
-$groups->WithMember(PrincipalId => $session{'CurrentUser'}->Id,
- Recursively => 1);
+use RT::SavedSearches;
+my @Objects = RT::SavedSearches->new($session{CurrentUser})->_PrivacyObjects;
+push @Objects, RT::System->new($session{'CurrentUser'})
+ if $session{'CurrentUser'}->HasRight( Object=> $RT::System,
+ Right => 'SuperUser');
- push (@Objects, @{$groups->ItemsArrayRef()});
</%INIT>
<%ARGS>
+$SearchType => 'Ticket'
$SearchId => undef
$CurrentSearch => undef
$Description => undef
$HideResults => 0
$Dirty => 0
+$AllowCopy => 1
+$Title => 'Saved searches'
</%ARGS>
diff --git a/rt/html/Search/Elements/NewListActions b/rt/html/Search/Elements/NewListActions
index eb82544f3..535ac8cb9 100644
--- a/rt/html/Search/Elements/NewListActions
+++ b/rt/html/Search/Elements/NewListActions
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,19 +46,19 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ($actions[0] ) {
-<b><%loc('Results')%></b><br>
+<b><%loc('Results')%></b><br />
% foreach my $action (@actions) {
% next unless ($action);
% my @item = @$action;
% if ($item[1] < 0) {
-<font color=red>
+<font color="red">
% }
-&nbsp;<%$item[0]%><BR>
+&nbsp;<%$item[0]%><br />
% if ($item[1] < 0) {
</font>
% }
% }
-<BR>
+<br />
% }
<%init>
@actions = grep (/./,@actions);
diff --git a/rt/html/Search/Elements/PickBasics b/rt/html/Search/Elements/PickBasics
index 8a48f6b18..44a378c14 100644
--- a/rt/html/Search/Elements/PickBasics
+++ b/rt/html/Search/Elements/PickBasics
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,11 +51,11 @@
</td><td>
<& /Elements/SelectEqualityOperator, Name => "idOp" &>
</td><td>
-<INPUT Name="ValueOfid" SIZE=5>
+<input name="ValueOfid" size="5" />
</td>
</tr>
-<tr><td align=right>
+<tr><td>
<& /Elements/SelectAttachmentField, Name => 'AttachmentField' &>
</td><td>
<& /Elements/SelectBoolean, Name => "AttachmentOp",
@@ -63,7 +65,7 @@
FalseVal => 'NOT LIKE'
&>
</td><td>
-<Input Name="ValueOfAttachment" Size=20>
+<input name="ValueOfAttachment" size="20" />
</td>
</tr>
<tr>
@@ -97,11 +99,11 @@
</td>
</tr>
<tr><td class="label">
-<SELECT NAME="ActorField">
-<OPTION VALUE="Owner"><&|/l&>Owner</&></OPTION>
-<OPTION VALUE="Creator"><&|/l&>Creator</&></OPTION>
-<OPTION VALUE="LastUpdatedBy"><&|/l&>LastUpdatedBy</&></OPTION>
-</SELECT>
+<select name="ActorField">
+<option value="Owner"><&|/l&>Owner</&></option>
+<option value="Creator"><&|/l&>Creator</&></option>
+<option value="LastUpdatedBy"><&|/l&>LastUpdatedBy</&></option>
+</select>
</td><td>
<& /Elements/SelectBoolean, Name => "ActorOp",
TrueVal=> '=',
@@ -117,21 +119,7 @@
</td><td>
<& /Elements/SelectMatch, Name => "WatcherOp" &>
</td><td>
-<Input Name="ValueOfWatcher" Size=20>
-</tr>
-<tr>
-<td class="label">
-<& SelectPersonType, Name => 'WatcherGroupField', Default => 'RequestorGroup', Suffix => 'Group' &>
-</td><td>
-<& /Elements/SelectBoolean, Name => "WatcherGroupOp",
- True=> loc('belongs to'),
- False=> loc('does not belong to'),
- TrueVal=> '=',
- FalseVal => '!='
-&>
-</td><td>
-<& SelectGroup, Name => 'ValueOfWatcherGroup' &>
-</td>
+<input name="ValueOfWatcher" size="20" />
</tr>
<tr>
<td class="label">
@@ -143,28 +131,29 @@
</td></tr>
<tr>
<td class="label">
-<SELECT NAME="TimeField">
-<OPTION VALUE="TimeWorked"><&|/l&>Time Worked</&></OPTION>
-<OPTION VALUE="TimeEstimated"><&|/l&>Time Estimated</&></OPTION>
-<OPTION VALUE="TimeLeft"><&|/l&>Time Left</&></OPTION>
-</SELECT>
+<select name="TimeField">
+<option value="TimeWorked"><&|/l&>Time Worked</&></option>
+<option value="TimeEstimated"><&|/l&>Time Estimated</&></option>
+<option value="TimeLeft"><&|/l&>Time Left</&></option>
+</select>
</td><td>
<& /Elements/SelectEqualityOperator, Name => "TimeOp" &>
</td><td>
-<INPUT Name="ValueOfTime" SIZE=5>
+<input name="ValueOfTime" size="5" />
+<& /Elements/SelectTimeUnits, Name =>'ValueOfTime' &>
</td>
</tr>
<tr>
<td class="label">
-<SELECT NAME="PriorityField">
-<OPTION VALUE="Priority"><&|/l&>Priority</&></OPTION>
-<OPTION VALUE="InitialPriority"><&|/l&>Initial Priority</&></OPTION>
-<OPTION VALUE="FinalPriority"><&|/l&>Final Priority</&></OPTION>
-</SELECT>
+<select name="PriorityField">
+<option value="Priority"><&|/l&>Priority</&></option>
+<option value="InitialPriority"><&|/l&>Initial Priority</&></option>
+<option value="FinalPriority"><&|/l&>Final Priority</&></option>
+</select>
</td><td>
<& /Elements/SelectEqualityOperator, Name => "PriorityOp" &>
</td><td>
-<INPUT Name="ValueOfPriority" SIZE=5>
+<input name="ValueOfPriority" size="5" />
</td>
</tr>
<tr>
@@ -177,7 +166,7 @@
TrueVal=> '=',
FalseVal => '!=' &>
</td><td>
-<INPUT Name="ValueOfLinks" value="" SIZE=5>
+<input name="ValueOfLinks" value="" size="5" />
</td></tr>
<%INIT>
my @people = ('Actor',
diff --git a/rt/html/Search/Elements/PickCFs b/rt/html/Search/Elements/PickCFs
index 435a07ad3..734f5f871 100644
--- a/rt/html/Search/Elements/PickCFs
+++ b/rt/html/Search/Elements/PickCFs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Search/Elements/PickCriteria b/rt/html/Search/Elements/PickCriteria
index 129344443..58b29fb57 100644
--- a/rt/html/Search/Elements/PickCriteria
+++ b/rt/html/Search/Elements/PickCriteria
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,12 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc('Add Criteria')&>
-<table width=100% cellspacing=0 cellpadding=0 border=0>
+<&| /Widgets/TitleBox, title => loc('Add Criteria')&>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
- <table cellspacing=0 border=0>
- <tr><td class=label>
+ <table cellspacing="0" border="0">
+ <tr><td class="label">
<&|/l&>Aggregator</&>:
</td>
<td><& SelectAndOr, Name => "AndOr" &>
@@ -61,8 +63,8 @@
</td>
</tr>
<tr>
- <td valign=top>
- <table cellspacing=0 border=0>
+ <td valign="top">
+ <table cellspacing="0" border="0">
<& PickBasics &>
<& PickCFs, cfqueues => \%cfqueues &>
</table>
@@ -71,7 +73,7 @@
<tr><td>&nbsp;</td></tr>
</table>
-<& /Elements/TitleBoxEnd &>
+</&>
<%ARGS>
$addquery => 0
diff --git a/rt/html/Search/Elements/SearchPrivacy b/rt/html/Search/Elements/SearchPrivacy
index 270e1baa3..745ba62ac 100644
--- a/rt/html/Search/Elements/SearchPrivacy
+++ b/rt/html/Search/Elements/SearchPrivacy
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Search/Elements/SearchesForObject b/rt/html/Search/Elements/SearchesForObject
new file mode 100644
index 000000000..45aa4535e
--- /dev/null
+++ b/rt/html/Search/Elements/SearchesForObject
@@ -0,0 +1,65 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Object => undef
+</%args>
+<%init>
+# Returns an array of search objects associated on $Object,
+# in the form of [Description, searchObj]
+my @result;
+while (my $search = $Object->Attributes->Next) {
+ my $desc;
+ if ($search->Name eq 'SavedSearch') {
+ push @result, [$search->Description, $search];
+ }
+ elsif ($search->Name =~ m/^Search - (.*)/) {
+ push @result, [$1, $search];
+ }
+}
+return @result;
+</%init>
diff --git a/rt/html/Search/Elements/SelectAndOr b/rt/html/Search/Elements/SelectAndOr
index 2f3c70477..c8122660a 100644
--- a/rt/html/Search/Elements/SelectAndOr
+++ b/rt/html/Search/Elements/SelectAndOr
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,8 +45,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<input type=radio NAME="<%$Name%>" CHECKED VALUE="AND"><&|/l&>AND</&></input>
-<input type=radio NAME="<%$Name%>" VALUE="OR"><&|/l&>OR</&></input>
+<input type="radio" class="radio" name="<%$Name%>" checked value="AND" /><&|/l&>AND</&></input>
+<input type="radio" class="radio" name="<%$Name%>" value="OR" /><&|/l&>OR</&></input>
<%ARGS>
$Name => "Operator"
diff --git a/rt/html/Search/Elements/SelectChartType b/rt/html/Search/Elements/SelectChartType
new file mode 100644
index 000000000..43a6182bf
--- /dev/null
+++ b/rt/html/Search/Elements/SelectChartType
@@ -0,0 +1,56 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Name => 'ChartType'
+$Default => 'bar'
+</%args>
+<select name="<%$Name%>">
+% foreach my $option qw(bar pie) {
+<option value="<%$option%>" <% $option eq $Default ? 'SELECTED' : '' %>><%loc($option)%></option>
+% }
+</select>
diff --git a/rt/html/Search/Elements/SelectGroup b/rt/html/Search/Elements/SelectGroup
index edd53713f..3f78d3964 100644
--- a/rt/html/Search/Elements/SelectGroup
+++ b/rt/html/Search/Elements/SelectGroup
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,14 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
% if ($AllowNull) {
-<OPTION VALUE="">-</OPTION>
+<option value="">-</option>
% }
%while (my $group = $groups->Next) {
-<OPTION VALUE="<%$group->id%>" <%$group->id eq $Default && "SELECTED"%>><%$group->Name%></OPTION>
+<option value="<%$group->id%>" <%$group->id eq $Default && "SELECTED"%>><%$group->Name%></option>
%}
-</SELECT>
+</select>
<%INIT>
my $groups = new RT::Groups($session{'CurrentUser'});
diff --git a/rt/html/Search/Elements/SelectGroupBy b/rt/html/Search/Elements/SelectGroupBy
new file mode 100644
index 000000000..0ffb5e453
--- /dev/null
+++ b/rt/html/Search/Elements/SelectGroupBy
@@ -0,0 +1,63 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Name => 'GroupBy'
+$Default => 'Status'
+$Query => ''
+</%args>
+<select name="<% $Name %>">
+% while (@options) {
+% my ($text, $value) = (shift @options, shift @options);
+<option value="<% $value %>" <% $value eq $Default ? 'selected' : '' %>><% loc($text) %></option>
+% }
+</select>
+<%init>
+use RT::Report::Tickets;
+my $report = RT::Report::Tickets->new( $session{'CurrentUser'} );
+my @options = $report->Groupings( Query => $Query );
+</%init>
diff --git a/rt/html/Search/Elements/SelectLinks b/rt/html/Search/Elements/SelectLinks
index 00ec80bd3..f3586528d 100644
--- a/rt/html/Search/Elements/SelectLinks
+++ b/rt/html/Search/Elements/SelectLinks
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
% foreach (@fields) {
-<OPTION VALUE="<%$_%>"><&|/l&><%$_%></&></OPTION>
+<option value="<%$_%>"><&|/l&><%$_%></&></option>
% }
-</SELECT>
+</select>
<%ARGS>
$Name => 'LinksField'
</%ARGS>
diff --git a/rt/html/Search/Elements/SelectPersonType b/rt/html/Search/Elements/SelectPersonType
index d4127c97b..bc631dbb0 100644
--- a/rt/html/Search/Elements/SelectPersonType
+++ b/rt/html/Search/Elements/SelectPersonType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,20 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% if ($AllowNull) {
-<OPTION VALUE="">-</OPTION>
+<option value="">-</option>
% }
% for my $option (@types) {
% if ($Suffix) {
-<OPTION VALUE="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></OPTION>
+<option value="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></option>
% next;
% }
% foreach my $subtype (@subtypes) {
-<OPTION VALUE="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></OPTION>
+<option value="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></option>
% }
% }
-</SELECT>
+</select>
<%INIT>
my @types;
diff --git a/rt/html/Search/Elements/SelectSearchObject b/rt/html/Search/Elements/SelectSearchObject
index e9df5179f..f52a83372 100644
--- a/rt/html/Search/Elements/SelectSearchObject
+++ b/rt/html/Search/Elements/SelectSearchObject
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Search/Elements/SelectSearchesForObjects b/rt/html/Search/Elements/SelectSearchesForObjects
index e6be66a58..dc8368577 100644
--- a/rt/html/Search/Elements/SelectSearchesForObjects
+++ b/rt/html/Search/Elements/SelectSearchesForObjects
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,6 +48,7 @@
<%args>
@Objects => undef
$Name => undef
+$SearchType => 'Ticket',
</%args>
<select name="<%$Name%>">
% foreach my $object (@Objects) {
@@ -57,9 +60,9 @@ $Name => undef
% }
% my @searches = $object->Attributes->Named('SavedSearch');
% foreach my $search (@searches) {
-% # Skip it if it is not a ticket search.
+% # Skip it if it is not of search type we want.
% next if ($search->SubValue('SearchType')
-% && $search->SubValue('SearchType') ne 'Ticket');
+% && $search->SubValue('SearchType') ne $SearchType);
<option value="<%ref($object)%>-<%$object->id%>-SavedSearch-<%$search->Id%>"> -<%$search->Description||loc('Unnamed search')%></option>
% }
% }
diff --git a/rt/html/Search/Results.html b/rt/html/Search/Results.html
index 5849378a8..917cebfa5 100755
--- a/rt/html/Search/Results.html
+++ b/rt/html/Search/Results.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,7 +45,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &>
+<& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'},
+ RSSAutoDiscovery => $RSSFeedURL &>
<& /Ticket/Elements/Tabs,
current_tab => "Search/Results.html".$QueryString,
Title => $title,
@@ -63,45 +66,82 @@
BaseURL => $RT::WebPath."/Search/Results.html?"
&>
-<div align=right>
-<form method=get action="<%$RT::WebPath%>/Search/Results.html">
-<input type="hidden" name="Query" value="<%$Query%>" />
-<input type="hidden" name="Format" value="<%$Format%>" />
-<input type="hidden" name="HideResults" value="<%$HideResults%>" />
-<input type="hidden" name="Rows" value="<%$Rows%>" />
-<input type="hidden" name="Page" value="<%$Page%>" />
-<input type="hidden" name="OrderBy" value="<%$OrderBy%>" />
-<input type="hidden" name="Order" value="<%$Order%>" />
+% my %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, HideResults => $HideResults, Page => $Page );
+<div align="right">
+<form method="get" action="<%$RT::WebPath%>/Search/Results.html">
+%foreach my $key (keys(%hiddens)) {
+<input type="hidden" class="hidden" name="<%$key%>" value="<%defined($hiddens{$key})?$hiddens{$key}:''%>"/>
+%}
<& /Elements/Refresh, Name => 'TicketsRefreshInterval', Default => $session {'tickets_refresh_interval'} &>
-<input type=submit value="<&|/l&>Go!</&>">
+<input type="submit" class="button" value="<&|/l&>Go!</&>" />
</form>
</div>
-<div align=right>
-<a href="<%$RT::WebPath%>/Search/Bulk.html<%$QueryString%>"><&|/l&>Update multiple tickets</&></a><br>
-<a href="<%$RT::WebPath%>/Search/Results.html<%$QueryString%>"><&|/l&>Bookmarkable link</&></a><br>
+<div align="right">
+<a href="<%$RT::WebPath%>/Search/Bulk.html<%$QueryString%>"><&|/l&>Update multiple tickets</&></a><br />
+<a href="<%$RT::WebPath%>/Search/Results.html<%$QueryString%>"><&|/l&>Bookmarkable link</&></a><br />
<a href="<%$RT::WebPath%>/Search/Results.tsv<%$QueryString%>"><&|/l&>spreadsheet</&></a> |
-<a href="<%$RT::WebPath%>/Search/Results.rdf<%$ShortQueryString%>"><&|/l&>RSS</&></a> |
-<a href="<%$RT::WebPath%>/Tools/Offline.html<%$ShortQueryString%>"><&|/l&>Work offline</&></a><br>
+<a href="<%$RSSFeedURL%>"><&|/l&>RSS</&></a> |
+<a href="<%$RT::WebPath%>/Tools/Offline.html<%$ShortQueryString%>"><&|/l&>Work offline</&></a><br />
+<form method="get" action="<%$RT::WebPath%>/Search/Chart.html"><&|/l&>chart</&>
+% %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order);
+%foreach my $key (keys(%hiddens)) {
+<input type="hidden" class="hidden" name="<%$key%>" value="<%defined($hiddens{$key})?$hiddens{$key}:''%>"/>
+%}
+<&|/l, $m->scomp('Elements/SelectGroupBy', Name => 'PrimaryGroupBy', Query => $Query) &>grouped by [_1]</&>
+<&|/l, $m->scomp('Elements/SelectChartType', Name => 'ChartStyle') &>style: [_1]</&>
+<input type="submit" class="button" value="<%loc('Go')%>" />
+</form>
<& /Elements/Callback, _CallbackName => 'SearchActions', QueryString => $QueryString&>
</div>
<%INIT>
+# Read from user preferences
+my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
+
+# These variables are what define a search_hash; this is also
+# where we give sane defaults.
+$Format ||= $prefs->{'Format'};
+$Order ||= $prefs->{'Order'} || 'ASC';
+$OrderBy ||= $prefs->{'OrderBy'} || 'id';
+
+# Some forms pass in "RowsPerPage" rather than "Rows"
+# We call it RowsPerPage everywhere else.
+
+if ( !defined($Rows) ) {
+ if ( $ARGS{'RowsPerPage'} ) {
+ $Rows = $ARGS{'RowsPerPage'};
+ } elsif ( defined $prefs->{'RowsPerPage'} ) {
+ $Rows = $prefs->{'RowsPerPage'};
+ } else {
+ $Rows = 50;
+ }
+}
+
my ($title, $ticketcount);
$session{'i'}++;
$session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) ;
$session{'tickets'}->FromSQL($Query) if ($Query);
-$session{'tickets'}->OrderBy(FIELD => $OrderBy, ORDER => $Order);
+if ($OrderBy =~ /\|/) {
+ # Multiple Sorts
+ my @OrderBy = split /\|/,$OrderBy;
+ my @Order = split /\|/,$Order;
+ $session{'tickets'}->OrderByCols(
+ map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } } ( 0
+ .. $#OrderBy ) );;
+} else {
+ $session{'tickets'}->OrderBy(FIELD => $OrderBy, ORDER => $Order);
+}
$session{'CurrentSearchHash'} = {
Format => $Format,
Query => $Query,
+ Page => $Page,
Order => $Order,
OrderBy => $OrderBy,
RowsPerPage => $Rows
};
-
if ( $session{'tickets'}->Query()) {
$ticketcount = $session{tickets}->CountAll();
$title = loc('Found [quant,_1,ticket]', $ticketcount);
@@ -116,13 +156,12 @@ my $QueryString = "?".$m->comp('/Elements/QueryString',
OrderBy => $OrderBy,
Order => $Order,
Page => $Page);
-
my $ShortQueryString = "?".$m->comp('/Elements/QueryString', Query => $Query);
+my $RSSFeedURL = "$RT::WebPath/Search/Results.rdf$ShortQueryString";
if ($ARGS{'TicketsRefreshInterval'}) {
$session{'tickets_refresh_interval'} = $ARGS{'TicketsRefreshInterval'};
}
-
</%INIT>
<%CLEANUP>
$session{'tickets'}->PrepForSerialization();
@@ -131,8 +170,8 @@ $session{'tickets'}->PrepForSerialization();
$Query => undef
$Format => undef
$HideResults => 0
-$Rows => 50
+$Rows => undef
$Page => 1
-$OrderBy => 'id'
-$Order => 'ASC'
+$OrderBy => undef
+$Order => undef
</%ARGS>
diff --git a/rt/html/Search/Results.rdf b/rt/html/Search/Results.rdf
index 7cc248306..fe97a314c 100644
--- a/rt/html/Search/Results.rdf
+++ b/rt/html/Search/Results.rdf
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,7 +49,7 @@
my $Tickets = RT::Tickets->new($session{'CurrentUser'});
$Tickets->FromSQL($ARGS{'Query'});
-$r->content_type('application/rdf+xml');
+$r->content_type('application/rss+xml');
diff --git a/rt/html/Search/Results.tsv b/rt/html/Search/Results.tsv
index e6b20481f..bb1907317 100644
--- a/rt/html/Search/Results.tsv
+++ b/rt/html/Search/Results.tsv
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,45 +45,64 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<%ARGS>
+$OrderBy => 'id'
+$Order => 'ASC'
+</%ARGS>
<%INIT>
-my $Tickets = RT::Tickets->new($session{'CurrentUser'});
-$Tickets->FromSQL($ARGS{'Query'});
+my $Tickets = RT::Tickets->new( $session{'CurrentUser'} );
+$Tickets->FromSQL( $ARGS{'Query'} );
+if ( $OrderBy =~ /\|/ ) {
+
+ # Multiple Sorts
+ my @OrderBy = split /\|/, $OrderBy;
+ my @Order = split /\|/, $Order;
+ $Tickets->OrderByCols(
+ map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } }
+ ( 0 .. $#OrderBy ) );
+}
+else {
+ $Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order );
+}
my @rows;
my %known_cfs;
my @attrs = qw( id QueueObj->Name Subject Status TimeEstimated TimeWorked TimeLeft Priority FinalPriority OwnerObj->Name
- Requestors->MemberEmailAddressesAsString DueObj->ISO ToldObj->ISO
- CreatedObj->ISO ResolvedObj->ISO );
+ Requestors->MemberEmailAddressesAsString Cc->MemberEmailAddressesAsString AdminCc->MemberEmailAddressesAsString
+ DueObj->ISO ToldObj->ISO CreatedObj->ISO ResolvedObj->ISO LastUpdatedObj->ISO);
- $r->content_type('application/vnd.ms-excel');
- while ( my $Ticket = $Tickets->Next()) {
- my $row;
- foreach my $attr (@attrs) {
- my $method = '$Ticket->'.$attr.'()';
- $row->{$attr} = eval $method;
+$r->content_type('application/vnd.ms-excel');
+while ( my $Ticket = $Tickets->Next()) {
+ my $row;
+ foreach my $attr (@attrs) {
+ if ($attr =~ /(.*)->ISO$/ and $Ticket->$1->Unix <= 0) {
+ $row->{$attr} = "";
+ } else {
+ my $method = '$Ticket->'.$attr.'()';
+ $row->{$attr} = eval $method;
if ($@) {die "Failed to find $attr - ". $@};
- }
-
- my $cfs = $Ticket->QueueObj->TicketCustomFields();
- while (my $cf = $cfs->Next) {
- my @content;
- my $values = $Ticket->CustomFieldValues($cf->Id);
- while (my $value = $values->Next) {
- push @content, $value->Content;
- }
- $row->{'CustomField-'.$cf->Id} = join(', ',@content);
- if ($row->{'CustomField-'.$cf->Id}) {
- $known_cfs{$cf->Id} = $cf->Name;
- }
}
- push @rows, $row;
-
+ }
+ my $cfs = $Ticket->QueueObj->TicketCustomFields();
+ while (my $cf = $cfs->Next) {
+ my @content;
+ my $values = $Ticket->CustomFieldValues($cf->Id);
+ while (my $value = $values->Next) {
+ push @content, $value->Content;
+ }
+ $row->{'CustomField-'.$cf->Id} = join(', ',@content);
+ if ($row->{'CustomField-'.$cf->Id}) {
+ $known_cfs{$cf->Id} = $cf->Name;
+ }
}
+ push @rows, $row;
+}
+
{
-my @header;
+ my @header;
foreach my $attr (@attrs) {
my $label = $attr;
$label =~ s'Obj-.(?:AsString|Name|ISO)''g;
@@ -89,27 +110,25 @@ my @header;
push @header, $label;
}
foreach my $id (sort keys %known_cfs) {
- push @header, $known_cfs{$id};
+ push @header, "CF-".$known_cfs{$id};
}
-
-$m->out(join("\t", @header));
-$m->out("\n");
+ $m->out(join("\t", @header));
+ $m->out("\n");
}
+
foreach my $row (@rows) {
- my @row;
- foreach my $attr(@attrs) {
- push @row, $row->{"$attr"};
- }
- foreach my $id (sort keys %known_cfs) {
- my $val = $row->{'CustomField-'.$id};
- $val =~ s/(\n|\r)//g;
- push @row, $val;
- }
-
- $m->out(join("\t",@row));
- $m->out("\n");
+ my @row;
+ foreach my $attr(@attrs) {
+ push @row, $row->{"$attr"};
+ }
+ foreach my $id (sort keys %known_cfs) {
+ my $val = $row->{'CustomField-'.$id};
+ $val =~ s/(\n|\r)//g;
+ push @row, $val;
+ }
+ $m->out(join("\t",@row));
+ $m->out("\n");
}
-
$m->abort();
</%INIT>
diff --git a/rt/html/Search/Simple.html b/rt/html/Search/Simple.html
new file mode 100644
index 000000000..cdffc4c46
--- /dev/null
+++ b/rt/html/Search/Simple.html
@@ -0,0 +1,93 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs,
+ current_toptab => "Search/Simple.html",
+ Title => $title
+&>
+
+<div id="SimpleSearchForm">
+<form action="Simple.html" method="get">
+
+<p><&|/l&>Search for tickets. Enter <strong>id</strong> numbers, <strong>queues</strong> by name, Owners by <strong>username</strong> and Requestors by <strong>email address</strong>. RT will look for anything else you enter in ticket bodies and attachments.</&></p>
+
+<p><&|/l&>Searching the full text of every ticket can take a long time, but if you need to do it, you can search for any word in full ticket history for any word by typing <b>fulltext:<i>word</i></b>.</&></p>
+<p><&|/l&>RT will look for anything else you enter in ticket subjects.</&></p>
+
+<br />
+<br />
+<div align="center">
+<input name="q" size="60" /><input type="submit" class="button" value="<&|/l&>Search</&>" />
+</div>
+</div>
+
+<%INIT>
+my $title = loc("Search for tickets");
+use RT::Search::Googleish;
+
+if ($q) {
+ my $tickets = new RT::Tickets( $session{'CurrentUser'} );
+
+ $m->comp('/Elements/Callback', %ARGS, _CallbackName => 'ModifyQuery', query => \$q);
+
+ if ($q =~ /^(\d+)$/) {
+ RT::Interface::Web::Redirect($RT::WebURL."/Ticket/Display.html?id=".$q);
+ }
+ my $search = RT::Search::Googleish->new(Argument => $q,
+ TicketsObj => $tickets);
+
+ $m->comp( "Results.html", Query => $search->QueryToSQL() );
+ $m->comp( "/Elements/Footer" );
+ $m->abort();
+}
+</%INIT>
+
+<%ARGS>
+$q => undef
+</%ARGS>
+
diff --git a/rt/html/SelfService/Attachment/dhandler b/rt/html/SelfService/Attachment/dhandler
index f953c2486..e7d59e63c 100644
--- a/rt/html/SelfService/Attachment/dhandler
+++ b/rt/html/SelfService/Attachment/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/SelfService/Closed.html b/rt/html/SelfService/Closed.html
index 2d49a6897..766b0bc4f 100644
--- a/rt/html/SelfService/Closed.html
+++ b/rt/html/SelfService/Closed.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,5 +47,10 @@
%# END BPS TAGGED BLOCK }}}
<& /SelfService/Elements/Header, Title => loc('Closed tickets') &>
-<& /SelfService/Elements/MyRequests, status => ['rejected', 'resolved'], friendly_status =>
-loc('closed') &>
+<& /SelfService/Elements/MyRequests, status => ['rejected', 'resolved'],
+ friendly_status => loc('closed'),
+ BaseURL => $RT::WebPath . "/SelfService/Closed.html?",
+ Page => $Page &>
+<%ARGS>
+$Page => 1
+</%ARGS>
diff --git a/rt/html/SelfService/Create.html b/rt/html/SelfService/Create.html
index d60ae267a..f66961db8 100644
--- a/rt/html/SelfService/Create.html
+++ b/rt/html/SelfService/Create.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,67 +47,67 @@
%# END BPS TAGGED BLOCK }}}
<& Elements/Header, Title => loc("Create a ticket") &>
-<FORM ACTION="Display.html" METHOD="POST" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN Name="id" VALUE="new">
+<form action="Display.html" method="post" enctype="multipart/form-data">
+<input type="hidden" class="hidden" name="id" value="new" />
-<TABLE>
-<TR>
-<TD class="label">
+<table>
+<tr>
+<td class="label">
<&|/l&>Queue</&>:
</td>
<td class="value">
- <input type="hidden" name="Queue" value="<%$queue_obj->id%>">
- <b><%$queue_obj->Name%></b> (<%$queue_obj->Description%>)
-</TD>
-</TR>
-<TR>
-<TD class="label">
+ <input type="hidden" class="hidden" name="Queue" value="<%$queue_obj->id%>" />
+ <strong><%$queue_obj->Name%></strong> (<%$queue_obj->Description%>)
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Requestors</&>:
-</TD>
-<TD class="value">
-<INPUT Name="Requestors" Value="<%$session{CurrentUser}->EmailAddress%>" SIZE=20>
-</TD>
-</TR>
-<TR>
-<TD class="label">
+</td>
+<td class="value">
+<input name="Requestors" value="<%$session{CurrentUser}->EmailAddress%>" size="20" />
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Cc</&>:
-</TD>
-<TD class="value">
- <INPUT NAME="Cc" SIZE=20>
-</TD>
-</TR>
-<TR>
-<TD class="label">
+</td>
+<td class="value">
+ <input name="Cc" size="20" />
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Subject</&>:
-</TD>
-<TD class="value">
-<INPUT Name="Subject" SIZE=60 MAXSIZE=100 value="">
-</TD>
-</TR>
+</td>
+<td class="value">
+<input name="Subject" size="60" maxsize="200" value="" />
+</td>
+</tr>
<tr>
<td colspan="2">
<& /Ticket/Elements/EditCustomFields, QueueObj => $queue_obj &>
</td>
</tr>
<tr>
-<TD class="label">
+<td class="label">
<&|/l&>Attach file</&>:
-</TD>
-<TD class="value">
-<INPUT Name="Attach" type="file">
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=2>
-<&|/l&>Describe the issue below</&>:<br>
+</td>
+<td class="value">
+<input name="Attach" type="file" />
+</td>
+</tr>
+<tr>
+<td colspan="2">
+<&|/l&>Describe the issue below</&>:<br />
<& /Elements/MessageBox &>
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<& /Elements/Submit, Label => loc("Create ticket")&>
-</FORM>
+</form>
<%args>
$Queue => undef
</%args>
diff --git a/rt/html/SelfService/CreateTicketInQueue.html b/rt/html/SelfService/CreateTicketInQueue.html
index 5e8973610..fd7e42664 100755
--- a/rt/html/SelfService/CreateTicketInQueue.html
+++ b/rt/html/SelfService/CreateTicketInQueue.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/SelfService/Display.html b/rt/html/SelfService/Display.html
index f7140df02..0410e1b48 100644
--- a/rt/html/SelfService/Display.html
+++ b/rt/html/SelfService/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,25 +49,25 @@
<& /Elements/ListActions, actions => \@results &>
- <TABLE WIDTH="100%" class="ticketsummary" >
- <TR>
- <TD VALIGN=TOP WIDTH="50%" class="boxcontainer">
- <& /Elements/TitleBoxStart, title => loc('The Basics'),
+ <table width="100%" class="ticketsummary" >
+ <tr>
+ <td valign="top" width="50%" class="boxcontainer">
+ <&| /Widgets/TitleBox, title => loc('The Basics'),
title_class=> 'inverse',
color => "#993333" &>
<& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
<& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
-</TD>
- <TD VALIGN=TOP WIDTH="50%" class="boxcontainer">
- <& /Elements/TitleBoxStart, title => loc("Dates"),
+ </&>
+</td>
+ <td valign="top" width="50%" class="boxcontainer">
+ <&| /Widgets/TitleBox, title => loc("Dates"),
title_class=> 'inverse',
color => "#663366" &>
<& /Ticket/Elements/ShowDates, Ticket => $Ticket, UpdatedLink => 0 &>
- <& /Elements/TitleBoxEnd &>
-</TD>
-</TR>
-</TABLE>
+ </&>
+</td>
+</tr>
+</table>
@@ -158,15 +160,6 @@ if ( $id[0] eq 'new' ) {
Why => loc( "Couldn't load ticket '[_1]'", $id ) );
$m->abort();
}
- }
-
- # }}}
-
- unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
- $m->comp( 'Error.html',
- Why => loc("No permission to display that ticket") );
- $m->abort();
- }
my ( $code, $msg );
@@ -183,7 +176,8 @@ if ( $id[0] eq 'new' ) {
if (
$session{'Attachments'}
- || ( $ARGS{'UpdateContent'} ne ''
+ || ( defined $ARGS{'UpdateContent'}
+ && $ARGS{'UpdateContent'} ne ''
&& $ARGS{'UpdateContent'} ne "-- \n"
. $session{'CurrentUser'}->UserObj->Signature )
)
@@ -206,6 +200,27 @@ if ( $id[0] eq 'new' ) {
# }}}
+ }
+
+ # This code does automatic redirection if any updates happen.
+
+ unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
+ $m->comp( 'Error.html',
+ Why => loc("No permission to display that ticket") );
+ $m->abort();
+ }
+
+ if (@results) {
+ # We've done something, so we need to clear the decks to avoid
+ # resubmission on refresh.
+ # But we need to store Actions somewhere too, so we don't lose them.
+ $session{"Actions"} = \@results;
+ RT::Interface::Web::Redirect($RT::WebURL."SelfService/Display.html?id="
+ . $Ticket->id);
+ } else {
+ @results = @{ delete $session{"Actions"} || [] };
+ }
+
my $Transactions = $Ticket->Transactions;
my $attachments =
diff --git a/rt/html/SelfService/Elements/GotoTicket b/rt/html/SelfService/Elements/GotoTicket
index 50efaa24e..5eac306e9 100644
--- a/rt/html/SelfService/Elements/GotoTicket
+++ b/rt/html/SelfService/Elements/GotoTicket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,4 +45,4 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<FORM ACTION="<%$RT::WebPath%>/SelfService/Display.html"><input type=submit value="<&|/l&>Goto ticket</&>">&nbsp;<input size=4 name=id></FORM>
+<form action="<%$RT::WebPath%>/SelfService/Display.html"><input type="submit" class="button" value="<&|/l&>Goto ticket</&>" />&nbsp;<input size="4" name="id" /></form>
diff --git a/rt/html/SelfService/Elements/Header b/rt/html/SelfService/Elements/Header
index c7e6a9167..f248292e2 100644
--- a/rt/html/SelfService/Elements/Header
+++ b/rt/html/SelfService/Elements/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/SelfService/Elements/MyRequests b/rt/html/SelfService/Elements/MyRequests
index 2df8ce842..41f6b09b1 100644
--- a/rt/html/SelfService/Elements/MyRequests
+++ b/rt/html/SelfService/Elements/MyRequests
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,43 +45,40 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => $title &>
-<TABLE BORDER=0 cellspacing=1 cellpadding=1 BGCOLOR="#eeeeee" WIDTH=100%>
-<TR>
-<TH><&|/l&>Subject</&></TH>
-<TH><&|/l&>Status</&></TH>
-<TH><&|/l&>Owner</&></TH>
-</TR>
-<TR>
-% while (my $Ticket = $MyTickets->Next) {
-<TR>
-<TD>
-<a href="<%$RT::WebPath%>/SelfService/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id%>: <%$Ticket->Subject%></a>
-</TD>
-<TD>
-<%loc($Ticket->Status)%>
-</TD><TD>
-<%$Ticket->OwnerObj->Name%>
-</TR>
-% }
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
+<&| /Widgets/TitleBox, title => $title &>
+<& /Elements/TicketList, Title => $title,
+ Format => @Format,
+ Query => $Query,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ BaseURL => $BaseURL,
+ Page => $Page &>
+</&>
<%INIT>
-$title ||= loc("My [_1] tickets", $friendly_status);
-my $MyTickets;
-$MyTickets = new RT::Tickets ($session{'CurrentUser'});
-$MyTickets->LimitWatcher(TYPE => 'Requestor', VALUE => $session{'CurrentUser'}->EmailAddress);
-$MyTickets->OrderBy(FIELD => 'id', ORDER => 'ASC');
-
-foreach my $status (@status) {
-
- $MyTickets->LimitStatus(VALUE => $status);
+my $id = $session{'CurrentUser'}->id;
+my $Query = "( "
+ . join( ' OR ', map "$_.id = $id", @roles )
+ . ")";
+if ( @status ) {
+ $Query .= " AND ( "
+ . join( ' OR ', map "Status = '$_'", @status )
+ . " )";
}
+my $Order = "ASC";
+my $OrderBy = "Created";
+my @Format = qq{
+ '<B><A HREF="$RT::WebPath/SelfService/Display.html?id=__id__">__id__</a></B>/TITLE:#',
+ '<B><A HREF="$RT::WebPath/SelfService/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
+ Status,
+ Requestors,
+ OwnerName};
</%INIT>
<%ARGS>
-$title => undef
$friendly_status => loc('open')
+$title => loc("My [_1] tickets", $friendly_status)
+@roles => ('Watcher')
@status => ('open', 'new', 'stalled')
+$BaseURL => undef
+$Page => 1
</%ARGS>
diff --git a/rt/html/SelfService/Elements/Tabs b/rt/html/SelfService/Elements/Tabs
index 802fd6525..80f4ce4cd 100644
--- a/rt/html/SelfService/Elements/Tabs
+++ b/rt/html/SelfService/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,6 +54,18 @@
&>
<a name="skipnav" id="skipnav" accesskey="8"></a>
<%INIT>
+my $queues = RT::Queues->new($session{'CurrentUser'});
+$queues->UnLimit;
+
+my $queue_count = 0;
+my $queue_id = 1;
+
+while (my $queue = $queues->Next) {
+ next unless $queue->CurrentUserHasRight('CreateTicket');
+ $queue_id = $queue->id;
+ $queue_count++;
+ last if ($queue_count > 1);
+}
if ($Title) {
$Title = loc ("RT Self Service") . " / " . $Title;
@@ -65,11 +79,19 @@ my $tabs = { A => { title => loc('Open tickets'),
},
B => { title => loc('Closed tickets'),
path => 'SelfService/Closed.html',
- },
- C => { title => loc('New ticket'),
- path => 'SelfService/CreateTicketInQueue.html'
- }
+ }
};
+
+if ($queue_count > 1) {
+ $tabs->{C} = { title => loc('New ticket'),
+ path => 'SelfService/CreateTicketInQueue.html'
+ };
+} else {
+ $tabs->{C} = { title => loc('New ticket'),
+ path => 'SelfService/Create.html?Queue=' . $queue_id
+ };
+}
+
if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf',
Object => $RT::System )) {
$tabs->{Z} = { title => loc('Preferences'),
diff --git a/rt/html/SelfService/Error.html b/rt/html/SelfService/Error.html
index 8ac9f81ea..81a483d39 100644
--- a/rt/html/SelfService/Error.html
+++ b/rt/html/SelfService/Error.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,15 +47,15 @@
%# END BPS TAGGED BLOCK }}}
<& /SelfService/Elements/Header, Title => loc('Error') &>
<h2 class="title"><%loc('Error')%></h2>
-<& /Elements/TitleBoxStart, title => $Title &>
+<&| /Widgets/TitleBox, title => $Title &>
<%$Why%>
-<br>
-<font size=-1>
+<br />
+<font size="-1">
<%$Details%>
</font>
-<& /Elements/TitleBoxEnd &>
+</&>
</body>
-</HTML>
+</html>
<%args>
diff --git a/rt/html/SelfService/Prefs.html b/rt/html/SelfService/Prefs.html
index 3913203fb..0cd3756c3 100644
--- a/rt/html/SelfService/Prefs.html
+++ b/rt/html/SelfService/Prefs.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,14 +48,14 @@
<& /SelfService/Elements/Header, Title => loc('Preferences') &>
<& /Elements/ListActions, actions => \@results &>
-<form method=post>
+<form method="post">
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<& /Elements/TitleBoxStart, title => loc('Change password') &>
-<&|/l&>New password</&>: <input type=password name="NewPass1" size=16>
-<&|/l&>Confirm</&>: <input type=password name="NewPass2" size=16>
-<& /Elements/TitleBoxEnd &>
-<BR>
+<&| /Widgets/TitleBox, title => loc('Change password') &>
+<&|/l&>New password</&>: <input type="password" name="NewPass1" size="16" />
+<&|/l&>Confirm</&>: <input type="password" name="NewPass2" size="16" />
+</&>
+<br />
% }
<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
diff --git a/rt/html/SelfService/Update.html b/rt/html/SelfService/Update.html
index 816a610aa..b10716f9a 100644
--- a/rt/html/SelfService/Update.html
+++ b/rt/html/SelfService/Update.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,9 +50,9 @@
&>
-<FORM ACTION="Display.html" METHOD=POST ENCTYPE="multipart/form-data">
-<input type=hidden name="UpdateType" value="response">
-<input TYPE="hidden" NAME="id" VALUE="<%$Ticket->Id%>">
+<form action="Display.html" method="post" enctype="multipart/form-data">
+<input type="hidden" class="hidden" name="UpdateType" value="response" />
+<input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
<table>
<tr>
<td class="label">
@@ -65,30 +67,30 @@
<&|/l&>Subject</&>
</td>
<td class="value">
- <input name="UpdateSubject" size=60 value="<% $Ticket->Subject %>">
+ <input name="UpdateSubject" size="60" value="<% $Ticket->Subject %>" />
</td>
</tr>
% if (exists $session{'Attachments'}) {
<tr>
- <TD class="label">
+ <td class="label">
<&|/l&>Attached file</&>
- </TD>
- <TD COLSPAN=5 class="value">
- <&|/l&>Check box to delete</&><BR>
+ </td>
+ <td colspan="5" class="value">
+ <&|/l&>Check box to delete</&><br />
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
- <input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+ <input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
% } # end of foreach
- </TD>
-</TR>
+ </td>
+</tr>
% } # end of if
<tr>
<td class"label">
<&|/l&>Attach</&>
</td>
<td class="value">
- <input name="Attach" type="file">
- <input type="hidden" name="UpdateAttach" value="1">
+ <input name="Attach" type="file" />
+ <input type="hidden" class="hidden" name="UpdateAttach" value="1" />
</td>
</tr>
</table>
@@ -97,11 +99,11 @@
Name => "UpdateContent",
QuoteTransaction => $ARGS{QuoteTransaction}
&>
- <br>
+ <br />
<& /Elements/Submit &>
- </FORM>
+ </form>
diff --git a/rt/html/SelfService/index.html b/rt/html/SelfService/index.html
index f3ccb8555..c4a9577ab 100644
--- a/rt/html/SelfService/index.html
+++ b/rt/html/SelfService/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /SelfService/Elements/Header, Title => undef &>
+<& /SelfService/Elements/Header, Title => loc('Open Tickets') &>
-<& /SelfService/Elements/MyRequests &>
+<& /SelfService/Elements/MyRequests, BaseURL => $RT::WebPath . "/SelfService/?",
+ Page => $Page &>
+<%ARGS>
+$Page => 1
+</%ARGS>
diff --git a/rt/html/Ticket/Attachment/dhandler b/rt/html/Ticket/Attachment/dhandler
index 584fd721d..4872ef2a7 100644
--- a/rt/html/Ticket/Attachment/dhandler
+++ b/rt/html/Ticket/Attachment/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html
index b547242f2..c23a302b7 100644
--- a/rt/html/Ticket/Create.html
+++ b/rt/html/Ticket/Create.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,203 +45,214 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Create a new ticket") &>
+<& /Elements/Header,
+ Title => loc("Create a new ticket"),
+ onload => "hide(document.getElementById('Ticket-Create-details'));" &>
<& /Elements/Tabs,
current_toptab => "Ticket/Create.html",
- Title => loc("Create a new ticket") &>
-<FORM ACTION="<%$RT::WebPath%>/Ticket/Create.html" METHOD="POST" ENCTYPE="multipart/form-data" NAME="TicketCreate">
-<INPUT TYPE=HIDDEN Name="id" VALUE="new">
-<A NAME="top">
-
-
-[<a class="currenttab"><&|/l&>Show basics</&></a>] [<A HREF="#detail"><&|/l&>Show details</&></a>]
-<BR>
-<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => loc("Create a new ticket") &>
-<TABLE border=0 cellpadding=0 cellspacing=0>
-<TR><TD class=label><&|/l&>Queue</&>:</TD>
-<TD class=value><% $QueueObj->Name %>
-<INPUT TYPE=HIDDEN NAME=Queue Value="<%$QueueObj->Name%>">
-</TD>
-<TD class=label><&|/l&>Status</&>:
-</TD>
-<TD class=value>
+ Title => loc("Create a new ticket"),
+ actions => $actions &>
+<& /Elements/ListActions, actions => \@results &>
+<form action="<%$RT::WebPath%>/Ticket/Create.html" method="post" enctype="multipart/form-data" name="TicketCreate">
+<input type="hidden" class="hidden" name="id" value="new" />
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+
+<div id="Ticket-Create-basics">
+<a name="basics"></a>
+<&| /Widgets/TitleBox, title => loc("Create a new ticket") &>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td class="label"><&|/l&>Queue</&>:</td>
+<td class="value"><% $QueueObj->Name %>
+<input type="hidden" class="hidden" name="Queue" value="<%$QueueObj->Name%>" />
+</td>
+<td class="label"><&|/l&>Status</&>:
+</td>
+<td class="value">
<& /Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}||'new', DefaultValue => 0 &>
-</TD>
-<TD class=label>
+</td>
+<td class="label">
<&|/l&>Owner</&>:
-</TD>
-<TD class=value>
+</td>
+<td class="value">
<& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj, Default => $ARGS{Owner}||$RT::Nobody->Id, DefaultValue => 0 &>
-</TD>
-</TR>
-<TR>
-<TD class=label>
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Requestors</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT Name="Requestors" Value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" SIZE=40>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
+</td>
+<td class="value" colspan="5">
+<input name="Requestors" value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" size="40" />
+</td>
+</tr>
+<tr>
+<td class="labeltop">
<&|/l&>Cc</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT NAME="Cc" SIZE=40 VALUE="<% $ARGS{Cc} %>"><BR>
-<i><font size=-2>
-<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)</&></font></i>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
+</td>
+<td class="value" colspan="5">
+<input name="Cc" size="40" value="<% $ARGS{Cc} %>" /><br />
+<i><font size="-2">
+<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <strong>will</strong> receive future updates.)</&></font></i>
+</td>
+</tr>
+<tr>
+<td class="labeltop">
<&|/l&>Admin Cc</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT NAME="AdminCc" SIZE=40 VALUE="<% $ARGS{AdminCc} %>"><BR>
-<i><font size=-2>
-<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <b>will</b> receive future updates.)</&></font></i>
-</TD>
-</TR>
-<TR>
-<TD class=label>
+</td>
+<td class="value" colspan="5">
+<input name="AdminCc" size="40" value="<% $ARGS{AdminCc} %>" /><br />
+<i><font size="-2">
+<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <strong>will</strong> receive future updates.)</&></font></i>
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Subject</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT Name="Subject" SIZE=60 MAXSIZE=100 value="<%$ARGS{Subject} || ''%>">
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=6>
+</td>
+<td class="value" colspan="5">
+<input name="Subject" size="60" maxsize="200" value="<%$ARGS{Subject} || ''%>" />
+</td>
+</tr>
+<tr>
+<td colspan="6">
<& /Ticket/Elements/EditCustomFields, QueueObj => $QueueObj &>
-</TD>
-</TR>
+</td>
+</tr>
% if ($TxnCFs->Count) {
% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD ALIGN=RIGHT><% $CF->Name %>:</TD>
-<TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
- "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
+<tr>
+<td align="right"><% $CF->Name %>:</td>
+<td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
+ "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></td>
+</td></tr>
% }
% }
-<TR>
+<tr>
% if (exists $session{'Attachments'}) {
-<TD class=label>
+<td class="label">
<&|/l&>Attached file</&>:
-</TD>
-<TD COLSPAN=5>
-<&|/l&>Check box to delete</&><BR>
+</td>
+<td colspan="5">
+<&|/l&>Check box to delete</&><br />
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
% } # end of foreach
-</TD>
-</TR>
-<TR>
+</td>
+</tr>
+<tr>
% } # end of if
-<TD>
+<td>
<&|/l&>Attach file</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT TYPE=FILE NAME="Attach">
-<INPUT TYPE=SUBMIT NAME="AddMoreAttach" VALUE="<&|/l&>Add More Files</&>">
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=6>
-<&|/l&>Describe the issue below</&>:<br>
+</td>
+<td class="value" colspan="5">
+<input type="file" name="Attach" />
+<input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" />
+</td>
+</tr>
+<tr>
+<td colspan="6">
+<&|/l&>Describe the issue below</&>:<br />
% if (exists $ARGS{Content}) {
<& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &>
% } else {
<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
%}
-<BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT COLSPAN=2>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
+<br />
+</td>
+</tr>
+<tr>
+<td align="right" colspan="2">
+</td>
+</tr>
+</table>
+</&>
<& /Elements/Submit, Label => loc("Create")&>
+</div>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-
-<A NAME="detail">
- [<A HREF="#top"><&|/l&>Show basics</&></a>] [<a class="currenttab"><&|/l&>Show details</&></a>]
-<BR>
-<TABLE WIDTH="100%" BORDER=0>
-<TR>
-<TD WIDTH="50%" VALIGN=TOP>
+<div id="Ticket-Create-details">
+<a name="details"></a>
+<table width="100%" border="0">
+<tr>
+<td width="50%" valign="top">
- <& /Elements/TitleBoxStart, title => loc('The Basics'),
+ <&| /Widgets/TitleBox, title => loc('The Basics'),
title_class=> 'inverse',
color => "#993333" &>
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT><&|/l&>Priority</&>:</TD><TD><input size=3 name="InitialPriority" value="<% $ARGS{InitialPriority} ? $ARGS{InitialPriority} : $QueueObj->InitialPriority %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Final Priority</&>:</TD><TD><input size=3 name="FinalPriority" value="<% $ARGS{FinalPriority} ? $ARGS{FinalPriority} : $QueueObj->FinalPriority %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Time Worked</&>:</TD><TD><&|/l,'<input size=3 name="TimeWorked" value="'.$ARGS{TimeWorked}.'">'&>[_1] min</&></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Time Left</&>:</TD><TD><&|/l,'<input size=3 name="TimeLeft" value="'.$ARGS{TimeLeft}.'">'&>[_1] min</&></TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<br>
-<& /Elements/TitleBoxStart, title => loc("Dates"),
+<table border="0">
+<tr><td align="right"><&|/l&>Priority</&>:</td><td><input size="3" name="InitialPriority" value="<% $ARGS{InitialPriority} ? $ARGS{InitialPriority} : $QueueObj->InitialPriority %>" /></td></tr>
+<tr><td align="right"><&|/l&>Final Priority</&>:</td><td><input size="3" name="FinalPriority" value="<% $ARGS{FinalPriority} ? $ARGS{FinalPriority} : $QueueObj->FinalPriority %>" /></td></tr>
+<tr><td align="right"><&|/l&>Time Estimated</&>:</td>
+<td>
+<input size="3" name="TimeEstimated" value="<%$ARGS{TimeEstimated}%>" />
+<& /Elements/SelectTimeUnits, Name =>'TimeEstimated' &>
+
+</td></tr>
+<tr><td align="right"><&|/l&>Time Worked</&>:</td>
+<td>
+<input size="3" name="TimeWorked" value="<%$ARGS{TimeWorked}%>" />
+<& /Elements/SelectTimeUnits, Name =>'TimeWorked' &>
+
+</td></tr>
+<tr>
+<td align="right"><&|/l&>Time Left</&>:</td>
+<td><input size="3" name="TimeLeft" value="<%$ARGS{TimeLeft}%>" />
+<& /Elements/SelectTimeUnits, Name =>'TimeLeft' &>
+</td></tr>
+</table>
+</&>
+<br />
+<&|/Widgets/TitleBox, title => loc("Dates"),
title_class=> 'inverse',
color => "#663366" &>
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT><&|/l&>Starts</&>:</TD><TD><input size=10 name="Starts" value="<% $ARGS{Starts} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Due</&>:</TD><TD><input size=10 name="Due" value="<%
-$ARGS{Due}%>"></TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<BR>
-</TD>
+<table>
+<tr><td class="label"><&|/l&>Starts</&>:</td><td><& /Elements/SelectDate, Name => "Starts", Default => $ARGS{Starts} || '' &></td></tr>
+<tr><td class="label"><&|/l&>Due</&>:</td><td><& /Elements/SelectDate, Name => "Due", Default => $ARGS{Due} || '' &></td></tr>
+</table>
+</&>
+<br />
+</td>
-<TD VALIGN="TOP">
-<& /Elements/TitleBoxStart, title => loc('Links'),
- title_class=> 'inverse',
- titleright => '', color=> "#336633" &>
+<td valign="top">
+<&| /Widgets/TitleBox, title => loc('Links'), title_class=> 'inverse' &>
-<i><&|/l&>(Enter ticket ids or URLs, separated with spaces)</&></i>
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT><&|/l&>Depends on</&></TD><TD><input size=10 name="new-DependsOn" value="<% $ARGS{'new-DependsOn'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Depended on by</&></TD><TD><input size=10 name="DependsOn-new" value="<% $ARGS{'DependsOn-new'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Parents</&></TD><TD><input size=10 name="new-MemberOf" value="<% $ARGS{'new-MemberOf'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Children</&></TD><TD><input size=10 name="MemberOf-new" value="<% $ARGS{'MemberOf-new'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Refers to</&></TD><TD><input size=10 name="new-RefersTo" value="<% $ARGS{'new-RefersTo'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Referred to by</&></TD><TD><input size=10 name="RefersTo-new" value="<% $ARGS{'RefersTo-new'} %>"></TD></TR>
+<em><&|/l&>(Enter ticket ids or URLs, separated with spaces)</&></em>
+<table border="0">
+<tr><td align="right"><&|/l&>Depends on</&></td><td><input size="10" name="new-DependsOn" value="<% $ARGS{'new-DependsOn'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Depended on by</&></td><td><input size="10" name="DependsOn-new" value="<% $ARGS{'DependsOn-new'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Parents</&></td><td><input size="10" name="new-MemberOf" value="<% $ARGS{'new-MemberOf'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Children</&></td><td><input size="10" name="MemberOf-new" value="<% $ARGS{'MemberOf-new'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Refers to</&></td><td><input size="10" name="new-RefersTo" value="<% $ARGS{'new-RefersTo'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Referred to by</&></td><td><input size="10" name="RefersTo-new" value="<% $ARGS{'RefersTo-new'} %>" /></td></tr>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<BR>
+</table>
+</&>
+<br />
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<& /Elements/Submit, Label => loc("Create") &>
-</FORM>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
+</div>
+</form>
<%INIT>
-
+my @results;
my $QueueObj = new RT::Queue($session{'CurrentUser'});
$QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded."));
my $CFs = $QueueObj->TicketCustomFields();
my $TxnCFs = $QueueObj->TicketTransactionCustomFields();
+my $ValidCFs = $m->comp(
+ '/Elements/ValidateCustomFields',
+ CustomFields => $CFs,
+ ARGSRef => \%ARGS
+);
+
# if no due date has been set explicitly, then use the
# queue's default if it exists
if ($QueueObj->DefaultDueIn && !$ARGS{'Due'}) {
@@ -285,10 +298,29 @@ unless (keys %{$session{'Attachments'}} and $ARGS{'id'} eq 'new') {
# }}}
-if ((!exists $ARGS{'AddMoreAttach'}) && ($ARGS{'id'} eq 'new')) { # new ticket?
- $m->comp('Display.html', %ARGS);
- return();
+if ((!exists $ARGS{'AddMoreAttach'}) and ($ARGS{'id'} eq 'new')) { # new ticket?
+ if ($ValidCFs) {
+ $m->comp('Display.html', %ARGS);
+ $RT::Logger->crit("After display call; error is $@");
+ $m->abort();
+ }
+ else {
+ # Invalid CFs
+ while (my $CF = $CFs->Next) {
+ my $msg = $m->notes('InvalidField-' . $CF->Id) or next;
+ push @results, $CF->Name . ': ' . $msg;
+ }
+ }
}
+
+my $actions = {
+ A => {
+ html => q[<a href="#basics" onclick="return switchVisibility('Ticket-Create-basics','Ticket-Create-details');">] . loc('Show basics') . q[</a>],
+ },
+ B => {
+ html => q[<a href="#details" onclick="return switchVisibility('Ticket-Create-details','Ticket-Create-basics');">] . loc('Show details') . q[</a>],
+ },
+};
</%INIT>
<%ARGS>
diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html
index dd4c093dc..1c0aa417a 100644
--- a/rt/html/Ticket/Display.html
+++ b/rt/html/Ticket/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,13 +53,12 @@
Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
<& /Elements/ListActions, actions => \@Actions &>
-
-<& /Elements/TitleBoxStart, title => loc('Ticket metadata'), contentbg =>
-'#ffffff' &>
+<& /Elements/Callback, _CallbackName => 'BeforeShowSummary', Ticket => $TicketObj, %ARGS &>
+<&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj, Attachments => $attachments &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
<& /Elements/Callback, _CallbackName => 'BeforeShowHistory', Ticket => $TicketObj, %ARGS &>
@@ -71,7 +72,8 @@
&>
-
+<& /Elements/Callback, _CallbackName => 'AfterShowHistory', Ticket => $TicketObj, %ARGS &>
+
<%ARGS>
$id => undef
$Create => undef
@@ -119,6 +121,10 @@ if ($ARGS{'id'} eq 'new') {
}
}
+ $m->comp('/Elements/Callback', _CallbackName => 'BeforeProcessArguments',
+ TicketObj => $TicketObj, Tickets => $Tickets,
+ ActionsRef => \@Actions, ARGSRef => \%ARGS);
+
if (defined $ARGS{'Action'}) {
if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) {
my $action = $1;
@@ -128,30 +134,46 @@ if ($ARGS{'id'} eq 'new') {
}
$ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'};
- if ( $ARGS{'UpdateTimeWorked'} ||
- $session{'Attachments'} ||
- ( defined $ARGS{'UpdateContent'}
- && $ARGS{'UpdateContent'} ne ''
- && $ARGS{'UpdateContent'} ne "-- \n"
- . $session{'CurrentUser'}->UserObj->Signature )) {
- $ARGS{UpdateAttachments} = $session{'Attachments'};
- ProcessUpdateMessage( ARGSRef => \%ARGS,
- Actions => \@Actions,
- TicketObj => $TicketObj );
- delete $session{'Attachments'};
+ if ( $ARGS{'UpdateTimeWorked'} || (
+ defined $ARGS{'UpdateContent'}
+ && $ARGS{'UpdateContent'} ne ''
+ && $ARGS{'UpdateContent'} ne "-- \n"
+ . $session{'CurrentUser'}->UserObj->Signature ) )
+ {
+ $ARGS{UpdateAttachments} = $session{'Attachments'};
+ ProcessUpdateMessage(
+ ARGSRef => \%ARGS,
+ Actions => \@Actions,
+ TicketObj => $TicketObj,
+ );
+ delete $session{'Attachments'};
}
#Process status updates
+ my @PeopleActions = ProcessTicketWatchers(ARGSRef => \%ARGS, TicketObj=>$TicketObj);
my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj);
my @results = ProcessTicketLinks( TicketObj => $TicketObj, ARGSRef => \%ARGS);
- push (@Actions, @BasicActions, @results);
+ push (@Actions, @PeopleActions, @BasicActions, @results);
}
-
-
$m->comp('/Elements/Callback', _CallbackName => 'BeforeDisplay',
- TicketObj => \$TicketObj, Tickets => \$Tickets, ARGSRef => \%ARGS);
-
+ TicketObj => \$TicketObj,
+ Tickets => \$Tickets,
+ Actions => \@Actions,
+ ARGSRef => \%ARGS,
+);
+
+# This code does automatic redirection if any updates happen.
+
+if (@Actions) {
+ # We've done something, so we need to clear the decks to avoid
+ # resubmission on refresh.
+ # But we need to store Actions somewhere too, so we don't lose them.
+ $session{"Actions"} = \@Actions;
+ RT::Interface::Web::Redirect($RT::WebURL."Ticket/Display.html?id=".$TicketObj->id);
+} else {
+ @Actions = @{ delete $session{"Actions"} || [] };
+}
my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj, Tickets => $Tickets);
my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket => $TicketObj);
diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers
index 98314b9d2..891ff95b5 100644
--- a/rt/html/Ticket/Elements/AddWatchers
+++ b/rt/html/Ticket/Elements/AddWatchers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,10 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<BR>
-<%$msg%><br>
+<br />
+<%$msg%><br />
-<&|/l&>Add new watchers</&>:<br>
+<&|/l&>Add new watchers</&>:<br />
<table>
% if ($Users and $Users->Count) {
@@ -79,17 +81,17 @@
<tr><td>
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &>
</td><td>
-<input name="WatcherAddressEmail1" size=15>
+<input name="WatcherAddressEmail1" size="15" />
</td></tr>
<tr><td>
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &>
</td><td>
-<input name="WatcherAddressEmail2" size=15>
+<input name="WatcherAddressEmail2" size="15" />
</td></tr>
<tr><td>
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &>
</td><td>
-<input name="WatcherAddressEmail3" size=15>
+<input name="WatcherAddressEmail3" size="15" />
</td></tr>
</table>
diff --git a/rt/html/Ticket/Elements/BulkLinks b/rt/html/Ticket/Elements/BulkLinks
index 6a3859aa3..e449b18d8 100644
--- a/rt/html/Ticket/Elements/BulkLinks
+++ b/rt/html/Ticket/Elements/BulkLinks
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,33 +45,33 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
- <TR>
- <TD class="label"><&|/l&>Merge into</&>:</TD>
- <TD class="entry"><input name="Ticket-MergeInto"> <i><&|/l&>(only one ticket)</&></i></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Depends on</&>:</TD>
- <TD class="entry"><input name="Ticket-DependsOn"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Depended on by</&>:</TD>
- <TD class="entry"><input name="DependsOn-Ticket"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Parents</&>:</TD>
- <TD class="entry"><input name="Ticket-MemberOf"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Children</&>:</TD>
- <TD class="entry"> <input name="MemberOf-Ticket"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Refers to</&>:</TD>
- <TD class="entry"><input name="Ticket-RefersTo"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Referred to by</&>:</TD>
- <TD class="entry"> <input name="RefersTo-Ticket"></TD>
- </TR>
-</TABLE>
+<table>
+ <tr>
+ <td class="label"><&|/l&>Merge into</&>:</td>
+ <td class="entry"><input name="Ticket-MergeInto" /> <i><&|/l&>(only one ticket)</&></i></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Depends on</&>:</td>
+ <td class="entry"><input name="Ticket-DependsOn" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Depended on by</&>:</td>
+ <td class="entry"><input name="DependsOn-Ticket" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Parents</&>:</td>
+ <td class="entry"><input name="Ticket-MemberOf" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Children</&>:</td>
+ <td class="entry"> <input name="MemberOf-Ticket" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Refers to</&>:</td>
+ <td class="entry"><input name="Ticket-RefersTo" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Referred to by</&>:</td>
+ <td class="entry"> <input name="RefersTo-Ticket" /></td>
+ </tr>
+</table>
diff --git a/rt/html/Ticket/Elements/EditBasics b/rt/html/Ticket/Elements/EditBasics
index 715685153..d68fe6522 100644
--- a/rt/html/Ticket/Elements/EditBasics
+++ b/rt/html/Ticket/Elements/EditBasics
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,44 +45,65 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
- <TR>
+<table>
+ <tr>
<td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input name=Subject value="<%$TicketObj->Subject|h%>" SIZE=50></td>
- </TR>
+ <td class="value"><input name="Subject" value="<%$TicketObj->Subject|h%>" size="50" /></td>
+ </tr>
- <TR>
+ <tr>
<td class="label"><&|/l&>Status</&>:</td>
<td class="value"><%$SelectStatus|n%></td>
- </TR>
- <TR>
+ </tr>
+ <tr>
<td class="label"><&|/l&>Queue</&>:</td>
<td class="value"><%$SelectQueue|n%></td>
- </TR>
- <TR>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Owner</&>:</td>
+ <td class="value"><& /Elements/SelectOwner,
+ Name => 'Owner',
+ QueueObj => $TicketObj->QueueObj,
+ TicketObj => $TicketObj,
+ Default => $TicketObj->OwnerObj->Id,
+ DefaultValue => 0,
+ &></td>
+ </tr>
+
+ <tr>
<td class="label"><&|/l&>Time Estimated</&>:</td>
- <td class="value"><input name=TimeEstimated value="<%$TicketObj->TimeEstimated|h%>" SIZE="5"></td>
- </TR>
- <TR>
+ <td class="value"><input name="TimeEstimated" value="<%$TicketObj->TimeEstimated|h%>" size="5" />
+ <& /Elements/SelectTimeUnits, Name =>'TimeEstimated' &>
+</td>
+ </tr>
+ <tr>
<td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><input name=TimeWorked value="<%$TicketObj->TimeWorked|h%>" SIZE="5"></td>
- </TR>
- <TR>
+ <td class="value"><input name="TimeWorked" value="<%$TicketObj->TimeWorked|h%>" size="5" />
+ <& /Elements/SelectTimeUnits, Name =>'TimeWorked' &>
+</td>
+
+ </tr>
+ <tr>
<td class="label"><&|/l&>Time Left</&>:</td>
- <td class="value"><input name=TimeLeft value="<%$TicketObj->TimeLeft|h%>" SIZE="5"></td>
- </TR>
+ <td class="value"><input name="TimeLeft" value="<%$TicketObj->TimeLeft|h%>" size="5" />
+ <& /Elements/SelectTimeUnits, Name =>'TimeLeft' &>
+ </td>
+ </tr>
- <TR>
+ <tr>
<td class="label"><&|/l&>Priority</&>:</td>
- <td class="value"><input name=Priority value="<%$TicketObj->Priority|h%>" SIZE="5"></td>
- </TR>
+ <td class="value"><input name="Priority" value="<%$TicketObj->Priority|h%>" size="5" /></td>
+ </tr>
- <TR>
+ <tr>
<td class="label"><&|/l&>Final Priority</&>:</td>
- <td class="value"><input name=FinalPriority value="<%$TicketObj->FinalPriority|h%>" SIZE="5"></td>
- </TR>
+ <td class="value"><input name="FinalPriority" value="<%$TicketObj->FinalPriority|h%>" size="5" /></td>
+ </tr>
+
+
+
<& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $TicketObj, %ARGS &>
-</TABLE>
+</table>
<%INIT>
#It's hard to do this inline, so we'll preload the html of the selectstatus in here.
diff --git a/rt/html/Ticket/Elements/EditCustomField b/rt/html/Ticket/Elements/EditCustomField
index 63687acd7..fff3925aa 100644
--- a/rt/html/Ticket/Elements/EditCustomField
+++ b/rt/html/Ticket/Elements/EditCustomField
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Ticket/Elements/EditCustomFields b/rt/html/Ticket/Elements/EditCustomFields
index 6ae188fa7..5af48cbf0 100644
--- a/rt/html/Ticket/Elements/EditCustomFields
+++ b/rt/html/Ticket/Elements/EditCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,8 +50,7 @@
<td valign="top" width="50%">
<table>
-% my @entry_fields;
-% my $i;
+% my $i = 0;
% my $cfcount = $CustomFields->Count;
% $cfcount++ if ($cfcount % 2) ; # if we have an odd number of
% #custom fields, fudge it so we know where to put in the table break
@@ -61,16 +62,21 @@
<table>
% }
% $i++;
- <tr>
+ <tr id="CF-<%$CustomField->id%>-EditRow">
<td class="labeltop">
- <b><%$CustomField->Name%></b><br>
+ <b><%$CustomField->Name%></b><br />
<i><%$CustomField->FriendlyType%></i>
</td>
<td class="entry"><& /Elements/EditCustomField,
Object => $TicketObj,
CustomField => $CustomField,
- NamePrefix => $NamePrefix
- &></td>
+ NamePrefix => $NamePrefix ,
+ Default => $m->notes('Field-' . $CustomField->Id),
+ &>
+% if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) {
+ <br />
+ <em style="color: red"><% $msg %></em></td>
+% }
</tr>
% }
</table>
diff --git a/rt/html/Ticket/Elements/EditDates b/rt/html/Ticket/Elements/EditDates
index a19774192..f694506d0 100644
--- a/rt/html/Ticket/Elements/EditDates
+++ b/rt/html/Ticket/Elements/EditDates
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,32 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
- <TR>
- <TD class="label"><&|/l&>Starts</&>:</TD>
- <TD class="entry"><& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &>
- (<% $TicketObj->StartsObj->AsString %>)</TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Started</&>:</TD>
- <TD class="entry"><& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)</TD>
- </TR>
+<table>
+ <tr>
+ <td class="label"><&|/l&>Starts</&>:</td>
+ <td class="entry"><& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &>
+ (<% $TicketObj->StartsObj->AsString %>)</td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Started</&>:</td>
+ <td class="entry"><& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)</td>
+ </tr>
- <TR>
- <TD class="label">
+ <tr>
+ <td class="label">
<&|/l&>Last Contact</&>:
- </TD>
- <TD class="entry">
+ </td>
+ <td class="entry">
<& /Elements/SelectDate, menu_prefix => 'Told', current => 0 &> (<% $TicketObj->ToldObj->AsString %>)
- </TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Due</&>:</TD>
- <TD class="entry">
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Due</&>:</td>
+ <td class="entry">
<& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>)
- </TD>
- </TR>
-</TABLE>
+ </td>
+ </tr>
+</table>
<%ARGS>
$TicketObj => undef
</%ARGS>
diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople
index 055d7ba20..fd23ae0d6 100644
--- a/rt/html/Ticket/Elements/EditPeople
+++ b/rt/html/Ticket/Elements/EditPeople
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,28 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
-<TR>
-<TD VALIGN=TOP>
+<table width="100%">
+<tr>
+<td valign="top">
<h3><&|/l&>New watchers</&></h3>
-<&|/l&>Find people whose</&><BR>
+<&|/l&>Find people whose</&><br />
<& /Elements/SelectUsers &>
-<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>">
-<BR>
-<&|/l&>Find groups whose</&><BR>
+<input type="submit" class="button" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+<br />
+<&|/l&>Find groups whose</&><br />
<& /Elements/SelectGroups &>
-<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>">
+<input type="submit" class="button" name="OnlySearchForGroup" value="<&|/l&>Go!</&>" />
<& AddWatchers, Ticket => $Ticket, UserString => $UserString,
UserOp => $UserOp, UserField => $UserField,
GroupString => $GroupString, GroupOp => $GroupOp,
GroupField => $GroupField, PrivilegedOnly => $PrivilegedOnly &>
-</TD><TD VALIGN=TOP>
+</td><td valign="top">
<h3><&|/l&>Owner</&></h3>
<&|/l&>Owner</&>: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id, DefaultValue => 0&>
<h3><&|/l&>Current watchers</&></h3>
-<&|/l&>(Check box to delete)</&><br>
+<&|/l&>(Check box to delete)</&><br />
<&|/l&>Requestors</&>:
<& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Requestors &>
@@ -75,9 +77,9 @@
<&|/l&>Administrative Cc</&>:
<& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->AdminCc &>
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<%ARGS>
$UserField => undef
diff --git a/rt/html/Ticket/Elements/EditWatchers b/rt/html/Ticket/Elements/EditWatchers
index 0089932f4..918dddb68 100644
--- a/rt/html/Ticket/Elements/EditWatchers
+++ b/rt/html/Ticket/Elements/EditWatchers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,20 +48,25 @@
<ul>
%# Print out a placeholder if there are none.
%if ($Members->Count == 0 ) {
-<li><i><&|/l&>none</&></i>
+<li><i><&|/l&>none</&></i></li>
% }
%while (my $watcher=$Members->Next) {
<li>
-<INPUT TYPE=CHECKBOX NAME="Ticket-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1" UNCHECKED>
+<input type="checkbox" class="checkbox" name="Ticket-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1" unchecked />
%if ($watcher->MemberObj->IsUser) {
<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->Object->id%>">
-<%$watcher->MemberObj->Object->Name%></a>
+<%$watcher->MemberObj->Object->Name%></a>
+% if ($TicketObj and grep { $_->Content eq $watcher->MemberObj->Object->EmailAddress } $TicketObj->SquelchMailTo) {
+<b><&|/l&>(Will not be sent email)</&></b>
+% }
+
%} else {
<a href="<%$RT::WebPath%>/Admin/Groups/Modify.html?id=<%$watcher->MemberObj->Object->id%>">
<%$watcher->MemberObj->Object->Name%></a>
%}
+</li>
% }
</ul>
<%INIT>
diff --git a/rt/html/Ticket/Elements/FindAttachments b/rt/html/Ticket/Elements/FindAttachments
index 017c77288..a9d698d31 100755
--- a/rt/html/Ticket/Elements/FindAttachments
+++ b/rt/html/Ticket/Elements/FindAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Ticket/Elements/LoadTextAttachments b/rt/html/Ticket/Elements/LoadTextAttachments
index 943568fb3..fc83d6605 100755
--- a/rt/html/Ticket/Elements/LoadTextAttachments
+++ b/rt/html/Ticket/Elements/LoadTextAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -80,7 +82,9 @@ if ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text/plain');
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => 'STARTSWITH', VALUE => 'message/');
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text');
-
+ if ($RT::SuppressInlineTextFiles) {
+ $attachments->Limit ( FIELD => 'Filename', OPERATOR => 'IS', VALUE => 'NULL');
+ }
}
return ($attachments);
</%INIT>
diff --git a/rt/html/Ticket/Elements/PreviewScrips b/rt/html/Ticket/Elements/PreviewScrips
index a3492b749..423040c8e 100755
--- a/rt/html/Ticket/Elements/PreviewScrips
+++ b/rt/html/Ticket/Elements/PreviewScrips
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -86,38 +88,45 @@ my ( $Transaction, $Description, $Object ) = $TicketObj->$action(
TimeTaken => $ARGS{'UpdateTimeWorked'},
DryRun => 1
);
+unless ( $Transaction ) {
+ $RT::Logger->error("Coulfn't fire '$action' action: $Description");
+}
my @non_recipients = $TicketObj->SquelchMailTo;
</%init>
<h2><&|/l&>This message will be sent to...</&></h2>
-<i><&|/l&>(Check boxes to disable notifications to the listed recipients)</&></i><br>
+
+% if ( $Object ) {
+<i><&|/l&>(Check boxes to disable notifications to the listed recipients)</&></i><br />
% foreach my $scrip (@{$Object->Scrips->Prepared}) {
% next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail');
-<b><%$scrip->Description%></b><br>
+<b><% $scrip->Description %></b><br />
<&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name)&>[_1] [_2] with template [_3]</&>
-<br>
+<br />
%foreach my $type qw(To Cc Bcc) {
%my @addresses = $scrip->ActionObj->Action->$type();
<ul>
%foreach my $addr (@addresses) {
-<li> <b><%loc($type)%></b>: <input type="checkbox" name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>"> <%$addr->address%>
+<li> <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>" /> <%$addr->address%>
% }
</ul>
% }
% if ($RT::PreviewScripMessages) {
-<textarea cols=80 rows="5">
+<textarea cols="80" rows="5">
<%$scrip->ActionObj->TemplateObj->MIMEObj->as_string%>
</textarea>
% }
-%}
-<br>
+% }
+% }
+<br />
+
<h2><&|/l&>Messages about this ticket will not be sent to...</&></h2>
<i><&|/l&>(Check boxes to enable notifications to the listed recipients)</&></i>
-<br>
+<br />
<ul>
% foreach my $recipient (@non_recipients) {
-<li><input type="checkbox" name="Ticket-<%$TicketObj->id%>-UnsquelchMailTo" value="<%$recipient->Content%>">
+<li><input type="checkbox" class="checkbox" name="Ticket-<%$TicketObj->id%>-UnsquelchMailTo" value="<%$recipient->Content%>" />
<% $recipient->Content %>
% }
</ul>
diff --git a/rt/html/Ticket/Elements/Reminders b/rt/html/Ticket/Elements/Reminders
new file mode 100644
index 000000000..63d68c7b1
--- /dev/null
+++ b/rt/html/Ticket/Elements/Reminders
@@ -0,0 +1,168 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Ticket => undef
+$id => undef
+$ShowCompleted => 0
+$Edit => 0
+</%args>
+<%init>
+
+$Ticket = LoadTicket($id) if ($id);
+
+my $request_args = $m->request_args();
+
+my $reminder_collection = $Ticket->Reminders->Collection;
+
+if ( $request_args->{'update-reminders'} ) {
+ while ( my $reminder = $reminder_collection->Next ) {
+ if ( $reminder->Status ne 'resolved' && $request_args->{ 'Complete-Reminder-' . $reminder->id } ) {
+ $Ticket->Reminders->Resolve($reminder);
+ }
+ elsif ( $reminder->Status eq 'resolved' && !$request_args->{ 'Complete-Reminder-' . $reminder->id } ) {
+ $Ticket->Reminders->Open($reminder);
+ }
+
+ if ( exists( $request_args->{ 'Reminder-Subject-' . $reminder->id } ) && ( $reminder->Subject ne $request_args->{ 'Reminder-Subject-' . $reminder->id } )) {
+ $reminder->SetSubject( $request_args->{ 'Reminder-Subject-' . $reminder->id } ) ;
+ }
+
+ if ( exists( $request_args->{ 'Reminder-Owner-' . $reminder->id } ) && ( $reminder->Owner != $request_args->{ 'Reminder-Owner-' . $reminder->id } )) {
+ $reminder->SetOwner( $request_args->{ 'Reminder-Owner-' . $reminder->id } , "Force" ) ;
+ }
+
+ if ( exists( $request_args->{ 'Reminder-Due-' . $reminder->id } ) && ( $reminder->DueObj->Date ne $request_args->{ 'Reminder-Due-' . $reminder->id } )) {
+ $reminder->SetDue( $request_args->{ 'Reminder-Due-' . $reminder->id } ) ;
+ }
+ }
+}
+
+if ( $request_args->{'NewReminder-Subject'} ) {
+ my $due_obj = RT::Date->new( $session{'CurrentUser'} );
+ my $date = Time::ParseDate::parsedate(
+ $request_args->{'NewReminder-Due'},
+ UK => $RT::DateDayBeforeMonth,
+ PREFER_PAST => 0,
+ PREFER_FUTURE => 1
+ );
+ $due_obj->Set( Value => $date, Format => 'unix' );
+ my ( $add_id, $msg, $txnid ) = $Ticket->Reminders->Add(
+
+ Subject => $request_args->{'NewReminder-Subject'},
+ Owner => $request_args->{'NewReminder-Owner'},
+ Due => $due_obj->ISO
+ );
+}
+
+# We've made changes, let's reload our search
+
+$reminder_collection = $Ticket->Reminders->Collection;
+</%init>
+<input type="hidden" class="hidden" name="id" value="<% $Ticket->id %>" />
+<input type="hidden" class="hidden" name="update-reminders" value="1" />
+<div>
+% while (my $reminder = $reminder_collection->Next) {
+% if ($reminder->Status eq 'resolved' && !$ShowCompleted) {
+<input type="hidden" class="hidden" name="Complete-Reminder-<% $reminder->id %>" value="1" />
+% } elsif ($Edit) {
+<& SELF:EditEntry, Reminder => $reminder, Ticket => $Ticket &>
+% } else {
+<& SELF:ShowEntry, Reminder => $reminder, Ticket => $Ticket &>
+% }
+% }
+</div>
+<div>
+<h3><&|/l&>New reminder:</&></h3>
+<& SELF:NewReminder, Ticket => $Ticket &>
+<%method NewReminder>
+<%args>
+$Ticket
+</%args>
+<div class="input-row">
+<label class="horizontal" for="NewReminder-Subject" ><&|/l&>Subject</&>:</label>
+<input type="text" size="15" name="NewReminder-Subject" />
+</div>
+<div class="input-row">
+<label class="horizontal" for="NewReminder-Owner" ><&|/l&>Owner</&>:</label>
+<& /Elements/SelectOwner, Name => 'NewReminder-Owner', QueueObj => $Ticket->QueueObj, DefaultValue => 0 &>
+</div>
+<div class="input-row">
+<label class="horizontal" for="NewReminder-Due" ><&|/l&>Due</&> <&|/l&>(yyyy/mm/dd)</&>:</label>
+<& /Elements/SelectDate, Name => "NewReminder-Due", Default => "" &>
+</div>
+</div>
+</%method>
+<%method EditEntry>
+<%args>
+$Reminder
+$Ticket
+</%args>
+<input
+ type="checkbox"
+ name="Complete-Reminder-<%$Reminder->id%>"
+ <% $Reminder->Status eq 'resolved' ? 'CHECKED' : '' %>
+/>
+ <input type="text" size="15" name="Reminder-Subject-<% $Reminder->id %>" value="<%$Reminder->Subject%>" /> &bull;
+ <& /Elements/SelectOwner, Name => 'Reminder-Owner-'.$Reminder->id, Queue => $Ticket->QueueObj, Default => $Reminder->Owner, DefaultValue => 0 &>
+ <& /Elements/SelectDate, Name => 'Reminder-Due-'.$Reminder->id, Default => $Reminder->DueObj->Date &>
+ (<%$Reminder->DueObj->Unix>0 ? $Reminder->DueObj->AgeAsString : '' %>)<br />
+</%method>
+<%method ShowEntry>
+<%args>
+$Reminder
+$Ticket
+</%args>
+<input
+ type="checkbox"
+ name="Complete-Reminder-<%$Reminder->id%>"
+ <% $Reminder->Status eq 'resolved' ? 'CHECKED' : '' %>
+/>
+ <%$Reminder->Subject%> &bull;
+ <%$Reminder->OwnerObj->Name%>
+ <%$Reminder->DueObj->Unix>0 ? "&bull; ". $Reminder->DueObj->AgeAsString : '' |n%><br />
+</%method>
diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments
index 82028dd28..6f1de620a 100644
--- a/rt/html/Ticket/Elements/ShowAttachments
+++ b/rt/html/Ticket/Elements/ShowAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,13 +46,13 @@
%#
%# END BPS TAGGED BLOCK }}}
% if (keys %documents) {
-<& /Elements/TitleBoxStart, title => loc('Attachments'),
+<&| /Widgets/TitleBox, title => loc('Attachments'),
title_class=> 'inverse',
color => "#336699" &>
% foreach my $key (keys %documents) {
-<%$key%><br>
+<%$key%><br />
<ul>
% foreach my $rev (@{$documents{$key}}) {
@@ -68,7 +70,7 @@ if ($size) {
</%PERL>
<li><font size="-2">
-<A HREF="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>">
+<a href="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>">
<&|/l, $rev->CreatedAsString, $size, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3]</&>
</a>
</font></li>
@@ -77,8 +79,9 @@ if ($size) {
</ul>
% }
-<& /Elements/TitleBoxEnd &>
-<BR>
+</&>
+
+<br />
% }
<%INIT>
diff --git a/rt/html/Ticket/Elements/ShowBasics b/rt/html/Ticket/Elements/ShowBasics
index 00ed3ccd1..c2ba649d3 100644
--- a/rt/html/Ticket/Elements/ShowBasics
+++ b/rt/html/Ticket/Elements/ShowBasics
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,36 +47,36 @@
%# END BPS TAGGED BLOCK }}}
<table>
<tr>
- <td class="label"><&|/l&>Id</&>:</td>
- <td class="value"><%$Ticket->Id %></td>
+ <td class="label id"><&|/l&>Id</&>:</td>
+ <td class="value id"><%$Ticket->Id %></td>
</tr>
<tr>
- <td class="label"><&|/l&>Status</&>:</td>
- <td class="value"><&|/l&><% $Ticket->Status%></&></td>
+ <td class="label status"><&|/l&>Status</&>:</td>
+ <td class="value status"><&|/l&><% $Ticket->Status%></&></td>
</tr>
% if ($Ticket->TimeEstimated) {
<tr>
- <td class="label"><&|/l&>Estimated</&>:</td>
- <td class="value"><&|/l, $Ticket->TimeEstimated &>[_1] min</&></td>
+ <td class="label time estimated"><&|/l&>Estimated</&>:</td>
+ <td class="value time estimated"><& ShowTime, minutes => $Ticket->TimeEstimated &></td>
</tr>
% }
% if ($Ticket->TimeWorked) {
<tr>
- <td class="label"><&|/l&>Worked</&>:</td>
- <td class="value"><&|/l, $Ticket->TimeWorked &>[_1] min</&></td>
+ <td class="label time worked"><&|/l&>Worked</&>:</td>
+ <td class="value time worked"><& ShowTime, minutes => $Ticket->TimeWorked &></td>
</tr>
% }
<tr>
- <td class="label"><&|/l&>Left</&>:</td>
- <td class="value"><&|/l, $Ticket->TimeLeft &>[_1] min</&></td>
+ <td class="label time left"><&|/l&>Left</&>:</td>
+ <td class="value time left"><& ShowTime, minutes => $Ticket->TimeLeft &></td>
</tr>
<tr>
- <td class="label"><&|/l&>Priority</&>:</td>
- <td class="value"><%$Ticket->Priority%>/<%$Ticket->FinalPriority %></td>
+ <td class="label priority"><&|/l&>Priority</&>:</td>
+ <td class="value priority"><%$Ticket->Priority%>/<%$Ticket->FinalPriority %></td>
</tr>
<tr>
- <td class="label"><&|/l&>Queue</&>:</td>
- <td class="value"><%$Ticket->QueueObj->Name%></td>
+ <td class="label queue"><&|/l&>Queue</&>:</td>
+ <td class="value queue"><%$Ticket->QueueObj->Name%></td>
</tr>
<& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $Ticket, %ARGS &>
</table>
diff --git a/rt/html/Ticket/Elements/ShowCustomFields b/rt/html/Ticket/Elements/ShowCustomFields
index eb49212c5..f307d9dd2 100644
--- a/rt/html/Ticket/Elements/ShowCustomFields
+++ b/rt/html/Ticket/Elements/ShowCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates
index 2ccbb3fea..e00b5ee80 100644
--- a/rt/html/Ticket/Elements/ShowDates
+++ b/rt/html/Ticket/Elements/ShowDates
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,41 +45,41 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
- <TR>
- <TD class="label"><&|/l&>Created</&>:</TD>
- <TD class="value"><% $Ticket->CreatedObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Starts</&>:</TD>
- <TD class="value"><% $Ticket->StartsObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Started</&>:</TD>
- <TD class="value"><% $Ticket->StartedObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label"><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Action=SetTold"><&|/l&>Last Contact</&></a>:</TD>
- <TD class="value"><% $Ticket->ToldObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Due</&>:</TD>
- <TD class="value"><% $Ticket->DueObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Closed</&>:</TD>
- <TD class="value"><% $Ticket->ResolvedObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Updated</&>:</TD>
-% my $UpdatedString = $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never");
+<table>
+ <tr>
+ <td class="label date created"><&|/l&>Created</&>:</td>
+ <td class="value date created"><% $Ticket->CreatedObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date starts"><&|/l&>Starts</&>:</td>
+ <td class="value date starts"><% $Ticket->StartsObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date started"><&|/l&>Started</&>:</td>
+ <td class="value date started"><% $Ticket->StartedObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date told"><a href="<% $RT::WebPath %>/Ticket/Display.html?id=<% $Ticket->id %>&Action=SetTold"><&|/l&>Last Contact</&></a>:</td>
+ <td class="value date told"><% $Ticket->ToldObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date due"><&|/l&>Due</&>:</td>
+ <td class="value date due"><% $Ticket->DueObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date resolved"><&|/l&>Closed</&>:</td>
+ <td class="value date resolved"><% $Ticket->ResolvedObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date updated"><&|/l&>Updated</&>:</td>
+% my $UpdatedString = $Ticket->LastUpdated ? loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name) : loc("Never");
% if ($UpdatedLink) {
- <TD class="value"><A HREF="#lasttrans"><% $UpdatedString | h %></a></TD>
+ <td class="value date updated"><A HREF="#lasttrans"><% $UpdatedString | h %></a></td>
% } else {
- <TD class="value"><% $UpdatedString | h %></TD>
+ <td class="value date updated"><% $UpdatedString | h %></td>
% }
- </TR>
-</TABLE>
+ </tr>
+</table>
<%ARGS>
$Ticket => undef
$UpdatedLink => 1
diff --git a/rt/html/Ticket/Elements/ShowDependencies b/rt/html/Ticket/Elements/ShowDependencies
index f276bc949..b2f4d298d 100644
--- a/rt/html/Ticket/Elements/ShowDependencies
+++ b/rt/html/Ticket/Elements/ShowDependencies
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,19 +45,19 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&|/l&>Depends on</&>:<BR>
+<&|/l&>Depends on</&>:<br />
% while (my $Link = $Ticket->DependsOn->Next) {
% my $member = $Link->TargetObj;
<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
[<%$member->Status%>]
- <br>
+ <br />
% }
-<&|/l&>Depended on by</&>:<BR>
+<&|/l&>Depended on by</&>:<br />
% while (my $Link = $Ticket->DependedOnBy->Next) {
% my $member = $Link->TargetObj;
<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
[<%$member->Status%>]
- <br>
+ <br />
% }
<%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowGroupMembers b/rt/html/Ticket/Elements/ShowGroupMembers
index 1fdb79aab..e39bc690e 100644
--- a/rt/html/Ticket/Elements/ShowGroupMembers
+++ b/rt/html/Ticket/Elements/ShowGroupMembers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,14 +49,15 @@
% my $UserMembers = $Group->UserMembersObj;
% while (my $member = $UserMembers->Next()) {
-<& ShowUserEntry, User => $member &><br>
+<& ShowUserEntry, User => $member, Ticket => $Ticket &><br />
% }
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<&|/l&>Group</&>: <%$member->MemberObj->Object->Name%><br>
+<&|/l&>Group</&>: <%$member->MemberObj->Object->Name%><br />
% }
<%ARGS>
$Group => undef
-</%ARGS> \ No newline at end of file
+$Ticket => undef
+</%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory
index 75e34776f..45cd5122f 100644
--- a/rt/html/Ticket/Elements/ShowHistory
+++ b/rt/html/Ticket/Elements/ShowHistory
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,47 +45,45 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<%doc>
+# This is (ab)used in Admin/(Users|Groups)/History.html and should probably
+# be generalized at some point.
+</%doc>
<%perl>
- if ($ShowDisplayModes or $ShowTitle) {
-my $title;
-my $titleright;
-if ($ShowTitle) {
- $title = loc('History');
-}
-else {
- $title = '&nbsp;';
-}
-$titleright = loc('Display mode') . ":";
-if ($ShowHeaders) {
- $titleright .= "[<A HREF=\"" . $URIFile . "?id="
- . $Ticket->id . "\">"
- . loc("Brief headers")
- . "</a>] <b>["
- . loc("Full headers") . "]</b>";
-}
-else {
- $titleright .= "<b>["
- . loc("Brief headers")
- . "]</b> [<A HREF=\""
- . $URIFile
- . "?ShowHeaders=1"
- . "&id="
- . $Ticket->id . "\">"
- . loc("Full headers") . "</a>]";
-}
+if ($ShowDisplayModes or $ShowTitle) {
+ my $title = $ShowTitle
+ ? loc('History')
+ : '&nbsp;';
+
+ my $titleright;
+
+ if ($ShowDisplayModes) {
+ $titleright = q[<span style="color: black">] . loc('Display mode') . ':</span> ';
+
+ if ($ShowHeaders) {
+ $titleright .= qq{<a href="$URIFile?id=} .
+ $Ticket->id.qq{">} .
+ loc("Brief headers") .
+ qq{</a> &mdash; };
+ $titleright .= q[<span class="selected">] . loc("Full headers") . "</span>";
+ }
+ else {
+ $titleright .= q[<span class="selected">] . loc("Brief headers") . "</span> &mdash; ";
+ $titleright .= qq{<a href="$URIFile?ShowHeaders=1;id=} .
+ $Ticket->id.qq{">} .
+ loc("Full headers") .
+ qq{</a>};
+ }
+ }
</%perl>
-<& /Elements/TitleBoxStart, title => $title, titleright => $titleright, bodyclass=> ''&>
+<& /Widgets/TitleBoxStart, title => $title, titleright => $titleright &>
% }
-<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=2 BORDER=0>
+<div id="ticket-history">
<%perl>
my @attachments = @{$Attachments->ItemsArrayRef()};
my @attachment_content = @{$AttachmentContent->ItemsArrayRef()};
-
-
-
-
while ( my $Transaction = $Transactions->Next ) {
my $skip = 0;
$m->comp( '/Elements/Callback',
@@ -123,9 +123,9 @@ $m->flush_buffer();
}
</%perl>
-</TABLE>
+</div>
% if ($ShowDisplayModes or $ShowTitle) {
-<& /Elements/TitleBoxEnd &>
+<& /Widgets/TitleBoxEnd &>
% }
<%INIT>
my $Transactions = new RT::Transactions($session{'CurrentUser'});
@@ -136,8 +136,16 @@ if ($Tickets) {
} else {
$Transactions = $Ticket->Transactions;
}
-my $i;
+
+my $OldestFirst = $RT::OldestTransactionsFirst? 'ASC': 'DESC';
+$Transactions->OrderByCols( { FIELD => 'Created',
+ ORDER => $OldestFirst },
+ { FIELD => 'id',
+ ORDER => $OldestFirst },
+ );
+
+my $i;
$Attachments ||= $m->comp('/Ticket/Elements/FindAttachments', Ticket => $Ticket, Tickets => $Tickets || undef);
$AttachmentContent ||= $m->comp('/Ticket/Elements/LoadTextAttachments', Ticket => $Ticket);
diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers
index f4fec1c7c..4bf592555 100644
--- a/rt/html/Ticket/Elements/ShowMembers
+++ b/rt/html/Ticket/Elements/ShowMembers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,15 +46,15 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ($members->Count) {
-<UL>
+<ul>
% while (my $link = $members->Next) {
% my $member= $link->BaseObj;
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%loc($member->Status)%>]<br>
+<li><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%loc($member->Status)%>]<br />
% if ($depth < 8) {
<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &>
% }
% }
-</UL>
+</ul>
% }
<%INIT>
diff --git a/rt/html/Ticket/Elements/ShowMessageHeaders b/rt/html/Ticket/Elements/ShowMessageHeaders
index 8dc76bae3..81c56375d 100644
--- a/rt/html/Ticket/Elements/ShowMessageHeaders
+++ b/rt/html/Ticket/Elements/ShowMessageHeaders
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,15 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% use Data::Dumper;
<table>
% foreach my $header (@headers) {
-% next unless ($display_headers{'_all'} || $display_headers{lc($header->{'Tag'})});
-<tr>
-<td align="right" class="message-header-key"><%$header->{'Tag'}%>:</td>
-<td class="message-header-value"><%$header->{'Value'} | n%></td>
-</tr>
+% next unless $display_headers{_all}
+% or ($display_headers{ lc $header->{Tag} }
+% and length $header->{Value});
+ <tr>
+ <td align="right" class="message-header-key"><%$header->{'Tag'}%>:</td>
+ <td class="message-header-value"><%$header->{'Value'} | n%></td>
+ </tr>
% }
</table>
<%INIT>
@@ -61,23 +64,24 @@ $m->comp('/Elements/Callback', content => \$content, %ARGS);
# we'll display the value without escaping later (for MakeClicky et al.)
$content = $m->interp->apply_escapes($content, 'h');
-my @lines = split (/\n/,$content);
+my @lines = split /\n/, $content;
my $in_header = 0;
-my @headers =();
-foreach (@lines) {
+my @headers;
+
+for (@lines) {
if (/^(\S+):\s+(.*)$/) {
- push (@headers, { Tag => $1, Value => $2} );
- } elsif ($headers[-1]) {
+ push @headers, { Tag => $1, Value => $2 };
+ }
+ elsif (/^\s+/) {
$headers[-1]->{'Value'} .= $_;
- } else {
-
- push (@headers, { Tag => $_, Value => ''} );
+ }
+ else {
+ s/:$//;
+ push @headers, { Tag => $_, Value => '' };
}
}
-my %display_headers;
-
-map { $display_headers{lc($_)} = 1 } @$DisplayHeaders;
+my %display_headers = map { lc($_) => 1 } @$DisplayHeaders;
$m->comp('/Elements/Callback', _CallbackName => 'Headers', content => \$content, headers => \@headers, display_headers => \%display_headers, %ARGS);
diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza
index eaf551de9..8040096f1 100644
--- a/rt/html/Ticket/Elements/ShowMessageStanza
+++ b/rt/html/Ticket/Elements/ShowMessageStanza
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
% if (ref($Message)) {
-<font color="<%$colors[$Depth]%>">
+<div class="message-stanza-depth-<% $Depth %>">
<%perl>
foreach my $stanza (@$Message) {
if ( ref $stanza eq "ARRAY" ) {
@@ -57,24 +59,23 @@ foreach my $stanza (@$Message) {
my $content = $stanza->{raw};
RT::Interface::Web::EscapeUTF8(\$content);
$m->comp('/Elements/Callback', content => \$content, %ARGS);
- $content =~ s/\n/<br>/gi if defined $content;
+ $content =~ s{$}{<br />}mg
+ if defined $content;
</%perl>
-<%$content |n%><br>
-% }
+<%$content |n%>
+% }
% } # end foreach
-</font>
+</div>
% } else {
-% my $content = $Message;
-% RT::Interface::Web::EscapeUTF8(\$content);
-% $m->comp('/Elements/Callback', content => \$content, %ARGS);
-% $content =~ s/\n/<br>/gi;
-<%$content |n%><br>
+% my $content = $Message;
+% RT::Interface::Web::EscapeUTF8(\$content);
+% $m->comp('/Elements/Callback', content => \$content, %ARGS);
+% $content =~ s{$}{<br />}mg;
+<%$content |n%>
% }
<%INIT>
use URI::URL;
-my $server = 'fsck.com';
-my @colors = ('#000000', '#660000', '#006600', '#000066', '#cc0000', '#00cc00', '#0000cc', '#ff0000', '#00ff00', '#0000ff');
</%INIT>
<%ARGS>
$Message => undef
diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople
index dbec93928..76336ecdc 100644
--- a/rt/html/Ticket/Elements/ShowPeople
+++ b/rt/html/Ticket/Elements/ShowPeople
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,19 +48,19 @@
<table>
<tr>
<td class="label"><&|/l&>Owner</&>:</td>
- <td class="value"><& ShowUserEntry, User => $Ticket->OwnerObj &></td>
+ <td class="value"><& ShowUserEntry, User => $Ticket->OwnerObj, Ticket => $Ticket &></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>Requestors</&>:</td>
- <td class="value"><& ShowGroupMembers, Group => $Ticket->Requestors &></td>
+ <td class="value"><& ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>Cc</&>:</td>
- <td class="value"><& ShowGroupMembers, Group => $Ticket->Cc &></td>
+ <td class="value"><& ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>AdminCc</&>:</td>
- <td class="value"><& ShowGroupMembers, Group => $Ticket->AdminCc &></td>
+ <td class="value"><& ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></td>
</tr>
</table>
<%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor
index 421d38e0a..d7fe6b185 100644
--- a/rt/html/Ticket/Elements/ShowRequestor
+++ b/rt/html/Ticket/Elements/ShowRequestor
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,42 +47,41 @@
%# END BPS TAGGED BLOCK }}}
<%PERL>
my $rows = 10;
+my $has_right_adminusers = $session{'CurrentUser'}->HasRight(Object => $RT::System, Right => 'AdminUsers');
my $people = $Ticket->Requestors->UserMembersObj;
while (my $requestor=$people->Next) {
+next if $requestor->Privileged;
my $name=$requestor->RealName || $requestor->EmailAddress;
my $tickets = RT::Tickets->new($session{'CurrentUser'});
-$tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $requestor->EmailAddress );
-$tickets->LimitStatus( VALUE => 'open');
-$tickets->LimitStatus( VALUE => 'new');
+$tickets->FromSQL( "Requestor.id = ". $requestor->id ." AND (Status = 'open' OR Status = 'new')" );
$tickets->RowsPerPage($rows);
-$tickets->OrderBy(FIELD => 'Priority',
- ORDER => 'DESC');
+$tickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC');
</%PERL>
-% unless ($requestor->Privileged) {
-<& /Elements/TitleBoxStart,
- title => "<a class='inverse' href=\"$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id."\">".loc("More about [_1]", $name)."</a>" &>
+<&| /Widgets/TitleBox,
+ title_href => $has_right_adminusers ? "$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id : undef,
+ title=> loc("More about [_1]", $name),
+&>
%# Additional information about this user. Empty by default.
<& /Elements/Callback, _CallbackName => 'AboutThisUser', requestor => $requestor, %ARGS &>
-<&|/l&>Comments about this user</&>:<BR>
-<B><% ($requestor->Comments || loc("No comment entered about this user")) %></B><BR>
+<&|/l&>Comments about this user</&>:<br />
+<b><% ($requestor->Comments || loc("No comment entered about this user")) %></b><br />
-<&|/l, $rows &>This user's [_1] highest priority tickets</&>:<BR>
-<UL>
+<&|/l, $rows &>This user's [_1] highest priority tickets</&>:<br />
+<ul>
%while (my $w=$tickets->Next) {
-<LI><a href="<%$RT::WebPath%><%$DisplayPath%>?id=<%$w->id%>"><%$w->Id%>: <%$w->Subject%></a> (<%$w->Status%>)
+<li><a href="<%$RT::WebPath%><%$DisplayPath%>?id=<%$w->id%>"><%$w->Id%>: <%$w->Subject%></a> (<%$w->Status%>)
%}
-</UL>
+</ul>
-<&|/l&>Groups this user belongs to</&>:<BR>
+<&|/l&>Groups this user belongs to</&>:<br />
<& /Elements/ShowMemberships, UserObj => $requestor &>
-<& /Elements/TitleBoxEnd &>
+</&>
-% }
%}
<%ARGS>
$Ticket=>undef
diff --git a/rt/html/Ticket/Elements/ShowTime b/rt/html/Ticket/Elements/ShowTime
new file mode 100644
index 000000000..92e84f681
--- /dev/null
+++ b/rt/html/Ticket/Elements/ShowTime
@@ -0,0 +1,55 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+% if ($minutes < 60) {
+<&|/l, $minutes &>[_1] min</&>
+% } else {
+<&|/l, sprintf("%.1f",$minutes / 60) &>[quant,_1,hour]</&> (<&|/l, $minutes &>[_1] min</&>)
+% }
+<%ARGS>
+$minutes
+</%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction
index 8bf589d45..12d8d3b68 100644
--- a/rt/html/Ticket/Elements/ShowTransaction
+++ b/rt/html/Ticket/Elements/ShowTransaction
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,25 +45,33 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>" >
-<TD rowspan="2" valign="top" bgcolor="<%$bgcolor%>"><A NAME="txn-<%$Transaction->Id%>" href="<% $DisplayPath %>#txn-<%$Transaction->Id%>">#</A><% $LastTransaction ? '<a name="lasttrans">&nbsp;</a>' : '&nbsp;' |n %></TD>
-<TD>&nbsp&nbsp;</TD>
-<TD><font size=-2><% $transdate|n %></font>&nbsp;</TD>
+<div class="ticket-transaction<% $type_class && " $type_class" %><% $RowNum % 2 ? ' odd' : ' even' %>">
+<table width="100%" cellspacing="0" cellpadding="2" border="0">
+ <tr>
+ <td rowspan="2" valign="top" class="type">
+ <a name="txn-<%$Transaction->Id%>" href="<% $DisplayPath %>#txn-<%$Transaction->Id%>">#</a>
+ <% $LastTransaction ? '<a name="lasttrans">&nbsp;</a>' : '&nbsp;' |n %>
+ </td>
+ <td class="date"><% $transdate|n %></td>
% my $desc = $Transaction->BriefDescription;
% $m->comp('/Elements/Callback', _CallbackName => 'ModifyDisplay', text => \$desc, Transaction => $Transaction, %ARGS);
-<TD ALIGN="LEFT"><b><%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%>
-
-</b></TD>
-<TD><%$TimeTaken%>&nbsp;</TD>
-<TD ALIGN="RIGHT"><font size=-1><%$titlebar_commands|n%></font></TD>
-</TR>
-<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>"><TD colspan=5>
+ <td class="description">
+ <%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%>
+ </td>
+ <td class="time-taken"><%$TimeTaken%></td>
+ <td class="actions"><%$titlebar_commands|n%></td>
+ </tr>
+
+ <tr>
+ <td colspan="4" class="content">
% if ($Transaction->CustomFieldValues->Count) {
-<& /Elements/ShowCustomFields, Object => $Transaction &>
+ <& /Elements/ShowCustomFields, Object => $Transaction &>
% }
% $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody);
-</TD>
-</TR>
+ </td>
+ </tr>
+</table>
+</div>
<%ARGS>
$Ticket => undef
@@ -82,37 +92,37 @@ $LastTransaction => 0
<%INIT>
-my ( $TimeTaken, $TicketString, $bgcolor );
+my ( $TimeTaken, $TicketString, $type_class );
my $transdate = $Transaction->CreatedAsString();
$transdate =~ s/\s/&nbsp;/g;
if ( $Transaction->Type =~ /^(Create|Correspond|Comment$)/ ) {
if ( $Transaction->IsInbound ) {
- $bgcolor = "#336699";
+ $type_class = 'message';
}
else {
- $bgcolor = "#339999";
+ $type_class = 'message';
}
}
elsif ( ( $Transaction->Field =~ /^Owner$/ )
or ( $Transaction->Type =~ /^(AddWatcher|DelWatcher)$/ ) ) {
- $bgcolor = "#333399";
+ $type_class = 'people';
}
elsif ( $Transaction->Type =~ /^(AddLink|DeleteLink)$/ ) {
- $bgcolor = "#336633";
+ $type_class = 'links';
}
elsif ( $Transaction->Type =~ /^(Status|Set|Told)$/ ) {
if ( $Transaction->Field =~ /^(Told|Starts|Started|Due)$/ ) {
- $bgcolor = "#663366";
+ $type_class = 'dates';
}
else {
- $bgcolor = "#993333";
+ $type_class = 'basics';
}
}
else {
- $bgcolor = "#cccccc";
+ $type_class = 'other';
}
if ( $Ticket->Id != $Transaction->Ticket ) {
@@ -138,15 +148,15 @@ my @DisplayHeaders=qw ( _all);
if ( $Transaction->Type =~ /EmailRecord$/ ) {
@DisplayHeaders = qw(To Cc Bcc);
+ my $aid =
+
$titlebar_commands .=
"[<a target=\"_blank\" href=\"$EmailRecordPath?id="
. $Transaction->Ticket
. "&Transaction="
. $Transaction->Id
. "&Attachment="
- . ( $Transaction->Attachments->First
- && $Transaction->Attachments->First->Id )
-
+ . ( $Attachments->[0] && $Attachments->[0]->id )
. '">' . loc('Show') . "</a>]&nbsp;";
$ShowBody = 0;
}
diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments
index d9e94ffa2..9a66ee780 100644
--- a/rt/html/Ticket/Elements/ShowTransactionAttachments
+++ b/rt/html/Ticket/Elements/ShowTransactionAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -79,10 +81,10 @@ foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) {
}
</%PERL>
-<A HREF="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | u%>"><&|/l&>Download</&> <%$message->Filename || loc('(untitled)') %></a>
-<div class="downloadcontenttype">
-<%$message->ContentType%> <% $size %>
-</div>
+<a href="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | u%>"><&|/l&>Download</&> <%$message->Filename || loc('(untitled)') %></a>
+<span class="downloadcontenttype">
+[<%$message->ContentType%> <% $size %>]
+</span>
</div>
% }
% # }}}
@@ -95,6 +97,7 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
# If it's text
if ( $message->ContentType =~ m{^(text|message)}i
+ && !($RT::SuppressInlineTextFiles && $message->Filename)
&& $message->ContentLength <= $RT::MaxInlineBody )
{
@@ -136,7 +139,7 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
# if it's a text/plain show the body
elsif ( $message->ContentType =~ m{^(text|message|text)}i ) {
- eval { $content = Text::Quoted::extract($content); };
+ eval { require Text::Quoted; $content = Text::Quoted::extract($content); };
if ($@) { 1; }
$m->comp(
@@ -151,12 +154,12 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
}
# if it's an image, show it as an image
- elsif ( $message->ContentType =~ /^image\//i ) {
+ elsif ( $RT::ShowTransactionImages and $message->ContentType =~ /^image\//i ) {
$m->out('<img src="'
. $AttachPath . '/'
. $Transaction->Id . '/'
. $message->Id
- . '/">' );
+ . '/" />' );
}
elsif ( $message->ContentLength > 0 ) {
$m->out(
diff --git a/rt/html/Ticket/Elements/ShowUserEntry b/rt/html/Ticket/Elements/ShowUserEntry
index 163bcbdb1..8481c143b 100644
--- a/rt/html/Ticket/Elements/ShowUserEntry
+++ b/rt/html/Ticket/Elements/ShowUserEntry
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,11 @@
% if ($User->EmailAddress && $User->EmailAddress ne $User->Name) {
&lt;<%$User->EmailAddress%>&gt;
% }
+% if ($Ticket and grep { $_->Content eq $User->EmailAddress } $Ticket->SquelchMailTo) {
+<b><&|/l&>(Will not be sent email)</&></b>
+% }
<%ARGS>
$User => undef
-</%ARGS> \ No newline at end of file
+$Ticket => undef
+</%ARGS>
diff --git a/rt/html/Ticket/History.html b/rt/html/Ticket/History.html
index a80cd0002..400526f62 100644
--- a/rt/html/Ticket/History.html
+++ b/rt/html/Ticket/History.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,7 +50,7 @@
Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id,
Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
-<BR>
+<br />
<& /Ticket/Elements/ShowHistory ,
Ticket => $Ticket,
diff --git a/rt/html/Ticket/Modify.html b/rt/html/Ticket/Modify.html
index a6c316141..488e0ad46 100644
--- a/rt/html/Ticket/Modify.html
+++ b/rt/html/Ticket/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,13 +51,13 @@
Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="Modify.html" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>">
-
-<& /Elements/TitleBoxStart, title => loc('Modify ticket #[_1]',$TicketObj->Id), color=> "#993333", width => "100%" &>
+<form method="post" action="Modify.html" enctype="multipart/form-data">
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<input type="hidden" class="hidden" name="id" value="<%$TicketObj->Id%>" />
+<&| /Widgets/TitleBox, title => loc('Modify ticket #[_1]',$TicketObj->Id) &>
<& Elements/EditBasics, TicketObj => $TicketObj &>
<& Elements/EditCustomFields, TicketObj => $TicketObj &>
-<& /Elements/TitleBoxEnd &>
+</&>
<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#993333" &>
</form>
@@ -65,12 +67,16 @@ my $TicketObj = LoadTicket($id);
my $CustomFields = $TicketObj->QueueObj->TicketCustomFields();
# Now let callbacks have a chance at editing %ARGS
-$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, %ARGS);
+$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS);
my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
my @cf_results = ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
push (@results, @cf_results);
+# undef so that TransactionBatch scrips run and update the ticket
+$TicketObj = undef;
+$TicketObj = LoadTicket($id);
+
# TODO: display the results, even if we can't display the ticket
unless ($TicketObj->CurrentUserHasRight('ShowTicket')) {
diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html
index 23cd93570..7f7ae30bd 100644
--- a/rt/html/Ticket/ModifyAll.html
+++ b/rt/html/Ticket/ModifyAll.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,37 +53,37 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="ModifyAll.html" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>">
+<form method="post" action="ModifyAll.html" enctype="multipart/form-data">
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
-
-<& /Elements/TitleBoxStart, title => loc('Modify ticket # [_1]', $Ticket->Id), color=> "#993333", width => "100%" &>
+<&| /Widgets/TitleBox, title => loc('Modify ticket # [_1]', $Ticket->Id) &>
<& Elements/EditBasics, TicketObj => $Ticket &>
<& Elements/EditCustomFields, TicketObj => $Ticket &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
-<& /Elements/TitleBoxStart, title => loc('Dates'), width => "100%", color => "#663366" &>
+<&| /Widgets/TitleBox, title => loc('Dates') &>
<& Elements/EditDates, TicketObj => $Ticket &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
-<& /Elements/TitleBoxStart, title => loc('People'),width => "100%", color=> "#333399" &>
+<&| /Widgets/TitleBox, title => loc('People') &>
<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
-<& /Elements/TitleBoxStart, title => loc('Links'), color => "#336633"&>
+<&| /Widgets/TitleBox, title => loc('Links') &>
<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
-<& /Elements/TitleBoxStart, title => loc('Update ticket') &>
+<&| /Widgets/TitleBox, title => loc('Update ticket') &>
<table>
<tr>
<td class="label"><&|/l&>Update Type</&>:</td>
@@ -98,29 +100,29 @@
</tr>
<tr>
<td class="label"><&|/l&>Subject</&>:</td>
- <td class="entry"><input name="UpdateSubject" size=60 value="<%$Ticket->Subject%>"></td>
+ <td class="entry"><input name="UpdateSubject" size="60" value="<%$Ticket->Subject%>" /></td>
</tr>
% if (my $TxnCFs = $Ticket->TransactionCustomFields) {
% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD class="label"><% $CF->Name %>:</TD>
-<TD class="entry"><& /Elements/EditCustomField,
+<tr>
+<td class="label"><% $CF->Name %>:</td>
+<td class="entry"><& /Elements/EditCustomField,
CustomField => $CF,
NamePrefix => "Object-RT::Transaction--CustomField-"
- &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
+ &><em><% $CF->FriendlyType %></em></td>
+</td></tr>
% } # end if while
% } # end of if
<tr>
<td class="label"><&|/l&>Attach</&>:</td>
- <td class="entry"><input name="UpdateAttachment" type=file></td>
+ <td class="entry"><input name="UpdateAttachment" type="file" /></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>Content</&>:</td>
<td class="entry"><& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &></td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
+</&>
<& /Elements/Submit,
@@ -145,9 +147,20 @@ $CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or
$Ticket->CurrentUserHasRight('ModifyTicket') );
+$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS);
my (@wresults, @results, @dresults, @lresults, @cf_results);
unless ($OnlySearchForPeople) {
+ # There might be two owners.
+ if ( ref ($ARGS{'Owner'} )) {
+ my @owners =@{$ARGS{'Owner'}};
+ delete $ARGS{'Owner'};
+ foreach my $owner(@owners){
+ $ARGS{'Owner'} = $owner unless ($Ticket->OwnerObj->id == $owner);
+ }
+
+ }
+
@wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS);
@cf_results = ProcessObjectCustomFieldUpdates( Object => $Ticket, ARGSRef => \%ARGS);
@dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS);
@@ -169,7 +182,7 @@ unless ($OnlySearchForPeople) {
$ARGS{'UpdateAttachments'}->{ $subject } = $attachment;
}
- $ARGS{'UpdateContent'} =~ s/\r+\n/\n/g;
+ $ARGS{'UpdateContent'} =~ s/\r+\n/\n/g if $ARGS{'UpdateContent'};
if ($ARGS{'UpdateAttachments'} || ( $ARGS{'UpdateContent'} && $ARGS{'UpdateContent'} ne "-- \n" .
$session{'CurrentUser'}->UserObj->Signature)) {
@@ -182,6 +195,10 @@ push @results, @dresults;
push @results, @lresults;
push @results, @cf_results;
+# undef so that TransactionBatch scrips run and update the ticket
+$Ticket = undef;
+$Ticket = LoadTicket($id);
+
# If they've gone and moved the ticket to somewhere they can't see, etc...
# TODO: display the results, even if we can't display the ticket.
diff --git a/rt/html/Ticket/ModifyDates.html b/rt/html/Ticket/ModifyDates.html
index a4f68f2f5..d12619002 100644
--- a/rt/html/Ticket/ModifyDates.html
+++ b/rt/html/Ticket/ModifyDates.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,19 +53,20 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="ModifyDates.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>">
-<& /Elements/TitleBoxStart, title => loc('Modify dates for ticket # [_1]', $TicketObj->Id), width => "100%", color => "#663366" &>
-
+<form method="post" action="ModifyDates.html">
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<input type="hidden" class="hidden" name="id" value="<%$TicketObj->Id%>" />
+<&| /Widgets/TitleBox,title => loc('Modify dates for ticket # [_1]', $TicketObj->Id) &>
<& Elements/EditDates, TicketObj => $TicketObj &>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Label => loc('Save Changes'), color => "#663366" &>
+</&>
+<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
<%INIT>
my $TicketObj = LoadTicket($id);
+$m->comp('/Elements/Callback', TicketObj => $TicketObj, ARGSRef => \%ARGS);
my @results = ProcessTicketDates( TicketObj => $TicketObj, ARGSRef => \%ARGS);
</%INIT>
diff --git a/rt/html/Ticket/ModifyLinks.html b/rt/html/Ticket/ModifyLinks.html
index 150597d89..9baa954aa 100644
--- a/rt/html/Ticket/ModifyLinks.html
+++ b/rt/html/Ticket/ModifyLinks.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,12 +54,13 @@
<& /Elements/ListActions, actions => \@results &>
<form action="ModifyLinks.html" method="post">
-<input type="hidden" name="id" value="<%$Ticket->id%>">
+<input type="hidden" class="hidden" name="id" value="<%$Ticket->id%>" />
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<&| /Widgets/TitleBox, title => loc('Edit Links') &>
-<& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&>
<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, color => "#336633", Label => loc('Save Changes') &>
+</&>
+<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
@@ -66,6 +69,7 @@
<%INIT>
my $Ticket = LoadTicket($id);
+$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS);
my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
</%INIT>
diff --git a/rt/html/Ticket/ModifyPeople.html b/rt/html/Ticket/ModifyPeople.html
index 61cbe6c27..aa3811269 100644
--- a/rt/html/Ticket/ModifyPeople.html
+++ b/rt/html/Ticket/ModifyPeople.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,11 +53,12 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="ModifyPeople.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>">
-<& /Elements/TitleBoxStart, title => loc('Modify people related to ticket #[_1]', $Ticket->Id), width => "100%", color=> "#333399" &>
+<form method="post" action="ModifyPeople.html">
+<input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<&| /Widgets/TitleBox, title => loc('Modify people related to ticket #[_1]', $Ticket->Id), width => "100%", color=> "#333399" &>
<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp, GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField &>
-<& /Elements/TitleBoxEnd &>
+</&>
<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
</form>
@@ -64,6 +67,7 @@
my (@results, @wresults);
my $Ticket = LoadTicket($id);
+$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS);
# if we're trying to search for watchers and nothing else
unless ($OnlySearchForPeople or $OnlySearchForGroup) {
diff --git a/rt/html/Ticket/Reminders.html b/rt/html/Ticket/Reminders.html
new file mode 100755
index 000000000..2a3ba4c08
--- /dev/null
+++ b/rt/html/Ticket/Reminders.html
@@ -0,0 +1,71 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => loc("Reminder ticket #[_1]", $Ticket->Id) &>
+<& /Ticket/Elements/Tabs,
+ Ticket => $Ticket,
+ current_tab => "Ticket/Reminders.html?id=".$Ticket->Id,
+ Title => loc("Reminders for ticket #[_1]", $Ticket->Id) &>
+<form action="<%$RT::WebPath%>/Ticket/Reminders.html" method="post">
+<&|/Widgets/TitleBox, title => loc("Reminders"),
+ title_class=> 'inverse',
+ color => "#666699" &>
+
+<& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 1, Edit => 1 &>
+</&>
+<& /Elements/Submit, Label => 'Save'&>
+</form>
+
+
+<%INIT>
+
+my $Ticket = LoadTicket($id);
+
+</%INIT>
+<%ARGS>
+$id => undef
+</%ARGS>
diff --git a/rt/html/Ticket/ShowEmailRecord.html b/rt/html/Ticket/ShowEmailRecord.html
index 38eddd3d2..f77406c77 100644
--- a/rt/html/Ticket/ShowEmailRecord.html
+++ b/rt/html/Ticket/ShowEmailRecord.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -61,7 +63,7 @@ $Transaction => undef
</%init>
<& /Elements/Header, ShowBar => 0 &>
-<pre>
+<pre style="padding: 2em;">
<%$AttachmentObj->Headers%>
<%$AttachmentObj->Content%>
diff --git a/rt/html/Ticket/Update.html b/rt/html/Ticket/Update.html
index df739c9c7..3d2a0c5a4 100644
--- a/rt/html/Ticket/Update.html
+++ b/rt/html/Ticket/Update.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,26 +50,28 @@
Ticket => $TicketObj,
Title=> $title &>
-<FORM ACTION="Update.html" NAME="TicketUpdate"
- METHOD=POST enctype="multipart/form-data">
-<input type="hidden" name="QuoteTransaction" value="<% $ARGS{QuoteTransaction} %>">
-<input type="hidden" name="DefaultStatus" value="<% $DefaultStatus %>">
-<input type="hidden" name="Action" value="<% $ARGS{Action} %>">
+<form action="Update.html" name="TicketUpdate"
+ method="post" enctype="multipart/form-data">
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<input type="hidden" class="hidden" name="QuoteTransaction" value="<% $ARGS{QuoteTransaction} %>" />
+<input type="hidden" class="hidden" name="DefaultStatus" value="<% $DefaultStatus %>" />
+<input type="hidden" class="hidden" name="Action" value="<% $ARGS{Action} %>" />
+<table border="0">
-<TABLE BORDER=0>
-
-<tr><td align=right><&|/l&>Status</&>:</td>
+<tr><td align="right"><&|/l&>Status</&>:</td>
<td>
<& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&>
<&|/l&>Owner</&>:
<& /Elements/SelectOwner, Name=>"Owner", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj, Default => $ARGS{'Owner'} &>
-<&|/l&>Worked</&>: <input size=4 name="UpdateTimeWorked" value="<% $ARGS{UpdateTimeWorked}%>"> <&|/l&>minutes</&></td></tr>
+<&|/l&>Worked</&>: <input size="4" name="UpdateTimeWorked" value="<% $ARGS{UpdateTimeWorked} %>" />
+<& /Elements/SelectTimeUnits, Name => 'UpdateTimeWorked'&>
+</td></tr>
% my $skip;
<& /Elements/Callback, _CallbackName => 'BeforeUpdateType', skip => \$skip, %ARGS &>
% if (!$skip) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>"><br>
+<input type="hidden" class="hidden" name="id" value="<%$TicketObj->Id%>" /><br />
% }
-<tr><td align=right><&|/l&>Update Type</&>:</td>
+<tr><td align="right"><&|/l&>Update Type</&>:</td>
<td><select name="UpdateType">
% if ($CanComment) {
<option value="private" <%$ARGS{'UpdateType'} eq "private" ? "SELECTED" : !$ARGS{'UpdateType'}&&$CommentDefault%>><&|/l&>Comments (Not sent to requestors)</&></option>
@@ -77,41 +81,41 @@
% }
</select>
</td></tr>
-<tr><td align=right><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size=60 value="<% $ARGS{UpdateSubject} || $TicketObj->Subject()%>"></td></tr>
-<tr><td align=right><&|/l&>Cc</&>:</td><td> <input name="UpdateCc" size=60
-value="<% $ARGS{UpdateCc} %>"><BR>
-<i><font size=-2>
-<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does <b>not</b> change who will receive future updates.)</&></font></i>
+<tr><td align="right"><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size="60" value="<% $ARGS{UpdateSubject} || $TicketObj->Subject()%>" /></td></tr>
+<tr><td align="right"><&|/l&>Cc</&>:</td><td> <input name="UpdateCc" size="60"
+value="<%$ARGS{UpdateCc}||""%>" /><br />
+<i><font size="-2">
+<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does <strong>not</strong> change who will receive future updates.)</&></font></i>
</td></tr>
-<tr><td align=right><&|/l&>Bcc</&>:</td><td> <input name="UpdateBcc" size=60 VALUE="<%$ARGS{UpdateBcc}%>"><BR>
-<i><font size=-2>
-<&|/l&>(Sends a blind carbon-copy of this update to a comma-delimited list of email addresses. Does <b>not</b> change who will receive future updates.)</&></font></i>
+<tr><td align="right"><&|/l&>Bcc</&>:</td><td> <input name="UpdateBcc" size="60" value="<%$ARGS{UpdateBcc}||""%>" /><br />
+<i><font size="-2">
+<&|/l&>(Sends a blind carbon-copy of this update to a comma-delimited list of email addresses. Does <strong>not</strong> change who will receive future updates.)</&></font></i>
</td></tr>
% if (exists $session{'Attachments'}) {
-<TD>
+<td>
<&|/l&>Attached file</&>:
-</TD>
-<TD COLSPAN=5>
-<&|/l&>Check box to delete</&><BR>
+</td>
+<td colspan="5">
+<&|/l&>Check box to delete</&><br />
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
% } # end of foreach
-</TD>
-</TR>
-<TR>
+</td>
+</tr>
+<tr>
% } # end of if
% if (my $TxnCFs = $TicketObj->TransactionCustomFields) {
% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD ALIGN=RIGHT><% $CF->Name %>:</TD>
-<TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
- "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></TD>
-</TR>
+<tr>
+<td align="right"><% $CF->Name %>:</td>
+<td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
+ "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></td>
+</tr>
% } # end if while
% } # end of if
-<tr><td align=right><&|/l&>Attach</&>:</td><td><input name="Attach" type="file"><INPUT TYPE=SUBMIT NAME="AddMoreAttach" VALUE="<&|/l&>Add More Files</&>"><input type="hidden" name="UpdateAttach" value="1">
+<tr><td align="right"><&|/l&>Attach</&>:</td><td><input name="Attach" type="file" /><input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" /><input type="hidden" class="hidden" name="UpdateAttach" value="1" />
</td></tr>
<tr><td align="right" valign="top"><&|/l&>Message</&>:</td><td>
<& /Elements/Callback, _CallbackName => 'BeforeMessageBox', %ARGS &>
@@ -134,7 +138,7 @@ value="<% $ARGS{UpdateCc} %>"><BR>
% if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) {
<& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &>
% }
-</FORM>
+</form>
<%INIT>
my $CanRespond = 0;
my $CanComment = 0;
diff --git a/rt/html/Tools/Elements/Tabs b/rt/html/Tools/Elements/Tabs
index fc4153b98..cd6d16916 100644
--- a/rt/html/Tools/Elements/Tabs
+++ b/rt/html/Tools/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,25 +47,35 @@
%# END BPS TAGGED BLOCK }}}
<& /Elements/Tabs,
tabs => $tabs,
- current_toptab => 'Tools/Offline.html',
+ current_toptab => 'Tools/index.html',
current_tab => $current_tab,
Title => $Title &>
<%INIT>
- my $tabs = { a => { title => loc('Offline'),
- path => 'Tools/Offline.html',
- },
- };
+my $tabs = {
+ a => {
+ title => loc('Offline'),
+ path => 'Tools/Offline.html',
+ },
+ b => {
+ title => loc('Reports'),
+ path => 'Tools/Reports/index.html',
+ },
+ c => {
+ title => loc('My Day'),
+ path => 'Tools/MyDay.html',
+ },
+};
- foreach my $tab (sort keys %{$tabs}) {
- if ($tabs->{$tab}->{'path'} eq $current_tab) {
- $tabs->{$tab}->{"subtabs"} = $subtabs;
- $tabs->{$tab}->{"current_subtab"} = $current_subtab;
+$m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
+
+foreach my $tab ( sort keys %{$tabs} ) {
+ if ( $tabs->{$tab}->{'path'} eq $current_tab ) {
+ $tabs->{$tab}->{"subtabs"} = $subtabs;
+ $tabs->{$tab}->{"current_subtab"} = $current_subtab;
}
- }
+}
</%INIT>
-
-
<%ARGS>
$subtabs => undef
$current_tab => undef
diff --git a/rt/html/Tools/MyDay.html b/rt/html/Tools/MyDay.html
index a20209c9b..c5128417c 100644
--- a/rt/html/Tools/MyDay.html
+++ b/rt/html/Tools/MyDay.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,37 +45,67 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, title => "What I did today" &>
+<& /Elements/Header, Title => $title &>
+<& /Tools/Elements/Tabs, current_tab => "Tools/MyDay.html", Title => $title &>
+
+<& /Elements/ListActions, actions => \@results &>
+
(displaying new and open tickets for <%$session{'CurrentUser'}->Name%>)
-<FORM METHOD=POST ACTION="MyDay.html">
-<TABLE width=100% cellpadding=0 cellspacing=0>
+<form method="post" action="MyDay.html">
+<table width="100%" cellpadding="0" cellspacing="0">
% while ( my $Ticket = $Tickets->Next()) {
% my $class;
% $i++;
% if ($i % 2 ) {
% $class = 'class="oddline"';
% }
-<TR <%$class|n%>><TD COLSPAN=2><h2><A
-HREF="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id%>:
-<%$Ticket->Subject%></A></h2></td></tr>
-<TR <%$class|n%>><TD><SPAN CLASS=label>Worked:</SPAN><input size=3 name="UpdateTimeWorked-<%$Ticket->Id%>"> minutes
-</TD>
-<TD ROWSPAN=2><SPAN CLASS=label>Comments:<br></SPAN><textarea name="UpdateContent-<%$Ticket->Id%>" rows=5
-cols=60></textarea></TD></TR>
-<TR <%$class|n%>>
-<TD><SPAN CLASS="label">Status:</SPAN> <& /Elements/SelectStatus, Name=> 'UpdateStatus-'.$Ticket->Id,
- DefaultLabel => loc("[_1] (Unchanged)",loc($Ticket->Status())) &></TD>
- </TR>
+<tr <%$class|n%>><td colspan="2"><h2><a
+href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id%>:
+<%$Ticket->Subject%></a></h2></td></tr>
+<tr <%$class|n%>><td><span class="label">Worked:</span><input size="3" name="UpdateTimeWorked-<%$Ticket->Id%>" /> minutes
+</td>
+<td rowspan="2"><span class="label">Comments:<br /></span><textarea name="UpdateContent-<%$Ticket->Id%>" rows="5"
+cols="60"></textarea></td></tr>
+<tr <%$class|n%>>
+<td><span class="label">Status:</span> <& /Elements/SelectStatus, Name=> 'UpdateStatus-'.$Ticket->Id,
+ DefaultLabel => loc("[_1] (Unchanged)",loc($Ticket->Status())) &></td>
+ </tr>
% }
-</TABLE>
+</table>
<& /Elements/Submit, Label => "Record all updates" , Reset => 'Clear'&>
-</FORM>
-</HTML>
-
+</form>
+</html>
<%INIT>
+my $title = loc("What I did today");
my $i = 0;
+my @results;
+foreach my $arg ( keys %ARGS ) {
+ next unless ( $arg =~ /^UpdateStatus-(\d*)$/ );
+ my $id = $1;
+ my $ticket = LoadTicket($id);
+ next unless ( $ticket->id );
+ if ( my $content = $ARGS{'UpdateContent-'.$id} ) {
+ my ( $val, $msg ) = $ticket->Comment(
+ Content => $content,
+ TimeTaken => $ARGS{ 'UpdateTimeWorked-' . $id }
+ );
+ push @results, loc( "Ticket [_1]: [_2]", $id, $msg );
+ } elsif ( my $worked = $ARGS{ 'UpdateTimeWorked-' . $id } ) {
+ my ( $val, $msg ) = $ticket->SetTimeWorked( $worked + $ticket->TimeWorked );
+ push @results, loc( "Ticket [_1]: [_2]", $id, $msg );
+ }
+
+ if ( my $status = $ARGS{ 'UpdateStatus-' . $id } ) {
+ if ( $status ne $ticket->Status ) {
+ my ( $val, $msg ) = $ticket->SetStatus($status);
+ push @results, loc( "Ticket [_1]: [_2]", $id, $msg );
+
+ }
+ }
+
+}
my $Tickets = RT::Tickets->new($session{'CurrentUser'});
$Tickets->LimitOwner(VALUE => $session{'CurrentUser'}->Id);
@@ -81,11 +113,5 @@ $Tickets->LimitStatus( VALUE => 'open' );
$Tickets->LimitStatus ( VALUE => 'new');
$Tickets->OrderBy ( FIELD => 'Priority', ORDER => 'DESC');
-while (my $Ticket = $Tickets->Next()) {
- #Process updates
-
-
-}
</%INIT>
-
diff --git a/rt/html/Tools/Offline.html b/rt/html/Tools/Offline.html
index 8b12784e8..8806b79b0 100644
--- a/rt/html/Tools/Offline.html
+++ b/rt/html/Tools/Offline.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -53,50 +55,48 @@
<& /Elements/Callback, Requestor => \$requestoraddress,
Queue => \$qname, %ARGS &>
-<FORM ACTION="Offline.html" NAME="TicketUpdate"
- METHOD=POST enctype="multipart/form-data">
+<form action="Offline.html" name="TicketUpdate"
+ method="post" enctype="multipart/form-data">
<table>
<tr>
-<td class=label>
+<td class="label">
<&|/l&>Default Queue</&>:
</td>
<td>
<& /Elements/SelectQueue, Name => "qname", NamedValues => 1 &>
-<i><&|/l&>If no queue is specified, create tickets in this queue.</&></i>
+<em><&|/l&>If no queue is specified, create tickets in this queue.</&></em>
</td>
</tr>
<tr>
-<td class=label>
+<td class="label">
<&|/l&>Default Requestor</&>:
</td>
<td>
-<input name=requestoraddress value=<%$requestoraddress%>>
-<i><&|/l&>If no Requestor is specified, create tickets with this requestor.</&></i>
+<input name="requestoraddress" value="<%$requestoraddress%>" />
+<em><&|/l&>If no Requestor is specified, create tickets with this requestor.</&></em>
</td>
</tr>
-<tr><td class=labeltop>
+<tr><td class="labeltop">
<&|/l&>Template</&>:
</td>
-<td colspan=2>
-<textarea name=string cols=80 rows=30>
-<%$string%>
-</textarea>
+<td colspan="2">
+<textarea name="string" cols="80" rows="30"><%$string%></textarea>
</td>
</tr>
-<tr><td class=label>
+<tr><td class="label">
<&|/l&>Get template from file</&>:
</td>
<td>
-<input name="Template" type="file" value="foo">
-<INPUT TYPE=SUBMIT NAME="Parse" VALUE="<&|/l&>Go</&>">
+<input name="Template" type="file" value="foo" />
+<input type="submit" class="button" name="Parse" value="<&|/l&>Go</&>" />
</td>
</tr>
</table>
<& /Elements/Submit, Name => 'UpdateTickets', Label => loc('Upload'), Caption => loc("Upload your changes"), color => "#993333" &>
-</FORM>
+</form>
<%args>
-$requestoraddress => undef
+$requestoraddress => ''
$qname => undef
$string => undef
</%args>
diff --git a/rt/html/Tools/Reports/CreatedByDates.html b/rt/html/Tools/Reports/CreatedByDates.html
new file mode 100644
index 000000000..b6d6f940a
--- /dev/null
+++ b/rt/html/Tools/Reports/CreatedByDates.html
@@ -0,0 +1,94 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Queue => undef
+$CreatedBefore => undef
+$CreatedAfter => undef
+</%args>
+<%init>
+my $title = loc("Created tickets in period, grouped by status");
+my $q = RT::Queue->new($session{'CurrentUser'});
+my $before = RT::Date->new($session{'CurrentUser'});
+my $after = RT::Date->new($session{'CurrentUser'});
+my $query = 'Status != "deleted" ';
+
+
+if ($CreatedAfter) {
+ $after->Set(Format => 'unknown', Value => $CreatedAfter);
+ $CreatedAfter = $after->AsString;
+}
+if ($CreatedBefore) {
+ $before->Set(Format => 'unknown', Value => $CreatedBefore);
+ $CreatedBefore = $before->AsString;
+}
+
+
+$q->LoadByCols(Name => $Queue);
+</%init>
+<& /Elements/Header, Title => $title &>
+<& /Tools/Reports/Elements/Tabs, current_tab => 'Tools/Reports/CreatedByDates.html', Title => $title &>
+<form method="post" action="CreatedByDates.html">
+% if ($Queue|| $CreatedBefore ||$CreatedAfter) {
+% # if we have a queue, do the search
+% if ($Queue) { $query .= " AND Queue = '$Queue'"}
+% if ($CreatedBefore) { $query .= " AND Created < '".$before->ISO."'"; }
+% if ($CreatedAfter) { $query .= " AND Created > '".$after->ISO."'"}
+% my $groupby = 'Status';
+<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
+% }
+
+<hr>
+
+<br /><&|/l&>Queue</&>: <& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $q->id &>
+<br /><&|/l&>Tickets created after</&>:
+<input size="20" name="CreatedAfter" value="<%$CreatedAfter%>" />
+<br /><&|/l&>Tickets created before</&>:
+<input size="20" name="CreatedBefore" value="<%$CreatedBefore%>" />
+
+<& /Elements/Submit&>
+</form>
diff --git a/rt/html/Tools/Reports/Elements/Tabs b/rt/html/Tools/Reports/Elements/Tabs
new file mode 100644
index 000000000..18829f085
--- /dev/null
+++ b/rt/html/Tools/Reports/Elements/Tabs
@@ -0,0 +1,89 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Tools/Elements/Tabs,
+ subtabs => $tabs,
+ current_tab => 'Tools/Reports/index.html',
+ current_subtab => $current_tab,
+ Title => $Title &>
+
+<%INIT>
+my $tabs = {
+ a => {
+ title => loc('Resolved by owner'),
+ path => 'Tools/Reports/ResolvedByOwner.html',
+ },
+ b => {
+ title => loc('Resolved in date range'),
+ path => 'Tools/Reports/ResolvedByDates.html',
+ },
+ c => {
+ title => loc('Created in a date range'),
+ path => 'Tools/Reports/CreatedByDates.html',
+ },
+};
+
+
+
+
+$m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
+
+foreach my $tab ( sort keys %{$tabs} ) {
+ if ( $tabs->{$tab}->{'path'} eq $current_tab ) {
+ $tabs->{$tab}->{"subtabs"} = $subtabs;
+ $tabs->{$tab}->{"current_subtab"} = $current_subtab;
+ }
+}
+</%INIT>
+
+
+<%ARGS>
+$subtabs => undef
+$current_tab => undef
+$current_subtab => undef
+$Title => undef
+</%ARGS>
diff --git a/rt/html/Tools/Reports/ResolvedByDates.html b/rt/html/Tools/Reports/ResolvedByDates.html
new file mode 100644
index 000000000..265a1caa4
--- /dev/null
+++ b/rt/html/Tools/Reports/ResolvedByDates.html
@@ -0,0 +1,95 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Queue => undef
+$ResolvedBefore => undef
+$ResolvedAfter => undef
+</%args>
+<%init>
+my $title = loc("Resolved tickets in period, grouped by owner");
+my $q = RT::Queue->new($session{'CurrentUser'});
+my $before = RT::Date->new($session{'CurrentUser'});
+my $after = RT::Date->new($session{'CurrentUser'});
+my $query = '';
+
+
+if ($ResolvedAfter) {
+ $after->Set(Format => 'unknown', Value => $ResolvedAfter);
+ $ResolvedAfter = $after->AsString;
+}
+if ($ResolvedBefore) {
+ $before->Set(Format => 'unknown', Value => $ResolvedBefore);
+ $ResolvedBefore = $before->AsString;
+}
+
+
+$q->LoadByCols(Name => $Queue);
+</%init>
+<& /Elements/Header, Title => $title &>
+<& /Tools/Reports/Elements/Tabs, current_tab => 'Tools/Reports/ResolvedByDates.html', Title => $title &>
+<form method="post" action="ResolvedByDates.html">
+% if ($Queue|| $ResolvedBefore ||$ResolvedAfter) {
+% # if we have a queue, do the search
+% $query = "Status = 'resolved'";
+% if ($Queue) { $query .= " AND Queue = '$Queue'"}
+% if ($ResolvedBefore) { $query .= " AND Resolved < '".$before->ISO."'"; }
+% if ($ResolvedAfter) { $query .= " AND Resolved > '".$after->ISO."'"}
+% my $groupby = 'Owner';
+<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
+% }
+
+<hr>
+
+<br /><&|/l&>Queue</&>: <& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $q->id &>
+<br /><&|/l&>Tickets resolved after</&>:
+<input size="20" name="ResolvedAfter" value="<%$ResolvedAfter%>" />
+<br /><&|/l&>Tickets resolved before</&>:
+<input size="20" name="ResolvedBefore" value="<%$ResolvedBefore%>" />
+
+<& /Elements/Submit&>
+</form>
diff --git a/rt/html/Tools/Reports/ResolvedByOwner.html b/rt/html/Tools/Reports/ResolvedByOwner.html
new file mode 100644
index 000000000..142af6475
--- /dev/null
+++ b/rt/html/Tools/Reports/ResolvedByOwner.html
@@ -0,0 +1,70 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Queue => undef
+</%args>
+<%init>
+my $title = loc("Resolved tickets, grouped by owner");
+my $q = RT::Queue->new($session{'CurrentUser'});
+$q->LoadByCols(Name => $Queue);
+</%init>
+<& /Elements/Header, Title => $title &>
+<& /Tools/Reports/Elements/Tabs, current_tab => '/Tools/Reports/ResolvedByOwner.html', Title => $title &>
+<form method="post" action="ResolvedByOwner.html">
+% if ($Queue) {
+% # if we have a queue, do the search
+% my $query = "Status = 'resolved' AND Queue = '$Queue'";
+% my $groupby = 'Owner';
+<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
+% }
+
+<hr>
+
+<&|/l&>Queue</&>: <& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $q->id &>
+<& /Elements/Submit&>
+</form>
diff --git a/rt/html/Tools/Reports/index.html b/rt/html/Tools/Reports/index.html
new file mode 100644
index 000000000..149dc7619
--- /dev/null
+++ b/rt/html/Tools/Reports/index.html
@@ -0,0 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => loc('Reports') &>
+<& /Tools/Reports/Elements/Tabs, Title => loc('Reports') &>
+<& /Elements/Callback &>
diff --git a/rt/html/Tools/index.html b/rt/html/Tools/index.html
new file mode 100644
index 000000000..8d2efdbed
--- /dev/null
+++ b/rt/html/Tools/index.html
@@ -0,0 +1,52 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => loc("Tools") &>
+<& Elements/Tabs,
+ current_tab => "Tools/index.html",
+ Title => loc("Tools") &>
+
diff --git a/rt/html/User/Delegation.html b/rt/html/User/Delegation.html
index 3347fda1f..2587f8cde 100644
--- a/rt/html/User/Delegation.html
+++ b/rt/html/User/Delegation.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/User/Elements/DelegateRights b/rt/html/User/Elements/DelegateRights
index 79ecb5977..3d42ed54e 100644
--- a/rt/html/User/Elements/DelegateRights
+++ b/rt/html/User/Elements/DelegateRights
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -55,7 +57,7 @@ my $object_obj = @{$objects->{$ObjectType}{$object}}[0]->Object;
% }
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
- <th width=15%><&|/l&>Personal groups:</&></th>
+ <th width="15%"><&|/l&>Personal groups:</&></th>
% while (my $pg = $personalgroups->Next) {
<th><%$pg->Name%></th>
% }
@@ -76,14 +78,14 @@ while ( my $delegation = $delegations->Next) {
%
<tr class="<%($i%2) && 'oddline'%>">
<td>
-<% loc($right->RightName) %><br>
-<div align=right><font size="-2" color="#999999"><&|/l, $right->PrincipalObj->Object->SelfDescription &>as granted to [_1]</&></font></div>
+<% loc($right->RightName) %><br />
+<div align="right"><font size="-2" color="#999999"><&|/l, $right->PrincipalObj->Object->SelfDescription &>as granted to [_1]</&></font></div>
</td>
% while (my $pg = $personalgroups->Next) {
-<td align=center>
- <input name="Delegate-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>" type=checkbox value="1" <%$ del_hash->{$pg->PrincipalId} && 'CHECKED' %>>
+<td align="center">
+ <input name="Delegate-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>" type="checkbox" value="1" <%$ del_hash->{$pg->PrincipalId} && 'CHECKED' %> />
% if ( $del_hash->{$pg->PrincipalId}) {
-<input type=hidden name="Delegate-Existing-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>-as-<%$del_hash->{$pg->PrincipalId}->Id%>">
+<input type="hidden" class="hidden" name="Delegate-Existing-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>-as-<%$del_hash->{$pg->PrincipalId}->Id%>" />
% }
</td>
% }
diff --git a/rt/html/User/Elements/GroupTabs b/rt/html/User/Elements/GroupTabs
index 2e79df268..b0eba0f8e 100644
--- a/rt/html/User/Elements/GroupTabs
+++ b/rt/html/User/Elements/GroupTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/User/Elements/Tabs b/rt/html/User/Elements/Tabs
index 625b30f93..0aca8b5c3 100644
--- a/rt/html/User/Elements/Tabs
+++ b/rt/html/User/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -59,6 +61,12 @@
h => { title => loc('Delegation'),
path => 'User/Delegation.html',
},
+ f => { title => loc('Search options'),
+ path => 'Prefs/SearchOptions.html',
+ },
+ r => { title => loc('RT at a glance'),
+ path => 'Prefs/MyRT.html',
+ },
};
# Now let callbacks add their extra tabs
diff --git a/rt/html/User/Groups/Members.html b/rt/html/User/Groups/Members.html
index 2068e5a5b..e5350c95e 100644
--- a/rt/html/User/Groups/Members.html
+++ b/rt/html/User/Groups/Members.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,36 +54,36 @@
-<FORM ACTION="<%$RT::WebPath%>/User/Groups/Members.html" METHOD="POST">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
-<TABLE WIDTH="100%">
-<TR>
-<TD>
+<form action="<%$RT::WebPath%>/User/Groups/Members.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
+<table width="100%">
+<tr>
+<td>
<&|/l&>Add members</&>
-</TD>
-<TD>
+</td>
+<td>
<&|/l&>Current members</&>
-</TD>
-</TR>
+</td>
+</tr>
-<TR>
-<TD VALIGN=TOP>
+<tr>
+<td valign="top">
<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group &>
-</TD>
-<TD VALIGN=TOP>
+</td>
+<td valign="top">
% if ($Group->MembersObj->Count == 0 ) {
-<i><&|/l&>(No members)</&></i>
+<em><&|/l&>(No members)</&></em>
% } else {
-<i><&|/l&>(Check box to delete)</&></i>
-<br>
-<br>
+<em><&|/l&>(Check box to delete)</&></em>
+<br />
+<br />
<&|/l&>Users</&>
% my $UserMembers = $Group->MembersObj;
% $UserMembers->LimitToUsers();
-<UL>
+<ul>
% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
% }
</ul>
@@ -90,14 +92,14 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%>
% }
% }
-</UL>
-</TD>
-</TR>
-</TABLE>
+</ul>
+</td>
+</tr>
+</table>
<& /Elements/Submit, Label => loc('Modify Members') &>
</form>
diff --git a/rt/html/User/Groups/Modify.html b/rt/html/User/Groups/Modify.html
index c0e9ce575..da42f2c2a 100644
--- a/rt/html/User/Groups/Modify.html
+++ b/rt/html/User/Groups/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -53,27 +55,27 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%>/User/Groups/Modify.html" METHOD=POST>
+<form action="<%$RT::WebPath%>/User/Groups/Modify.html" method="post">
%unless ($Group->Id) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
% }
-<TABLE>
-<TR><TD ALIGN=RIGHT>
+<table>
+<tr><td align="right">
<&|/l&>Name</&>:
-</TD>
-<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR><TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD>
-</TR><TR>
-<TD COLSPAN=2>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
-</TR>
-</TABLE>
+</td>
+<td><input name="Name" value="<%$Group->Name%>" /></td>
+</tr><tr>
+<td align="right">
+<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<%$Group->Description%>" size="60" /></td>
+</tr><tr>
+<td colspan="2">
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this group)</&><br />
+</tr>
+</table>
<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
</form>
<%INIT>
diff --git a/rt/html/User/Groups/index.html b/rt/html/User/Groups/index.html
index 6d2e15d47..76ffac3af 100644
--- a/rt/html/User/Groups/index.html
+++ b/rt/html/User/Groups/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,12 +50,12 @@
current_subtab => 'User/Groups/index.html',
Title => $title &>
-<&|/l&>Personal groups</&>:<BR>
-<UL>
+<&|/l&>Personal groups</&>:<br />
+<ul>
%while ( my $Group = $Groups->Next) {
-<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><BR>
+<li><a href="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><br />
%}
-</UL>
+</ul>
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
diff --git a/rt/html/User/Prefs.html b/rt/html/User/Prefs.html
index f1c755826..8c6d5f18e 100644
--- a/rt/html/User/Prefs.html
+++ b/rt/html/User/Prefs.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,131 +52,133 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%>/User/Prefs.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>">
+<form action="<%$RT::WebPath%>/User/Prefs.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<%$UserObj->Id%>" />
-<TABLE WIDTH=100% BORDER=0>
-<TR>
+<table width="100%" border="0">
+<tr>
-<TD VALIGN=TOP class="boxcontainer">
-<& /Elements/TitleBoxStart, title => loc('Identity') &>
+<td valign="top" class="boxcontainer">
+<&| /Widgets/TitleBox, title => loc('Identity'), id => "user-prefs-identity" &>
-<input type=hidden name="Name" value="<%$UserObj->Name%>">
-<table callspacing=0 cellpadding=0>
+<input type="hidden" class="hidden" name="Name" value="<%$UserObj->Name%>" />
+<table cellspacing="0" cellpadding="0">
<tr>
- <td class=label><&|/l&>Email</&>: </td>
- <td class=value><input name="EmailAddress" value="<%$UserObj->EmailAddress%>"></td>
+ <td class="label"><&|/l&>Email</&>: </td>
+ <td class="value"><input name="EmailAddress" value="<%$UserObj->EmailAddress%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Real Name</&>:</td>
- <td class=value><input name="RealName" value="<%$UserObj->RealName%>"></td> </tr>
+ <td class="label"><&|/l&>Real Name</&>:</td>
+ <td class="value"><input name="RealName" value="<%$UserObj->RealName%>" /></td> </tr>
<tr>
- <td class=label><&|/l&>Nickname</&>:</td>
- <td class=value><input name="NickName" value="<%$UserObj->NickName%>"></td>
+ <td class="label"><&|/l&>Nickname</&>:</td>
+ <td class="value"><input name="NickName" value="<%$UserObj->NickName%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Language</&>:</td>
- <td class=value><& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &></td>
+ <td class="label"><&|/l&>Language</&>:</td>
+ <td class="value"><& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &></td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
-<br>
-<& /Elements/TitleBoxStart, title => loc('Phone numbers') &>
-<table callspacing=0 cellpadding=0>
+</&>
+<&| /Widgets/TitleBox, title => loc('Phone numbers'), id => "user-prefs-phone" &>
+<table cellspacing="0" cellpadding="0">
<tr>
- <td class=label><&|/l&>Residence</&>:</td>
- <td class=value><input name="HomePhone" value="<%$UserObj->HomePhone%>" size=13></td>
+ <td class="label"><&|/l&>Residence</&>:</td>
+ <td class="value"><input name="HomePhone" value="<%$UserObj->HomePhone%>" size="13" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Work</&>:</td>
- <td class=value><input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size=13></td>
+ <td class="label"><&|/l&>Work</&>:</td>
+ <td class="value"><input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size="13" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Mobile</&>:</td>
- <td class=value><input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size=13></td>
+ <td class="label"><&|/l&>Mobile</&>:</td>
+ <td class="value"><input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size="13" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Pager</&>:</td>
- <td class=value><input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size=13></td>
+ <td class="label"><&|/l&>Pager</&>:</td>
+ <td class="value"><input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size="13" /></td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
-</TD>
-<TD VALIGN=TOP class="boxcontainer">
+</&>
+<& /Elements/Callback, _CallbackName => 'FormLeftColumn', UserObj => $UserObj, %ARGS &>
+</td>
+<td valign="top" class="boxcontainer">
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<& /Elements/TitleBoxStart, title => loc('Password') &>
-<TABLE>
-<TR>
-<TD class=label>
+<&| /Widgets/TitleBox, title => loc('Password'), id => "user-prefs-password" &>
+<table>
+<tr>
+<td class="label">
<&|/l&>New Password</&>:
-</TD>
-<TD class=value>
-<input type=password name="Pass1">
-</TD>
-</TR>
-<TR><TD class=label>
+</td>
+<td class="value">
+<input type="password" name="Pass1" />
+</td>
+</tr>
+<tr><td class="label">
<&|/l&>Retype Password</&>:
-</TD>
-<TD class=value>
-<input type=password name="Pass2">
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
+</td>
+<td class="value">
+<input type="password" name="Pass2" />
+</td>
+</tr>
+</table>
+</&>
% }
-<& /Elements/TitleBoxStart, title => loc('Location') &>
-<table callspacing=0 cellpadding=0>
+<&| /Widgets/TitleBox, title => loc('Location'), id => "user-prefs-location" &>
+<table cellspacing="0" cellpadding="0">
<tr>
- <td class=label><&|/l&>Organization</&>:</td>
- <td class=value><input name="Organization" value="<%$UserObj->Organization%>"></td>
+ <td class="label"><&|/l&>Organization</&>:</td>
+ <td class="value"><input name="Organization" value="<%$UserObj->Organization%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Address1</&>:</td>
- <td class=value><input name="Address1" value="<%$UserObj->Address1%>"></td>
+ <td class="label"><&|/l&>Address1</&>:</td>
+ <td class="value"><input name="Address1" value="<%$UserObj->Address1%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Address2</&>:</td>
- <td class=value><input name="Address2" value="<%$UserObj->Address2%>"></td>
+ <td class="label"><&|/l&>Address2</&>:</td>
+ <td class="value"><input name="Address2" value="<%$UserObj->Address2%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>City</&>:</td>
- <td><input name="City" value="<%$UserObj->City%>" size=14></td>
+ <td class="label"><&|/l&>City</&>:</td>
+ <td><input name="City" value="<%$UserObj->City%>" size="14" /></td>
</tr>
<tr>
- <td class=label><&|/l&>State</&>:</td>
- <td class=value><input name="State" value="<%$UserObj->State%>" size=3></td>
+ <td class="label"><&|/l&>State</&>:</td>
+ <td class="value"><input name="State" value="<%$UserObj->State%>" size="3" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Zip</&>:</td>
- <td class=value><input name="Zip" value="<%$UserObj->Zip%>" size=9></td>
+ <td class="label"><&|/l&>Zip</&>:</td>
+ <td class="value"><input name="Zip" value="<%$UserObj->Zip%>" size="9" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Country</&>:</td>
- <td class=value><input name="Country" value="<%$UserObj->Country%>"></td>
+ <td class="label"><&|/l&>Country</&>:</td>
+ <td class="value"><input name="Country" value="<%$UserObj->Country%>" /></td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
-</TD>
-</TR>
-<TR>
+</&>
+<& /Elements/Callback, _CallbackName => 'FormRightColumn', UserObj => $UserObj, %ARGS &>
+</td>
+</tr>
+<tr>
-<TD COLSPAN=2 VALIGN=TOP class="boxcontainer">
+<td colspan="2" valign="top" class="boxcontainer">
%if ($UserObj->Privileged) {
-<BR>
-<& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA COLS=80 ROWS=5 name="Signature" class="signature" WRAP=HARD>
-<%$UserObj->Signature%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
+<br />
+<&| /Widgets/TitleBox, title => loc('Signature') &>
+<textarea cols="80" rows="5" name="Signature" class="signature" wrap="hard">
+<%$UserObj->Signature%></textarea>
+</&>
% }
-</TD>
+</td>
-</TR>
-</TABLE>
+</tr>
+</table>
+<& /Elements/Callback, _CallbackName => 'FormEnd', UserObj => $UserObj, %ARGS &>
<& /Elements/Submit, Label => loc('Save Preferences') &>
</form>
@@ -205,6 +209,12 @@ if ($UserObj->Id) {
AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
Address2 City State Zip Country Lang
);
+
+ $m->comp('/Elements/Callback', _CallbackName => 'UpdateLogic',
+ fields => \@fields,
+ results => \@results,
+ UserObj => $UserObj,
+ ARGSRef => \%ARGS);
my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields,
Object => $UserObj,
diff --git a/rt/html/Widgets/ComboBox b/rt/html/Widgets/ComboBox
new file mode 100644
index 000000000..8fb5682d9
--- /dev/null
+++ b/rt/html/Widgets/ComboBox
@@ -0,0 +1,69 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<nobr>
+<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/combobox.js"></script>
+
+<span id="<% $Name %>_Container" class="combobox">
+<input name="<% $Name %>" id="<% $Name %>" class="combo-text" value="<% $Default %>" type="text" <% $Size ? "size='$Size'" : '' |n %> autocomplete="off" />
+<br style="display: none" /><span id="<% $Name %>_Button" class="combo-button"></span></span><select name="List-<% $Name %>" id="<% $Name %>_List" class="combo-list" onchange="ComboBox_SimpleAttach(this, this.form['<% $Name %>']); " rows="<% $Rows %>">
+<option style="display: none" value="">-</option>
+% foreach my $value (@Values) {
+ <option value="<%$value%>"><% $value%></option>
+% }
+</select>
+<script language="javascript"><!--
+ComboBox_InitWith('<% $Name %>');
+//--></script>
+</nobr>
+<%ARGS>
+$Name
+$Size => undef
+$Rows => 5
+$Default => ''
+@Values => ()
+</%ARGS>
diff --git a/rt/html/Widgets/SavedSearch b/rt/html/Widgets/SavedSearch
new file mode 100644
index 000000000..b8313daf8
--- /dev/null
+++ b/rt/html/Widgets/SavedSearch
@@ -0,0 +1,150 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%method new>
+<%init>
+return \%ARGS;
+</%init>
+</%method>
+
+<%method process>
+
+<%init>
+my @actions;
+my @Objects = RT::SavedSearches->new( $session{CurrentUser} )->_PrivacyObjects;
+push @Objects, RT::System->new($session{'CurrentUser'})
+ if $session{'CurrentUser'}->HasRight( Object=> $RT::System,
+ Right => 'SuperUser');
+$self->{SearchId} ||= 'new';
+my $SearchParams = { map { $_ => $args->{$_} } @{$self->{SearchFields}} };
+
+if ( my ( $container_object, $search_id ) = _parse_saved_search( $args->{'LoadSavedSearch'} ) ) {
+ my $search = $container_object->Attributes->WithId($search_id);
+ # We have a $search and now; import the others
+ $self->{SearchId} = $args->{'LoadSavedSearch'};
+ $self->{CurrentSearch}{Object} = $search;
+ $args->{$_} = $search->SubValue($_) for @{ $self->{SearchFields} };
+}
+
+# look for the current one in the available saved searches
+if ($self->{SearchId} eq 'new') {
+ for my $obj (@Objects) {
+ for ( $m->comp( "/Search/Elements/SearchesForObject", Object => $obj ) ) {
+ my ( $desc, $search ) = @$_;
+ use Data::Dumper;
+ # FFS
+ local $Data::Dumper::Sortkeys = 1;
+ if ( Dumper( $search->Content ) eq
+ Dumper( { %$SearchParams, SearchType => $self->{SearchType} } ) ) {
+ $self->{CurrentSearch}{Object} = $search;
+ $self->{SearchId} = $search->Id;
+ }
+ }
+ }
+}
+
+if ( $args->{Save} ) {
+ if ( my $search = $self->{CurrentSearch}{Object} ) {
+ # rename
+ $search->SetDescription( $args->{Description} );
+ push @actions, loc($self->{SearchType}).loc( ' [_1] renamed to [_2].', $self->{CurrentSearch}{Description}, $args->{Description} );
+ }
+ else {
+ # new saved search
+ my $saved_search = RT::SavedSearch->new( $session{'CurrentUser'} );
+ my ( $ok, $search_msg ) = $saved_search->Save(
+ Privacy => $args->{'Owner'},
+ Name => $args->{'Description'},
+ Type => $self->{'SearchType'},
+ SearchParams => $SearchParams
+ );
+ if ($ok) {
+ $self->{CurrentSearch}{Object} = $saved_search->{Attribute};
+ push @actions, loc($self->{SearchType}).loc( ' [_1] saved.', $args->{Description} );
+ } else {
+ push @actions,
+ [ loc("Can't save [_1]", loc($self->{SearchType})) . ': ' . loc($search_msg), 0 ];
+ }
+ }
+}
+
+if ( $args->{Delete} && $self->{CurrentSearch}{Object} ) {
+ my ($ok, $msg) = $self->{CurrentSearch}{Object}->Delete;
+ push @actions, $ok ? loc($self->{SearchType}).loc( ' [_1] deleted.', $self->{CurrentSearch}{Object}->Description ) : $msg;
+ delete $self->{CurrentSearch}{Object};
+ delete $self->{SearchId};
+
+}
+
+$self->{CurrentSearch}{Description} = $self->{CurrentSearch}{Object}->Description
+ if $self->{CurrentSearch}{Object};
+
+return @actions;
+</%init>
+<%ARGS>
+$self
+$args
+</%ARGS>
+
+</%method>
+
+<%method show>
+<form method="post" action="<% $Action %>" name="SaveSearch">
+<& /Search/Elements/EditSearches, Name => 'Owner', SearchType => $self->{SearchType}, AllowCopy => 0,
+ CurrentSearch => $self->{CurrentSearch}, SearchId => $self->{SearchId}, Title => $Title &><br />
+% for my $field (@{$self->{SearchFields}}) {
+<input type="hidden" class="hidden" name="<%$field%>" value="<%$ARGS{$field} || ''%>" />
+% }
+</form>
+<%ARGS>
+$self => undef
+$Action => ''
+$Title => 'Saved searches'
+</%ARGS>
+<%init>
+</%init>
+</%method>
diff --git a/rt/html/Widgets/SelectionBox b/rt/html/Widgets/SelectionBox
new file mode 100644
index 000000000..910b20b25
--- /dev/null
+++ b/rt/html/Widgets/SelectionBox
@@ -0,0 +1,234 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+%# The SelectionBox Widget
+%#
+%# SYNOPSIS
+%#
+%# include javascript:
+%# <& /Widgets/SelectionBox:header &>
+%#
+%# <%init>:
+%# my $sel = $m->comp ('/Widgets/SelectionBox:new',
+%# Action => me.html',
+%# Name => 'my-selection',
+%# Available => \@items,
+%# # you can do things with @{$sel->{Current}} in the
+%# # OnSubmit callback
+%# OnSubmit => sub { my $sel = shift; },
+%# Selected => \@selected);
+%#
+%# $m->comp ('/Widgets/SelectionBox:process', %ARGS, self => $sel)
+%#
+%# where @items is an arrayref, each element is [value, label],
+%# and @selected is an arrayref of selected values from @items.
+%#
+%# and in html:
+%# <& /Widgets/SelectionBox:sow, self => $sel &>
+%#
+%# if the SelectionBox is created with AutoSave option, OnSubmit will be called
+%# on every button clicked in non-js mode.
+<%method header>
+% unless ($nojs) {
+<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/class.js"></script>
+<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/list.js"></script>
+% }
+<%ARGS>
+$nojs => 0
+</%ARGS>
+</%method>
+
+<%method new>
+<%init>
+$ARGS{_item_map} = {map {$_->[0] => $_->[1]} @{$ARGS{Available}}};
+return \%ARGS;
+</%init>
+</%method>
+
+<%method process>
+<%init>
+unless ($ARGS{$self->{Name}.'-Submit'}) {
+ # init
+ $self->{Current} = $self->{Selected};
+ $self->{Selected} = [];
+ return;
+}
+
+$self->{Selected} = $ARGS{$self->{Name}.'-Selected'};
+if ($self->{Selected} && !ref($self->{Selected})) {
+ $self->{Selected} = [$self->{Selected}];
+}
+
+if ($ARGS{fromjs}) {
+ $self->{Current} = $self->{Selected};
+}
+else {
+ my $current = $self->{Current} = $ARGS{$self->{Name}.'-Current'};
+ ++$self->{Modified};
+ if ($current && !ref ($current)) {
+ $current = [$current];
+ }
+
+ if ($ARGS{add}) {
+ my $choosed = $ARGS{$self->{Name}.'-Available'};
+ for my $add (ref($choosed) ? @$choosed : $choosed) {
+ next if grep { $_ eq $add } @$current;
+ push @$current, $add;
+ }
+ }
+
+ if ($ARGS{remove}) {
+ my $choosed = $ARGS{$self->{Name}.'-Selected'};
+ for my $del (ref($choosed) ? @$choosed : $choosed) {
+ @$current = map { $_ eq $del ? () : $_ } @$current;
+ }
+ }
+
+ if ($ARGS{moveup} or $ARGS{movedown}) {
+ my $offset = $ARGS{moveup} ? 1 : 0;
+ my $choosed = $ARGS{$self->{Name}.'-Selected'};
+ $choosed = [$choosed] unless ref ($choosed);
+ my $canmove = 0; # not in the cornor
+ for my $i ($ARGS{moveup} ? 0..$#{$current} : reverse 0..$#{$current}) {
+ if (grep {$_ eq $current->[$i]} @$choosed) {
+ if ($canmove) {
+ splice (@$current, $i-$offset, 2,
+ @{$current}[$i+1-$offset,$i-$offset]);
+ }
+ }
+ else {
+ ++$canmove;
+ }
+ }
+ }
+
+ $self->{Current} = $current;
+}
+
+@{$self->{Current}} = grep { exists $self->{_item_map}{$_} } @{$self->{Current}};
+
+if ($self->{AutoSave} or $ARGS{$self->{Name}.'-Save'}) {
+ $self->{OnSubmit}->($self);
+ delete $self->{Modified};
+}
+
+</%init>
+<%ARGS>
+$self => undef
+</%ARGS>
+
+</%method>
+
+<%method current>
+% for (@{$self->{Current}}) {
+<input type="hidden" class="hidden" name="<% $self->{Name} %>-Current" value="<%$_%>" />
+% }
+<%INIT>
+</%INIT>
+<%ARGS>
+$self => undef
+</%ARGS>
+
+</%method>
+
+<%method show>
+<form method="post" action="<%$self->{Action}%>" name="SelectionBox-<% $name %>" id="SelectionBox-<% $name %>"
+% unless ($nojs) {
+onsubmit="list_<% $name %>.selectAll();"
+% }
+>
+<input type="hidden" class="hidden" name="<% $self->{Name} %>-Submit" value="1" />
+<& SelectionBox:current, self => $self &>
+<input type="hidden" class="hidden" name="fromjs" value="0" />
+<&|/l&>Available</&>:
+<br />
+<select name="<%$name%>-Available" id="<%$name%>-Available" size="<%$size%>" multiple="multiple">
+% for (@{$self->{Available}}) {
+<option value="<% $_->[0] %>"><% $_->[1] %></option>
+% }
+</select>
+<input name="add" type="submit" class="button" value=" &rarr; " />
+<select name="<%$name%>-Selected" id="<%$name%>-Selected" size="<%$size%>" multiple="multiple">
+% for (@{$self->{Current}}) {
+<option value="<% $_ %>"
+% if (exists $selected{$_}) {
+selected="selected"
+% }
+><% $self->{_item_map}{$_} %></option>
+% }
+</select>
+ <input name="moveup" type="submit" class="button" value=" &uarr; " />
+ <input name="movedown" type="submit" class="button" value=" &darr; " />
+ <input name="remove" type="submit" class="button" value="<&|/l&>Delete</&>" />
+
+% my $caption = "";
+% unless ($self->{'AutoSave'}) {
+% if ($self->{Modified}) {
+% $caption = loc('Selections modified. Please save your changes');
+% }
+<& /Elements/Submit, Caption => loc($caption), Label => loc('Save'), Name => $name.'-Save' &>
+% }
+</form>
+
+% unless ($nojs) {
+<script type="text/javascript">
+//<![CDATA[
+var list_<%$name%> = new list(document.getElementById("SelectionBox-<% $name %>"), 0, "list_<%$name%>");
+//]]>
+</script>
+% }
+<%ARGS>
+$self => undef
+$size => 10
+$nojs => 0
+</%ARGS>
+<%INIT>
+my $name = $self->{Name};
+my %selected = map {$_ => 1} @{$self->{Selected}};
+</%INIT>
+
+</%method>
diff --git a/rt/html/Widgets/TitleBox b/rt/html/Widgets/TitleBox
new file mode 100644
index 000000000..00d9e4c63
--- /dev/null
+++ b/rt/html/Widgets/TitleBox
@@ -0,0 +1,54 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<div class="<% $class %>">
+ <& TitleBoxStart, %ARGS &><% $m->content | n %><& TitleBoxEnd &>
+</div>
+<%ARGS>
+$class => ''
+</%ARGS>
+
diff --git a/rt/html/Widgets/TitleBoxEnd b/rt/html/Widgets/TitleBoxEnd
new file mode 100755
index 000000000..b12b58f4d
--- /dev/null
+++ b/rt/html/Widgets/TitleBoxEnd
@@ -0,0 +1,59 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+ <hr class="clear" />
+ </div>
+</div>
+
+% #Manually flush the content buffer after each titlebox is displayed
+% $m->flush_buffer();
+
+<%ARGS>
+$title => undef
+$content => undef
+</%ARGS>
+
diff --git a/rt/html/Widgets/TitleBoxStart b/rt/html/Widgets/TitleBoxStart
new file mode 100755
index 000000000..7edc8a154
--- /dev/null
+++ b/rt/html/Widgets/TitleBoxStart
@@ -0,0 +1,88 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<div class="titlebox <% $class %>" id="<% $id %>">
+ <div class="titlebox-title<% $title_class && " $title_class" %>">
+% if ($hideable) {
+ <span class="widget"><a href="#" onclick="return rollup('<%$tid%>');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
+% }
+ <span class="left"><% $title_href && qq[<a href="$title_href">] | n %><% $title |n %><% $title_href && "</a>" |n%></span>
+ <span class="right"><% $titleright_href && qq[<a href="$titleright_href">] | n %><% $titleright |n %><% $titleright_href && "</a>" |n%></span>
+ </div>
+ <div class="titlebox-content <% $bodyclass %>" id="<%$tid%>">
+
+<%ARGS>
+$width => undef
+$class => ''
+$bodyclass => ''
+$title_href => undef
+$title => ''
+$title_class => ''
+$titleright_href => undef
+$titleright => undef
+$contentbg => "#dddddd"
+$color => "#336699"
+$id => ''
+$hideable => 1
+</%ARGS>
+
+<%init>
+#
+# This should be pretty bulletproof
+#
+my $page = $m->request_comp->path;
+
+my $tid = "TitleBox--$page--" .
+ join '--', ($class, $bodyclass, $title, $id);
+
+$tid =~ s{/}{_}g;
+
+my $i = 0;
+$i++ while $m->notes("$tid-$i");
+$m->notes("$tid-$i" => 1);
+$tid = "$tid-$i";
+</%init>
diff --git a/rt/html/autohandler b/rt/html/autohandler
index c854c2b33..823adef45 100644
--- a/rt/html/autohandler
+++ b/rt/html/autohandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,30 +51,75 @@
$RT::Handle->ForceRollback() if $RT::Handle->TransactionDepth;
-local *session unless $m->is_subrequest; # avoid reentrancy, as suggested by masonbook
+if ($RT::StatementLog) {
+ $RT::Handle->ClearSQLStatementLog;
+ $RT::Handle->LogSQLStatements(1);
+}
+
+local *session
+ unless $m->is_subrequest; # avoid reentrancy, as suggested by masonbook
# Disable AutoFlush using an attribute
-if ($m->request_comp->attr_exists('AutoFlush')) {
- $m->autoflush($m->request_comp->attr('AutoFlush'));
+if ( $m->request_comp->attr_exists('AutoFlush') ) {
+ $m->autoflush( $m->request_comp->attr('AutoFlush') );
}
%ARGS = map {
- # if they've passed multiple values, they'll be an array. if they've
+
+ # if they've passed multiple values, they'll be an array. if they've
# passed just one, a scalar whatever they are, mark them as utf8
my $type = ref($_);
- (!$type)
- ? Encode::is_utf8($_) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) :
- ($type eq 'ARRAY')
- ? [ map { (ref($_) or Encode::is_utf8($_)) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } @$_ ] :
- ($type eq 'HASH')
- ? { map { (ref($_) or Encode::is_utf8($_)) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } %$_ } : $_
- } %ARGS;
-
-$m->{'rt_base_time'} = [Time::HiRes::gettimeofday()];
-
-$m->comp('/Elements/SetupSessionCookie', %ARGS);
-
-unless ($session{'CurrentUser'} && $session{'CurrentUser'}->Id) {
+ ( !$type )
+ ? Encode::is_utf8($_)
+ ? $_
+ : Encode::decode( utf8 => $_, Encode::FB_PERLQQ )
+ : ( $type eq 'ARRAY' )
+ ? [
+ map {
+ ( ref($_) or Encode::is_utf8($_) )
+ ? $_
+ : Encode::decode( utf8 => $_, Encode::FB_PERLQQ )
+ } @$_
+ ]
+ : ( $type eq 'HASH' )
+ ? {
+ map {
+ ( ref($_) or Encode::is_utf8($_) )
+ ? $_
+ : Encode::decode( utf8 => $_, Encode::FB_PERLQQ )
+ } %$_
+ }
+ : $_
+} %ARGS;
+
+# Latter in the code we use
+# $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS );
+# instead of $m->call_next to avoid problems with UTF8 keys in arguments.
+# The call_next method pass through original arguments and if you have
+# an argument with unicode key then in a next component you'll get two
+# records in the args hash: one with key without UTF8 flag and another
+# with the flag, which may result into errors. "{ base_comp => $m->request_comp }"
+# is copied from mason's source to get the same results as we get from
+# call_next method, this feature is not documented, so we just leave it
+# here to avoid possible side effects.
+
+# This code canonicalizes time inputs in hours into minutes
+foreach my $field ( keys %ARGS ) {
+ next unless $field =~ /^(.*)-TimeUnits$/i && $ARGS{$1};
+ my $local = $1;
+ $ARGS{$local} =~ s{\b (?: (\d+) \s+ )? (\d+)/(\d+) \b}
+ {($1 || 0) + $3 ? $2 / $3 : 0}xe;
+ if ( $ARGS{$field} && $ARGS{$field} =~ /hours/i ) {
+ $ARGS{$local} *= 60;
+ }
+ delete $ARGS{$field};
+}
+
+$m->{'rt_base_time'} = [ Time::HiRes::gettimeofday() ];
+
+$m->comp( '/Elements/SetupSessionCookie', %ARGS );
+
+unless ( $session{'CurrentUser'} && $session{'CurrentUser'}->Id ) {
$session{'CurrentUser'} = RT::CurrentUser->new();
}
@@ -80,147 +127,201 @@ unless ($session{'CurrentUser'} && $session{'CurrentUser'}->Id) {
$r->content_type("text/html; charset=utf-8");
# If it's a noauth file, don't ask for auth.
-if ($m->base_comp->path =~ $RT::WebNoAuthRegex )
-{
- $m->call_next(%ARGS);
- $m->abort();
+if ( $m->base_comp->path =~ $RT::WebNoAuthRegex ) {
+ $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS);
+ $m->abort;
}
# If RT is configured for external auth, let's go through and get REMOTE_USER
-elsif ( $RT::WebExternalAuth ) {
+elsif ($RT::WebExternalAuth) {
# do we actually have a REMOTE_USER equivlent?
if ( RT::Interface::Web::WebCanonicalizeInfo() ) {
- my $orig_user = $user;
-
- $user = RT::Interface::Web::WebCanonicalizeInfo();
- $session{'CurrentUser'} = RT::CurrentUser->new();
- my $load_method = $RT::WebExternalGecos ? 'LoadByGecos' : 'Load';
-
- if ($^O eq 'MSWin32' and $RT::WebExternalGecos) {
- my $NodeName = Win32::NodeName();
- $user =~ s/^\Q$NodeName\E\\//i;
- }
-
- $session{'CurrentUser'}->$load_method($user);
-
- if ($RT::WebExternalAuto and !$session{'CurrentUser'}->Id() ) {
- # Create users on-the-fly
-
- my $UserObj = RT::User->new(RT::CurrentUser->new('RT_System'));
-
- my ($val, $msg) = $UserObj->Create(
- %{ref($RT::AutoCreate) ? $RT::AutoCreate : {}},
- Name => $user,
- Gecos => $user,
- );
-
- if ($val) {
-
- # now get user specific information, to better create our user.
- my $new_user_info = RT::Interface::Web::WebExternalAutoInfo($user);
-
- # set the attributes that have been defined.
- # FIXME: this is a horrible kludge. I'm sure there's something cleaner
- foreach my $attribute ('Name', 'Comments', 'Signature', 'EmailAddress',
- 'PagerEmailAddress', 'FreeformContactInfo',
- 'Organization', 'Disabled', 'Privileged',
- 'RealName', 'NickName', 'Lang', 'EmailEncoding',
- 'WebEncoding', 'ExternalContactInfoId',
- 'ContactInfoSystem', 'ExternalAuthId', 'Gecos',
- 'HomePhone', 'WorkPhone', 'MobilePhone',
- 'PagerPhone', 'Address1', 'Address2', 'City',
- 'State', 'Zip', 'Country') {
- $m->comp('/Elements/Callback', %ARGS, _CallbackName => 'NewUser');
-
- my $method = "Set$attribute";
- $UserObj->$method($new_user_info->{$attribute})
- if( defined $new_user_info->{$attribute} );
- }
- $session{'CurrentUser'}->Load($user);
- }
- else {
- # we failed to successfully create the user. abort abort abort.
- delete $session{'CurrentUser'};
- $m->abort() unless $RT::WebFallbackToInternalAuth;
- $m->comp('/Elements/Login', %ARGS,
- Error=> loc('Cannot create user: [_1]', $msg));
- }
- }
-
- unless ( $session{'CurrentUser'}->Id() ) {
- delete $session{'CurrentUser'};
- $user = $orig_user;
-
- if ( $RT::WebExternalOnly ) {
- $m->comp('/Elements/Login', %ARGS,
- Error=> loc('You are not an authorized user'));
- $m->abort();
- }
- }
+ my $orig_user = $user;
+
+ $user = RT::Interface::Web::WebCanonicalizeInfo();
+ $session{'CurrentUser'} = RT::CurrentUser->new();
+ my $load_method = $RT::WebExternalGecos ? 'LoadByGecos' : 'Load';
+
+ if ( $^O eq 'MSWin32' and $RT::WebExternalGecos ) {
+ my $NodeName = Win32::NodeName();
+ $user =~ s/^\Q$NodeName\E\\//i;
+ }
+
+ $session{'CurrentUser'}->$load_method($user);
+
+ if ( $RT::WebExternalAuto and !$session{'CurrentUser'}->Id() ) {
+
+ # Create users on-the-fly
+
+ my $UserObj = RT::User->new( RT::CurrentUser->new('RT_System') );
+
+ my ( $val, $msg ) = $UserObj->Create(
+ %{ ref($RT::AutoCreate) ? $RT::AutoCreate : {} },
+ Name => $user,
+ Gecos => $user,
+ );
+
+ if ($val) {
+
+ # now get user specific information, to better create our user.
+ my $new_user_info
+ = RT::Interface::Web::WebExternalAutoInfo($user);
+
+ # set the attributes that have been defined.
+ # FIXME: this is a horrible kludge. I'm sure there's something cleaner
+ foreach my $attribute (
+ 'Name', 'Comments',
+ 'Signature', 'EmailAddress',
+ 'PagerEmailAddress', 'FreeformContactInfo',
+ 'Organization', 'Disabled',
+ 'Privileged', 'RealName',
+ 'NickName', 'Lang',
+ 'EmailEncoding', 'WebEncoding',
+ 'ExternalContactInfoId', 'ContactInfoSystem',
+ 'ExternalAuthId', 'Gecos',
+ 'HomePhone', 'WorkPhone',
+ 'MobilePhone', 'PagerPhone',
+ 'Address1', 'Address2',
+ 'City', 'State',
+ 'Zip', 'Country'
+ )
+ {
+ $m->comp( '/Elements/Callback', %ARGS,
+ _CallbackName => 'NewUser' );
+
+ my $method = "Set$attribute";
+ $UserObj->$method( $new_user_info->{$attribute} )
+ if ( defined $new_user_info->{$attribute} );
+ }
+ $session{'CurrentUser'}->Load($user);
+ }
+ else {
+
+ # we failed to successfully create the user. abort abort abort.
+ delete $session{'CurrentUser'};
+ $m->abort() unless $RT::WebFallbackToInternalAuth;
+ $m->comp( '/Elements/Login', %ARGS,
+ Error => loc( 'Cannot create user: [_1]', $msg ) );
+ }
+ }
+
+ unless ( $session{'CurrentUser'}->Id() ) {
+ delete $session{'CurrentUser'};
+ $user = $orig_user;
+
+ if ($RT::WebExternalOnly) {
+ $m->comp( '/Elements/Login', %ARGS,
+ Error => loc('You are not an authorized user') );
+ $m->abort();
+ }
+ }
}
elsif ($RT::WebFallbackToInternalAuth) {
- unless (defined($session{'CurrentUser'})) {
- $m->comp('/Elements/Login', %ARGS,
- Error=> loc('You are not an authorized user'));
- $m->abort();
- }
- } else {
- # WebExternalAuth is set, but we don't have a REMOTE_USER. abort
- delete $session{'CurrentUser'} if defined $session{'CurrentUser'};
+ unless ( defined( $session{'CurrentUser'} ) ) {
+ $m->comp( '/Elements/Login', %ARGS,
+ Error => loc('You are not an authorized user') );
+ $m->abort();
+ }
+ }
+ else {
+
+ # WebExternalAuth is set, but we don't have a REMOTE_USER. abort
+ delete $session{'CurrentUser'} if defined $session{'CurrentUser'};
}
}
delete $session{'CurrentUser'}
- unless $session{'CurrentUser'} and defined $session{'CurrentUser'}->Id;
-
+ unless $session{'CurrentUser'}
+ and $session{'CurrentUser'}->Id;
# Process per-page authentication callbacks
-$m->comp('/Elements/Callback', %ARGS, _CallbackName => 'Auth');
+$m->comp( '/Elements/Callback', %ARGS, _CallbackName => 'Auth' );
# If the user is logging in, let's authenticate
-if (!$session{'CurrentUser'} && defined ($user) && defined ($pass) ){
+if ( !$session{'CurrentUser'} && defined $user && defined $pass ) {
$session{'CurrentUser'} = RT::CurrentUser->new();
$session{'CurrentUser'}->Load($user);
- if (!$session{'CurrentUser'}->id() ||
- !$session{'CurrentUser'}->IsPassword($pass))
+ unless ( $session{'CurrentUser'}->id
+ && $session{'CurrentUser'}->IsPassword($pass) )
{
delete $session{'CurrentUser'};
- $RT::Logger->error("FAILED LOGIN for $user from $ENV{'REMOTE_ADDR'}");
- $m->comp('/Elements/Login', %ARGS,
- Error => loc('Your username or password is incorrect'));
- $m->abort();
+ $RT::Logger->error("FAILED LOGIN for $user from $ENV{'REMOTE_ADDR'}");
+ $m->comp( '/Elements/Login', %ARGS,
+ Error => loc('Your username or password is incorrect') );
+ $m->comp( '/Elements/Callback', %ARGS, _CallbackName => 'FailedLogin' );
+ $m->abort;
}
else {
- $RT::Logger->info("Successful login for $user from $ENV{'REMOTE_ADDR'}");
+ $RT::Logger->info(
+ "Successful login for $user from $ENV{'REMOTE_ADDR'}");
+ $m->comp( '/Elements/Callback', %ARGS, _CallbackName => 'SuccessfulLogin' );
}
}
-
+
# If we've got credentials, let's serve the file up.
-if ( (defined $session{'CurrentUser'}) and
- ( $session{'CurrentUser'}->Id) ) {
-
+if ( ( defined $session{'CurrentUser'} )
+ and ( $session{'CurrentUser'}->Id ) )
+{
+
# Process per-page global callbacks
- $m->comp('/Elements/Callback', %ARGS);
+ $m->comp( '/Elements/Callback', %ARGS );
# If the user isn't privileged, they can only see SelfService
- if ((! $session{'CurrentUser'}->Privileged) and
- ($m->base_comp->path !~ '^(/+)SelfService/') ) {
- $m->comp('/SelfService/index.html');
- $m->abort();
+ if ( not $session{'CurrentUser'}->Privileged ) {
+
+ # if the user is trying to access a ticket, redirect them
+ if ( $m->request_comp->path =~ '^(/+)Ticket/Display.html'
+ and $ARGS{'id'} )
+ {
+ RT::Interface::Web::Redirect($RT::WebURL."SelfService/Display.html?id=".$ARGS{'id'});
+ }
+
+ # otherwise, drop the user at the SelfService default page
+ elsif ( $m->base_comp->path !~ '^(/+)SelfService/' ) {
+ RT::Interface::Web::Redirect($RT::WebURL."SelfService/");
+ }
+ else {
+ $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS);
+ }
}
else {
- $m->call_next(%ARGS);
+ $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS);
}
}
# If we have no credentials
else {
- $m->comp('/Elements/Login', %ARGS);
+ $m->comp( '/Elements/Login', %ARGS );
$m->abort();
}
+
+if ($RT::StatementLog) {
+ my @log = $RT::Handle->SQLStatementLog;
+ $RT::Handle->ClearSQLStatementLog;
+ for my $stmt (@log) {
+ my ( $time, $sql, $bind, $duration ) = @{$stmt};
+ my @bind;
+ if ( ref $bind ) {
+ @bind = @{$bind};
+ }
+ else {
+
+ # Older DBIx-SB
+ $duration = $bind;
+ }
+ $RT::Logger->log(
+ level => $RT::StatementLog,
+ message => "SQL(" . sprintf( "%.2f", $duration ) . "s): $sql;"
+ . (
+ @bind ? " [ bound values: @{[map{qq|'$_'|} @bind]} ]" : ""
+ )
+ );
+ }
+}
+
</%INIT>
<& /Elements/Footer, %ARGS &>
<%ARGS>
diff --git a/rt/html/index.html b/rt/html/index.html
index 04d48ece6..af95a655c 100644
--- a/rt/html/index.html
+++ b/rt/html/index.html
@@ -1,14 +1,15 @@
+<& /Elements/Header, Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'} &>
<!--
% $m->out('--'.'>');
% if (0) {
%# -->
<html><head>
-<META HTTP-EQUIV=Refresh CONTENT="3; URL=http://bestpractical.com/rt/rt-broken-install.html">
+<meta http-equiv="refresh" content="30; url=http://bestpractical.com/rt/rt-broken-install.html">
<title>Almost there!</title></head>
<body>
-<img src="http://www.bestpractical.com/images/unconfigured-rtlogo.jpg">
-<br><br>
+<img src="http://www.bestpractical.com/images/unconfigured-rtlogo.jpg" />
+<br /><br />
<h1>You're almost there!</h1>
You haven't yet configured your webserver to run RT.
@@ -16,7 +17,7 @@ You appear to have installed RT's web interface correctly, but haven't yet confi
server to "run" the RT server which powers the web interface.
The next step is to edit your webserver's configuration file to instruct it to use
-RT's <b>mod_perl</b>, <b>fastcgi</b> or <b>speedycgi</b> handler.
+RT's <strong>mod_perl</strong>, <strong>FastCGI</strong> or <strong>SpeedyCGI</strong> handler.
If you need commercial support, please contact us at sales@bestpractical.com.
@@ -28,7 +29,7 @@ If you need commercial support, please contact us at sales@bestpractical.com.
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -48,7 +49,9 @@ If you need commercial support, please contact us at sales@bestpractical.com.
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -69,30 +72,13 @@ If you need commercial support, please contact us at sales@bestpractical.com.
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'} &>
<& /Elements/Tabs,
current_toptab => '',
- Title=>loc("RT at a glance") &>
+ Title=>loc("RT at a glance"),
+ actions => $actions,
+ &>
<& /Elements/ListActions, actions => \@results &>
-<TABLE BORDER=0 WIDTH=100%>
-<TR VALIGN=TOP>
-<TD WIDTH=70% class="boxcontainer">
-<& /Elements/MyTickets &>
-<BR>
-<& /Elements/MyRequests &>
-<BR>
-<& /Elements/QuickCreate &>
-</TD>
-<TD class="boxcontainer">
-<& /Elements/Quicksearch &>
-<BR>
-<form method=get action="<%$RT::WebPath%>/index.html">
-<& /Elements/Refresh, Name => 'HomeRefreshInterval', Default => $session {'home_refresh_interval'} &>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</form>
-</TD>
-</TR>
-</TABLE>
+<& /Elements/MyRT &>
<%init>
my @results;
@@ -101,6 +87,7 @@ if ($ARGS{'QuickCreate'} ) {
my $ticket = RT::Ticket->new($session{'CurrentUser'});
my ($tid, $trans, $tmsg) = $ticket->Create(Queue => $ARGS{'Queue'},
Owner => $ARGS{'Owner'},
+ Requestor => $session{'CurrentUser'}->UserObj->EmailAddress,
Subject => $ARGS{'Subject'});
@@ -109,48 +96,22 @@ if ($ARGS{'QuickCreate'} ) {
if ( $ARGS{'q'} ) {
- my $query = $ARGS{'q'};
-
- if ( $query =~ m/^\s*(\d+)\s*$/ ) {
- $m->comp("/Ticket/Display.html" , id=> $1);
- return();
- }
-
- if ($m->comp('/Elements/Callback', _CallbackName => 'SearchPreFilter',
- query => $query, %ARGS)) {
- return();
- }
-
- $session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} );
-
- if ( $query =~ m/\@/ ) {
- $m->comp("/Search/Results.html", Query => "Requestor = '$query'");
-
- return();
- }
-
- #
- # Any search on queue name or subject will be for new/open tickets
- # only.
- #
-
- my $status = "Status = 'new' OR Status = 'open'";
-
- my $queue = RT::Queue->new( $session{'CurrentUser'} );
- if ( $queue->Load($query) && $queue->Id ) {
- $m->comp("/Search/Results.html", Query => "Queue = '" . $queue->Id . "' AND ($status)");
- return();
- }
-
- $m->comp("/Search/Results.html", Query => "Subject LIKE '$query' AND ($status)");
- return();
-
+ RT::Interface::Web::Redirect($RT::WebURL."Search/Simple.html?q=".$m->interp->apply_escapes($ARGS{q}));
}
if ($ARGS{'HomeRefreshInterval'}) {
$session{'home_refresh_interval'} = $ARGS{'HomeRefreshInterval'};
}
+my $actions;
+if ($session{'CurrentUser'}->HasRight(Right => 'ModifySelf', Object => $RT::System)) {
+ $actions = {
+ A => { title => loc('Edit'),
+ path => 'Prefs/MyRT.html',
+ },
+ };
+}
+
</%init>
%# --></body></html>
diff --git a/rt/html/l b/rt/html/l
index dbd146e57..32302aaa0 100644
--- a/rt/html/l
+++ b/rt/html/l
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY: