From b4b0c7e72d7eaee2fbfc7022022c9698323203dd Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 31 Dec 2009 13:16:41 +0000 Subject: import rt 3.8.7 --- rt/share/html/Admin/CustomFields/GroupRights.html | 114 + rt/share/html/Admin/CustomFields/Modify.html | 249 ++ rt/share/html/Admin/CustomFields/Objects.html | 153 + rt/share/html/Admin/CustomFields/UserRights.html | 110 + rt/share/html/Admin/CustomFields/index.html | 108 + rt/share/html/Admin/Elements/AddCustomFieldValue | 86 + rt/share/html/Admin/Elements/ConfigureMyRT | 82 + rt/share/html/Admin/Elements/CreateUserCalled | 50 + rt/share/html/Admin/Elements/CustomFieldTabs | 118 + rt/share/html/Admin/Elements/EditCustomField | 159 + rt/share/html/Admin/Elements/EditCustomFieldValues | 104 + .../Admin/Elements/EditCustomFieldValuesSource | 82 + rt/share/html/Admin/Elements/EditCustomFields | 205 + rt/share/html/Admin/Elements/EditQueueWatchers | 78 + rt/share/html/Admin/Elements/EditScrip | 197 + rt/share/html/Admin/Elements/EditScrips | 124 + rt/share/html/Admin/Elements/EditTemplates | 127 + rt/share/html/Admin/Elements/EditUserComments | 56 + rt/share/html/Admin/Elements/GlobalCustomFieldTabs | 105 + rt/share/html/Admin/Elements/GroupTabs | 102 + rt/share/html/Admin/Elements/Header | 52 + .../html/Admin/Elements/ListGlobalCustomFields | 61 + rt/share/html/Admin/Elements/ListGlobalScrips | 71 + rt/share/html/Admin/Elements/ModifyTemplate | 84 + rt/share/html/Admin/Elements/ObjectCustomFields | 111 + rt/share/html/Admin/Elements/PickCustomFields | 98 + rt/share/html/Admin/Elements/PickObjects | 81 + rt/share/html/Admin/Elements/QueueRightsForUser | 64 + rt/share/html/Admin/Elements/QueueTabs | 123 + rt/share/html/Admin/Elements/SelectCustomField | 71 + .../Admin/Elements/SelectCustomFieldLookupType | 60 + rt/share/html/Admin/Elements/SelectCustomFieldType | 60 + rt/share/html/Admin/Elements/SelectGroups | 62 + rt/share/html/Admin/Elements/SelectModifyGroup | 57 + rt/share/html/Admin/Elements/SelectModifyQueue | 57 + rt/share/html/Admin/Elements/SelectModifyUser | 73 + rt/share/html/Admin/Elements/SelectNewGroupMembers | 108 + rt/share/html/Admin/Elements/SelectRights | 121 + rt/share/html/Admin/Elements/SelectScrip | 72 + rt/share/html/Admin/Elements/SelectScripAction | 73 + rt/share/html/Admin/Elements/SelectScripCondition | 72 + .../html/Admin/Elements/SelectSingleOrMultiple | 67 + rt/share/html/Admin/Elements/SelectStage | 75 + rt/share/html/Admin/Elements/SelectTemplate | 87 + rt/share/html/Admin/Elements/SelectUsers | 66 + rt/share/html/Admin/Elements/ShowKeyInfo | 91 + rt/share/html/Admin/Elements/SystemTabs | 102 + rt/share/html/Admin/Elements/Tabs | 95 + rt/share/html/Admin/Elements/ToolTabs | 82 + rt/share/html/Admin/Elements/UserTabs | 116 + .../html/Admin/Global/CustomFields/Groups.html | 58 + .../Admin/Global/CustomFields/Queue-Tickets.html | 58 + .../Global/CustomFields/Queue-Transactions.html | 58 + .../html/Admin/Global/CustomFields/Queues.html | 58 + rt/share/html/Admin/Global/CustomFields/Users.html | 58 + rt/share/html/Admin/Global/CustomFields/index.html | 99 + rt/share/html/Admin/Global/GroupRights.html | 123 + rt/share/html/Admin/Global/MyRT.html | 112 + rt/share/html/Admin/Global/Scrip.html | 86 + rt/share/html/Admin/Global/Scrips.html | 77 + rt/share/html/Admin/Global/Template.html | 123 + rt/share/html/Admin/Global/Templates.html | 77 + rt/share/html/Admin/Global/UserRights.html | 99 + rt/share/html/Admin/Global/index.html | 86 + rt/share/html/Admin/Groups/CustomFields.html | 48 + rt/share/html/Admin/Groups/GroupRights.html | 119 + rt/share/html/Admin/Groups/History.html | 68 + rt/share/html/Admin/Groups/Members.html | 159 + rt/share/html/Admin/Groups/Modify.html | 178 + rt/share/html/Admin/Groups/UserRights.html | 112 + rt/share/html/Admin/Groups/index.html | 129 + rt/share/html/Admin/Queues/CustomField.html | 87 + rt/share/html/Admin/Queues/CustomFields.html | 72 + rt/share/html/Admin/Queues/GroupRights.html | 134 + rt/share/html/Admin/Queues/History.html | 68 + rt/share/html/Admin/Queues/Modify.html | 214 + rt/share/html/Admin/Queues/People.html | 215 + rt/share/html/Admin/Queues/Scrip.html | 99 + rt/share/html/Admin/Queues/Scrips.html | 87 + rt/share/html/Admin/Queues/Template.html | 132 + rt/share/html/Admin/Queues/Templates.html | 81 + rt/share/html/Admin/Queues/UserRights.html | 112 + rt/share/html/Admin/Queues/index.html | 126 + rt/share/html/Admin/Tools/Configuration.html | 170 + rt/share/html/Admin/Tools/Shredder/Dumps/dhandler | 68 + .../Admin/Tools/Shredder/Elements/DumpFileLink | 61 + .../Admin/Tools/Shredder/Elements/Error/NoRights | 55 + .../Admin/Tools/Shredder/Elements/Error/NoStorage | 59 + .../Tools/Shredder/Elements/Object/RT--Attachment | 53 + .../Tools/Shredder/Elements/Object/RT--Ticket | 53 + .../Admin/Tools/Shredder/Elements/Object/RT--User | 53 + .../Admin/Tools/Shredder/Elements/ObjectCheckBox | 66 + .../Admin/Tools/Shredder/Elements/PluginArguments | 62 + .../html/Admin/Tools/Shredder/Elements/PluginHelp | 75 + .../Admin/Tools/Shredder/Elements/SelectObjects | 67 + .../Admin/Tools/Shredder/Elements/SelectPlugin | 73 + rt/share/html/Admin/Tools/Shredder/autohandler | 60 + rt/share/html/Admin/Tools/Shredder/index.html | 186 + rt/share/html/Admin/Tools/index.html | 55 + rt/share/html/Admin/Users/CustomFields.html | 71 + rt/share/html/Admin/Users/GnuPG.html | 112 + rt/share/html/Admin/Users/History.html | 68 + rt/share/html/Admin/Users/Memberships.html | 143 + rt/share/html/Admin/Users/Modify.html | 437 ++ rt/share/html/Admin/Users/MyRT.html | 134 + rt/share/html/Admin/Users/index.html | 135 + rt/share/html/Admin/autohandler | 55 + rt/share/html/Admin/index.html | 95 + rt/share/html/Approvals/Display.html | 72 + rt/share/html/Approvals/Elements/Approve | 94 + rt/share/html/Approvals/Elements/PendingMyApproval | 111 + rt/share/html/Approvals/Elements/ShowDependency | 109 + rt/share/html/Approvals/Elements/Tabs | 58 + rt/share/html/Approvals/autohandler | 53 + rt/share/html/Approvals/index.html | 90 + .../html/Dashboards/Elements/DashboardsForObject | 81 + .../html/Dashboards/Elements/DashboardsForObjects | 81 + rt/share/html/Dashboards/Elements/Deleted | 62 + rt/share/html/Dashboards/Elements/HiddenSearches | 79 + rt/share/html/Dashboards/Elements/ListOfDashboards | 19 + rt/share/html/Dashboards/Elements/SelectPrivacy | 64 + rt/share/html/Dashboards/Elements/ShowDashboards | 112 + .../html/Dashboards/Elements/ShowPortlet/component | 54 + .../html/Dashboards/Elements/ShowPortlet/dashboard | 89 + .../html/Dashboards/Elements/ShowPortlet/search | 63 + rt/share/html/Dashboards/Elements/ShowSubscription | 75 + rt/share/html/Dashboards/Elements/Tabs | 113 + rt/share/html/Dashboards/Modify.html | 168 + rt/share/html/Dashboards/Queries.html | 280 ++ rt/share/html/Dashboards/Render.html | 143 + rt/share/html/Dashboards/Subscription.html | 292 ++ rt/share/html/Dashboards/dhandler | 56 + rt/share/html/Dashboards/index.html | 107 + rt/share/html/Download/CustomFieldValue/dhandler | 77 + rt/share/html/Download/Tabular/dhandler | 76 + rt/share/html/Elements/BevelBoxRaisedEnd | 50 + rt/share/html/Elements/BevelBoxRaisedStart | 50 + rt/share/html/Elements/Callback | 53 + rt/share/html/Elements/Checkbox | 63 + rt/share/html/Elements/CollectionAsTable/Header | 142 + .../html/Elements/CollectionAsTable/ParseFormat | 108 + rt/share/html/Elements/CollectionAsTable/Row | 143 + rt/share/html/Elements/CollectionList | 175 + rt/share/html/Elements/CollectionListPaging | 108 + rt/share/html/Elements/ColumnMap | 151 + rt/share/html/Elements/CreateTicket | 50 + rt/share/html/Elements/DashboardTabs | 52 + rt/share/html/Elements/Dashboards | 66 + rt/share/html/Elements/EditCustomField | 116 + rt/share/html/Elements/EditCustomFieldAutocomplete | 88 + rt/share/html/Elements/EditCustomFieldBinary | 62 + rt/share/html/Elements/EditCustomFieldCombobox | 69 + rt/share/html/Elements/EditCustomFieldFreeform | 71 + rt/share/html/Elements/EditCustomFieldImage | 62 + rt/share/html/Elements/EditCustomFieldSelect | 161 + rt/share/html/Elements/EditCustomFieldText | 67 + rt/share/html/Elements/EditCustomFieldWikitext | 67 + rt/share/html/Elements/EditLinks | 178 + rt/share/html/Elements/EditTimeValue | 65 + rt/share/html/Elements/EmailInput | 53 + rt/share/html/Elements/Error | 90 + rt/share/html/Elements/Footer | 84 + rt/share/html/Elements/GnuPG/KeyIssues | 92 + .../html/Elements/GnuPG/SelectKeyForEncryption | 81 + rt/share/html/Elements/GnuPG/SelectKeyForSigning | 64 + rt/share/html/Elements/GnuPG/SignEncryptWidget | 184 + rt/share/html/Elements/GotoTicket | 50 + rt/share/html/Elements/Header | 118 + rt/share/html/Elements/HeaderJavascript | 122 + rt/share/html/Elements/ListActions | 94 + rt/share/html/Elements/ListMenu | 58 + rt/share/html/Elements/Login | 139 + rt/share/html/Elements/Logo | 66 + rt/share/html/Elements/Logout | 65 + rt/share/html/Elements/MakeClicky | 207 + rt/share/html/Elements/Menu | 139 + rt/share/html/Elements/MessageBox | 82 + rt/share/html/Elements/MyAdminQueues | 54 + rt/share/html/Elements/MyRT | 106 + rt/share/html/Elements/MyReminders | 74 + rt/share/html/Elements/MyRequests | 49 + rt/share/html/Elements/MySupportQueues | 60 + rt/share/html/Elements/MyTickets | 49 + rt/share/html/Elements/PageLayout | 251 ++ rt/share/html/Elements/PersonalQuickbar | 16 + rt/share/html/Elements/QueryString | 64 + rt/share/html/Elements/QueueSummary | 108 + rt/share/html/Elements/QuickCreate | 77 + rt/share/html/Elements/Quicksearch | 65 + rt/share/html/Elements/RT__Group/ColumnMap | 92 + rt/share/html/Elements/RT__Queue/ColumnMap | 115 + rt/share/html/Elements/RT__Scrip/ColumnMap | 103 + rt/share/html/Elements/RT__Template/ColumnMap | 76 + rt/share/html/Elements/RT__Ticket/ColumnMap | 355 ++ rt/share/html/Elements/RT__User/ColumnMap | 141 + rt/share/html/Elements/Refresh | 69 + rt/share/html/Elements/RefreshHomepage | 54 + rt/share/html/Elements/ScrubHTML | 77 + rt/share/html/Elements/Section | 51 + rt/share/html/Elements/SelectAttachmentField | 56 + rt/share/html/Elements/SelectBoolean | 71 + rt/share/html/Elements/SelectCustomFieldOperator | 64 + rt/share/html/Elements/SelectCustomFieldValue | 65 + rt/share/html/Elements/SelectDate | 77 + rt/share/html/Elements/SelectDateRelation | 60 + rt/share/html/Elements/SelectDateType | 60 + rt/share/html/Elements/SelectEqualityOperator | 64 + rt/share/html/Elements/SelectGroups | 68 + rt/share/html/Elements/SelectLang | 80 + rt/share/html/Elements/SelectLinkType | 57 + rt/share/html/Elements/SelectMatch | 82 + rt/share/html/Elements/SelectNewTicketQueue | 50 + rt/share/html/Elements/SelectOwner | 133 + rt/share/html/Elements/SelectPriority | 8 + rt/share/html/Elements/SelectQueue | 106 + rt/share/html/Elements/SelectResultsPerPage | 68 + rt/share/html/Elements/SelectSortOrder | 65 + rt/share/html/Elements/SelectStatus | 67 + rt/share/html/Elements/SelectTicketSortBy | 62 + rt/share/html/Elements/SelectTicketTypes | 58 + rt/share/html/Elements/SelectTimeUnits | 62 + rt/share/html/Elements/SelectTimezone | 84 + rt/share/html/Elements/SelectUsers | 68 + rt/share/html/Elements/SelectWatcherType | 71 + rt/share/html/Elements/SetupSessionCookie | 57 + rt/share/html/Elements/ShowCustomFieldBinary | 51 + rt/share/html/Elements/ShowCustomFieldImage | 53 + rt/share/html/Elements/ShowCustomFieldText | 56 + rt/share/html/Elements/ShowCustomFieldWikitext | 58 + rt/share/html/Elements/ShowCustomFields | 123 + rt/share/html/Elements/ShowLink | 69 + rt/share/html/Elements/ShowLinks | 160 + rt/share/html/Elements/ShowMemberships | 88 + rt/share/html/Elements/ShowSearch | 151 + rt/share/html/Elements/ShowUser | 69 + rt/share/html/Elements/ShowUserConcise | 52 + rt/share/html/Elements/ShowUserEmailFrequency | 56 + rt/share/html/Elements/ShowUserVerbose | 73 + rt/share/html/Elements/SimpleSearch | 53 + rt/share/html/Elements/Submit | 103 + rt/share/html/Elements/Tabs | 128 + rt/share/html/Elements/TicketList | 70 + rt/share/html/Elements/TitleBox | 51 + rt/share/html/Elements/TitleBoxEnd | 51 + rt/share/html/Elements/TitleBoxStart | 51 + rt/share/html/Elements/ValidateCustomFields | 100 + .../html/Helpers/Autocomplete/CustomFieldValues | 81 + rt/share/html/Helpers/CalPopup.html | 133 + rt/share/html/Helpers/Toggle/TicketBookmark | 54 + rt/share/html/Install/Basics.html | 104 + rt/share/html/Install/DatabaseDetails.html | 201 + rt/share/html/Install/DatabaseType.html | 90 + rt/share/html/Install/Elements/Errors | 63 + rt/share/html/Install/Elements/Wrapper | 66 + rt/share/html/Install/Finish.html | 95 + rt/share/html/Install/Global.html | 121 + rt/share/html/Install/Initialize.html | 142 + rt/share/html/Install/Sendmail.html | 107 + rt/share/html/Install/autohandler | 67 + rt/share/html/Install/index.html | 142 + rt/share/html/NoAuth/Logout.html | 79 + rt/share/html/NoAuth/Reminder.html | 50 + .../editor/_source/classes/fckcontextmenu.js | 223 + .../editor/_source/classes/fckdataprocessor.js | 119 + .../_source/classes/fckdocumentfragment_gecko.js | 53 + .../_source/classes/fckdocumentfragment_ie.js | 58 + .../editor/_source/classes/fckdomrange.js | 935 +++++ .../editor/_source/classes/fckdomrange_gecko.js | 104 + .../editor/_source/classes/fckdomrange_ie.js | 199 + .../editor/_source/classes/fckdomrangeiterator.js | 327 ++ .../editor/_source/classes/fckeditingarea.js | 368 ++ .../editor/_source/classes/fckelementpath.js | 89 + .../editor/_source/classes/fckenterkey.js | 708 ++++ .../FCKeditor/editor/_source/classes/fckevents.js | 71 + .../editor/_source/classes/fckhtmliterator.js | 142 + .../FCKeditor/editor/_source/classes/fckicon.js | 103 + .../editor/_source/classes/fckiecleanup.js | 68 + .../editor/_source/classes/fckimagepreloader.js | 64 + .../editor/_source/classes/fckkeystrokehandler.js | 141 + .../editor/_source/classes/fckmenublock.js | 153 + .../editor/_source/classes/fckmenublockpanel.js | 54 + .../editor/_source/classes/fckmenuitem.js | 161 + .../FCKeditor/editor/_source/classes/fckpanel.js | 463 +++ .../FCKeditor/editor/_source/classes/fckplugin.js | 56 + .../editor/_source/classes/fckspecialcombo.js | 376 ++ .../FCKeditor/editor/_source/classes/fckstyle.js | 1500 +++++++ .../FCKeditor/editor/_source/classes/fcktoolbar.js | 103 + .../_source/classes/fcktoolbarbreak_gecko.js | 36 + .../editor/_source/classes/fcktoolbarbreak_ie.js | 38 + .../editor/_source/classes/fcktoolbarbutton.js | 81 + .../editor/_source/classes/fcktoolbarbuttonui.js | 198 + .../_source/classes/fcktoolbarfontformatcombo.js | 139 + .../editor/_source/classes/fcktoolbarfontscombo.js | 98 + .../_source/classes/fcktoolbarfontsizecombo.js | 76 + .../_source/classes/fcktoolbarpanelbutton.js | 103 + .../_source/classes/fcktoolbarspecialcombo.js | 146 + .../editor/_source/classes/fcktoolbarstylecombo.js | 200 + .../editor/_source/classes/fckw3crange.js | 451 ++ .../FCKeditor/editor/_source/classes/fckxml.js | 108 + .../editor/_source/classes/fckxml_gecko.js | 106 + .../FCKeditor/editor/_source/classes/fckxml_ie.js | 93 + .../_source/commandclasses/fck_othercommands.js | 634 +++ .../_source/commandclasses/fckblockquotecommand.js | 281 ++ .../_source/commandclasses/fckcorestylecommand.js | 61 + .../editor/_source/commandclasses/fckfitwindow.js | 213 + .../_source/commandclasses/fckindentcommands.js | 282 ++ .../_source/commandclasses/fckjustifycommands.js | 173 + .../_source/commandclasses/fcklistcommands.js | 382 ++ .../_source/commandclasses/fcknamedcommand.js | 39 + .../commandclasses/fckpasteplaintextcommand.js | 40 + .../_source/commandclasses/fckpastewordcommand.js | 40 + .../commandclasses/fckremoveformatcommand.js | 45 + .../editor/_source/commandclasses/fckshowblocks.js | 94 + .../commandclasses/fckspellcheckcommand_gecko.js | 49 + .../commandclasses/fckspellcheckcommand_ie.js | 72 + .../_source/commandclasses/fckstylecommand.js | 60 + .../_source/commandclasses/fcktablecommand.js | 106 + .../_source/commandclasses/fcktextcolorcommand.js | 201 + .../FCKeditor/editor/_source/fckconstants.js | 56 + .../FCKeditor/editor/_source/fckeditorapi.js | 179 + .../editor/_source/fckjscoreextensions.js | 159 + .../FCKeditor/editor/_source/fckscriptloader.js | 122 + .../FCKeditor/editor/_source/internals/fck.js | 1256 ++++++ .../editor/_source/internals/fck_contextmenu.js | 345 ++ .../editor/_source/internals/fck_gecko.js | 497 +++ .../FCKeditor/editor/_source/internals/fck_ie.js | 456 +++ .../editor/_source/internals/fckbrowserinfo.js | 61 + .../editor/_source/internals/fckcodeformatter.js | 100 + .../editor/_source/internals/fckcommands.js | 172 + .../editor/_source/internals/fckconfig.js | 237 ++ .../FCKeditor/editor/_source/internals/fckdebug.js | 59 + .../editor/_source/internals/fckdebug_empty.js | 31 + .../editor/_source/internals/fckdialog.js | 239 ++ .../_source/internals/fckdocumentprocessor.js | 270 ++ .../editor/_source/internals/fckdomtools.js | 1057 +++++ .../editor/_source/internals/fcklanguagemanager.js | 165 + .../editor/_source/internals/fcklisthandler.js | 152 + .../editor/_source/internals/fcklistslib.js | 63 + .../editor/_source/internals/fckplugins.js | 46 + .../editor/_source/internals/fckregexlib.js | 100 + .../editor/_source/internals/fckselection.js | 42 + .../editor/_source/internals/fckselection_gecko.js | 228 ++ .../editor/_source/internals/fckselection_ie.js | 287 ++ .../editor/_source/internals/fckstyles.js | 381 ++ .../editor/_source/internals/fcktablehandler.js | 863 ++++ .../_source/internals/fcktablehandler_gecko.js | 56 + .../editor/_source/internals/fcktablehandler_ie.js | 64 + .../editor/_source/internals/fcktoolbaritems.js | 124 + .../editor/_source/internals/fcktoolbarset.js | 399 ++ .../FCKeditor/editor/_source/internals/fcktools.js | 749 ++++ .../editor/_source/internals/fcktools_gecko.js | 282 ++ .../editor/_source/internals/fcktools_ie.js | 234 ++ .../FCKeditor/editor/_source/internals/fckundo.js | 223 + .../editor/_source/internals/fckurlparams.js | 39 + .../FCKeditor/editor/_source/internals/fckxhtml.js | 534 +++ .../editor/_source/internals/fckxhtml_gecko.js | 114 + .../editor/_source/internals/fckxhtml_ie.js | 213 + .../editor/_source/internals/fckxhtmlentities.js | 357 ++ .../editor/css/behaviors/disablehandles.htc | 15 + .../editor/css/behaviors/showtableborders.htc | 36 + .../FCKeditor/editor/css/fck_editorarea.css | 110 + .../RichText/FCKeditor/editor/css/fck_internal.css | 199 + .../editor/css/fck_showtableborders_gecko.css | 49 + .../FCKeditor/editor/css/images/block_address.png | Bin 0 -> 288 bytes .../editor/css/images/block_blockquote.png | Bin 0 -> 293 bytes .../FCKeditor/editor/css/images/block_div.png | Bin 0 -> 229 bytes .../FCKeditor/editor/css/images/block_h1.png | Bin 0 -> 218 bytes .../FCKeditor/editor/css/images/block_h2.png | Bin 0 -> 220 bytes .../FCKeditor/editor/css/images/block_h3.png | Bin 0 -> 219 bytes .../FCKeditor/editor/css/images/block_h4.png | Bin 0 -> 229 bytes .../FCKeditor/editor/css/images/block_h5.png | Bin 0 -> 236 bytes .../FCKeditor/editor/css/images/block_h6.png | Bin 0 -> 216 bytes .../FCKeditor/editor/css/images/block_p.png | Bin 0 -> 205 bytes .../FCKeditor/editor/css/images/block_pre.png | Bin 0 -> 223 bytes .../FCKeditor/editor/css/images/fck_anchor.gif | Bin 0 -> 184 bytes .../FCKeditor/editor/css/images/fck_flashlogo.gif | Bin 0 -> 599 bytes .../editor/css/images/fck_hiddenfield.gif | Bin 0 -> 105 bytes .../FCKeditor/editor/css/images/fck_pagebreak.gif | Bin 0 -> 54 bytes .../FCKeditor/editor/css/images/fck_plugin.gif | Bin 0 -> 1709 bytes .../editor/dialog/common/fck_dialog_common.css | 85 + .../editor/dialog/common/fck_dialog_common.js | 347 ++ .../editor/dialog/common/images/locked.gif | Bin 0 -> 74 bytes .../editor/dialog/common/images/reset.gif | Bin 0 -> 104 bytes .../editor/dialog/common/images/unlocked.gif | Bin 0 -> 75 bytes .../FCKeditor/editor/dialog/fck_about.html | 161 + .../editor/dialog/fck_about/logo_fckeditor.gif | Bin 0 -> 2044 bytes .../editor/dialog/fck_about/logo_fredck.gif | Bin 0 -> 920 bytes .../dialog/fck_about/sponsors/spellchecker_net.gif | Bin 0 -> 1447 bytes .../FCKeditor/editor/dialog/fck_anchor.html | 220 + .../FCKeditor/editor/dialog/fck_button.html | 104 + .../FCKeditor/editor/dialog/fck_checkbox.html | 104 + .../FCKeditor/editor/dialog/fck_colorselector.html | 172 + .../RichText/FCKeditor/editor/dialog/fck_div.html | 396 ++ .../FCKeditor/editor/dialog/fck_docprops.html | 600 +++ .../dialog/fck_docprops/fck_document_preview.html | 113 + .../FCKeditor/editor/dialog/fck_flash.html | 152 + .../FCKeditor/editor/dialog/fck_flash/fck_flash.js | 300 ++ .../editor/dialog/fck_flash/fck_flash_preview.html | 50 + .../RichText/FCKeditor/editor/dialog/fck_form.html | 109 + .../FCKeditor/editor/dialog/fck_hiddenfield.html | 115 + .../FCKeditor/editor/dialog/fck_image.html | 258 ++ .../FCKeditor/editor/dialog/fck_image/fck_image.js | 512 +++ .../editor/dialog/fck_image/fck_image_preview.html | 72 + .../RichText/FCKeditor/editor/dialog/fck_link.html | 295 ++ .../FCKeditor/editor/dialog/fck_link/fck_link.js | 893 ++++ .../FCKeditor/editor/dialog/fck_listprop.html | 120 + .../FCKeditor/editor/dialog/fck_paste.html | 347 ++ .../FCKeditor/editor/dialog/fck_radiobutton.html | 104 + .../FCKeditor/editor/dialog/fck_replace.html | 650 +++ .../FCKeditor/editor/dialog/fck_select.html | 180 + .../editor/dialog/fck_select/fck_select.js | 194 + .../FCKeditor/editor/dialog/fck_smiley.html | 111 + .../FCKeditor/editor/dialog/fck_source.html | 68 + .../FCKeditor/editor/dialog/fck_specialchar.html | 121 + .../FCKeditor/editor/dialog/fck_spellerpages.html | 70 + .../fck_spellerpages/spellerpages/blank.html | 0 .../fck_spellerpages/spellerpages/controlWindow.js | 87 + .../fck_spellerpages/spellerpages/controls.html | 153 + .../spellerpages/server-scripts/spellchecker.cfm | 148 + .../spellerpages/server-scripts/spellchecker.php | 199 + .../spellerpages/server-scripts/spellchecker.pl | 181 + .../fck_spellerpages/spellerpages/spellChecker.js | 461 +++ .../spellerpages/spellchecker.html | 71 + .../fck_spellerpages/spellerpages/spellerStyle.css | 49 + .../fck_spellerpages/spellerpages/wordWindow.js | 272 ++ .../FCKeditor/editor/dialog/fck_table.html | 439 ++ .../FCKeditor/editor/dialog/fck_tablecell.html | 293 ++ .../FCKeditor/editor/dialog/fck_template.html | 242 ++ .../dialog/fck_template/images/template1.gif | Bin 0 -> 375 bytes .../dialog/fck_template/images/template2.gif | Bin 0 -> 333 bytes .../dialog/fck_template/images/template3.gif | Bin 0 -> 422 bytes .../FCKeditor/editor/dialog/fck_textarea.html | 94 + .../FCKeditor/editor/dialog/fck_textfield.html | 136 + .../FCKeditor/editor/dtd/fck_dtd_test.html | 41 + .../FCKeditor/editor/dtd/fck_xhtml10strict.js | 116 + .../editor/dtd/fck_xhtml10transitional.js | 140 + .../NoAuth/RichText/FCKeditor/editor/fckdebug.html | 153 + .../RichText/FCKeditor/editor/fckdialog.html | 819 ++++ .../RichText/FCKeditor/editor/fckeditor.html | 317 ++ .../FCKeditor/editor/fckeditor.original.html | 424 ++ .../RichText/FCKeditor/editor/images/anchor.gif | Bin 0 -> 184 bytes .../RichText/FCKeditor/editor/images/arrow_ltr.gif | Bin 0 -> 49 bytes .../RichText/FCKeditor/editor/images/arrow_rtl.gif | Bin 0 -> 49 bytes .../editor/images/smiley/msn/angel_smile.gif | Bin 0 -> 445 bytes .../editor/images/smiley/msn/angry_smile.gif | Bin 0 -> 453 bytes .../editor/images/smiley/msn/broken_heart.gif | Bin 0 -> 423 bytes .../FCKeditor/editor/images/smiley/msn/cake.gif | Bin 0 -> 453 bytes .../editor/images/smiley/msn/confused_smile.gif | Bin 0 -> 322 bytes .../editor/images/smiley/msn/cry_smile.gif | Bin 0 -> 473 bytes .../editor/images/smiley/msn/devil_smile.gif | Bin 0 -> 444 bytes .../editor/images/smiley/msn/embaressed_smile.gif | Bin 0 -> 1077 bytes .../editor/images/smiley/msn/envelope.gif | Bin 0 -> 1030 bytes .../FCKeditor/editor/images/smiley/msn/heart.gif | Bin 0 -> 1012 bytes .../FCKeditor/editor/images/smiley/msn/kiss.gif | Bin 0 -> 978 bytes .../editor/images/smiley/msn/lightbulb.gif | Bin 0 -> 303 bytes .../editor/images/smiley/msn/omg_smile.gif | Bin 0 -> 342 bytes .../editor/images/smiley/msn/regular_smile.gif | Bin 0 -> 1036 bytes .../editor/images/smiley/msn/sad_smile.gif | Bin 0 -> 1039 bytes .../editor/images/smiley/msn/shades_smile.gif | Bin 0 -> 1059 bytes .../editor/images/smiley/msn/teeth_smile.gif | Bin 0 -> 1064 bytes .../editor/images/smiley/msn/thumbs_down.gif | Bin 0 -> 992 bytes .../editor/images/smiley/msn/thumbs_up.gif | Bin 0 -> 989 bytes .../editor/images/smiley/msn/tounge_smile.gif | Bin 0 -> 1055 bytes .../smiley/msn/whatchutalkingabout_smile.gif | Bin 0 -> 1034 bytes .../editor/images/smiley/msn/wink_smile.gif | Bin 0 -> 1041 bytes .../RichText/FCKeditor/editor/images/spacer.gif | Bin 0 -> 43 bytes .../RichText/FCKeditor/editor/js/fckadobeair.js | 176 + .../FCKeditor/editor/js/fckeditorcode_gecko.js | 108 + .../FCKeditor/editor/js/fckeditorcode_ie.js | 109 + .../FCKeditor/editor/lang/_translationstatus.txt | 79 + .../NoAuth/RichText/FCKeditor/editor/lang/af.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/ar.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/bg.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/bn.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/bs.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/ca.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/cs.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/da.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/de.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/el.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/en-au.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/en-ca.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/en-uk.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/en.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/eo.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/es.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/et.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/eu.js | 535 +++ .../NoAuth/RichText/FCKeditor/editor/lang/fa.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/fi.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/fo.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/fr-ca.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/fr.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/gl.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/gu.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/he.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/hi.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/hr.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/hu.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/is.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/it.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/ja.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/km.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/ko.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/lt.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/lv.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/mn.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/ms.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/nb.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/nl.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/no.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/pl.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/pt-br.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/pt.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/ro.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/ru.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/sk.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/sl.js | 534 +++ .../RichText/FCKeditor/editor/lang/sr-latn.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/sr.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/sv.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/th.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/tr.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/uk.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/vi.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/zh-cn.js | 534 +++ .../NoAuth/RichText/FCKeditor/editor/lang/zh.js | 534 +++ .../FCKeditor/editor/plugins/autogrow/fckplugin.js | 111 + .../editor/plugins/bbcode/_sample/sample.config.js | 26 + .../editor/plugins/bbcode/_sample/sample.html | 67 + .../FCKeditor/editor/plugins/bbcode/fckplugin.js | 123 + .../editor/plugins/dragresizetable/fckplugin.js | 529 +++ .../plugins/placeholder/fck_placeholder.html | 105 + .../editor/plugins/placeholder/fckplugin.js | 187 + .../editor/plugins/placeholder/lang/de.js | 27 + .../editor/plugins/placeholder/lang/en.js | 27 + .../editor/plugins/placeholder/lang/es.js | 27 + .../editor/plugins/placeholder/lang/fr.js | 27 + .../editor/plugins/placeholder/lang/it.js | 27 + .../editor/plugins/placeholder/lang/pl.js | 27 + .../editor/plugins/placeholder/placeholder.gif | Bin 0 -> 96 bytes .../editor/plugins/simplecommands/fckplugin.js | 29 + .../editor/plugins/tablecommands/fckplugin.js | 33 + .../FCKeditor/editor/skins/_fckviewstrips.html | 121 + .../FCKeditor/editor/skins/default/fck_dialog.css | 402 ++ .../editor/skins/default/fck_dialog_ie6.js | 110 + .../FCKeditor/editor/skins/default/fck_editor.css | 464 +++ .../FCKeditor/editor/skins/default/fck_strip.gif | Bin 0 -> 5175 bytes .../editor/skins/default/images/dialog.sides.gif | Bin 0 -> 48 bytes .../editor/skins/default/images/dialog.sides.png | Bin 0 -> 178 bytes .../skins/default/images/dialog.sides.rtl.png | Bin 0 -> 181 bytes .../editor/skins/default/images/sprites.gif | Bin 0 -> 959 bytes .../editor/skins/default/images/sprites.png | Bin 0 -> 3250 bytes .../skins/default/images/toolbar.arrowright.gif | Bin 0 -> 53 bytes .../skins/default/images/toolbar.buttonarrow.gif | Bin 0 -> 46 bytes .../skins/default/images/toolbar.collapse.gif | Bin 0 -> 152 bytes .../editor/skins/default/images/toolbar.end.gif | Bin 0 -> 43 bytes .../editor/skins/default/images/toolbar.expand.gif | Bin 0 -> 152 bytes .../skins/default/images/toolbar.separator.gif | Bin 0 -> 58 bytes .../editor/skins/default/images/toolbar.start.gif | Bin 0 -> 105 bytes .../editor/skins/office2003/fck_dialog.css | 402 ++ .../editor/skins/office2003/fck_dialog_ie6.js | 110 + .../editor/skins/office2003/fck_editor.css | 476 +++ .../editor/skins/office2003/fck_strip.gif | Bin 0 -> 9668 bytes .../skins/office2003/images/dialog.sides.gif | Bin 0 -> 48 bytes .../skins/office2003/images/dialog.sides.png | Bin 0 -> 203 bytes .../skins/office2003/images/dialog.sides.rtl.png | Bin 0 -> 205 bytes .../editor/skins/office2003/images/sprites.gif | Bin 0 -> 959 bytes .../editor/skins/office2003/images/sprites.png | Bin 0 -> 3305 bytes .../skins/office2003/images/toolbar.arrowright.gif | Bin 0 -> 53 bytes .../editor/skins/office2003/images/toolbar.bg.gif | Bin 0 -> 73 bytes .../office2003/images/toolbar.buttonarrow.gif | Bin 0 -> 46 bytes .../skins/office2003/images/toolbar.collapse.gif | Bin 0 -> 152 bytes .../editor/skins/office2003/images/toolbar.end.gif | Bin 0 -> 124 bytes .../skins/office2003/images/toolbar.expand.gif | Bin 0 -> 152 bytes .../skins/office2003/images/toolbar.separator.gif | Bin 0 -> 67 bytes .../skins/office2003/images/toolbar.start.gif | Bin 0 -> 99 bytes .../FCKeditor/editor/skins/silver/fck_dialog.css | 402 ++ .../editor/skins/silver/fck_dialog_ie6.js | 110 + .../FCKeditor/editor/skins/silver/fck_editor.css | 473 +++ .../FCKeditor/editor/skins/silver/fck_strip.gif | Bin 0 -> 5175 bytes .../editor/skins/silver/images/dialog.sides.gif | Bin 0 -> 48 bytes .../editor/skins/silver/images/dialog.sides.png | Bin 0 -> 198 bytes .../skins/silver/images/dialog.sides.rtl.png | Bin 0 -> 200 bytes .../editor/skins/silver/images/sprites.gif | Bin 0 -> 959 bytes .../editor/skins/silver/images/sprites.png | Bin 0 -> 3278 bytes .../skins/silver/images/toolbar.arrowright.gif | Bin 0 -> 53 bytes .../skins/silver/images/toolbar.buttonarrow.gif | Bin 0 -> 46 bytes .../skins/silver/images/toolbar.buttonbg.gif | Bin 0 -> 829 bytes .../skins/silver/images/toolbar.collapse.gif | Bin 0 -> 152 bytes .../editor/skins/silver/images/toolbar.end.gif | Bin 0 -> 43 bytes .../editor/skins/silver/images/toolbar.expand.gif | Bin 0 -> 152 bytes .../skins/silver/images/toolbar.separator.gif | Bin 0 -> 58 bytes .../editor/skins/silver/images/toolbar.start.gif | Bin 0 -> 105 bytes .../RichText/FCKeditor/editor/wsc/ciframe.html | 65 + .../RichText/FCKeditor/editor/wsc/tmpFrameset.html | 67 + .../NoAuth/RichText/FCKeditor/editor/wsc/w.html | 227 + .../html/NoAuth/RichText/FCKeditor/fckconfig.js | 327 ++ .../html/NoAuth/RichText/FCKeditor/fckeditor.js | 330 ++ .../html/NoAuth/RichText/FCKeditor/fckpackager.xml | 262 ++ .../html/NoAuth/RichText/FCKeditor/fckstyles.xml | 111 + .../NoAuth/RichText/FCKeditor/fcktemplates.xml | 103 + .../html/NoAuth/RichText/FCKeditor/license.txt | 1246 ++++++ rt/share/html/NoAuth/RichText/dhandler | 69 + rt/share/html/NoAuth/css/3.4-compat/body.css | 75 + rt/share/html/NoAuth/css/3.4-compat/footer.css | 61 + rt/share/html/NoAuth/css/3.4-compat/forms.css | 110 + rt/share/html/NoAuth/css/3.4-compat/header.css | 88 + rt/share/html/NoAuth/css/3.4-compat/login.css | 54 + rt/share/html/NoAuth/css/3.4-compat/main.css | 75 + rt/share/html/NoAuth/css/3.4-compat/misc.css | 78 + rt/share/html/NoAuth/css/3.4-compat/nav.css | 106 + rt/share/html/NoAuth/css/3.4-compat/quickbar.css | 82 + rt/share/html/NoAuth/css/3.4-compat/ticket.css | 50 + rt/share/html/NoAuth/css/3.4-compat/titlebox.css | 103 + .../html/NoAuth/css/3.4-compat/transactions.css | 83 + rt/share/html/NoAuth/css/3.5-default/approvals.css | 97 + rt/share/html/NoAuth/css/3.5-default/body.css | 81 + rt/share/html/NoAuth/css/3.5-default/footer.css | 91 + rt/share/html/NoAuth/css/3.5-default/forms.css | 148 + rt/share/html/NoAuth/css/3.5-default/header.css | 152 + rt/share/html/NoAuth/css/3.5-default/local.css | 50 + rt/share/html/NoAuth/css/3.5-default/login.css | 85 + rt/share/html/NoAuth/css/3.5-default/logo.css | 60 + rt/share/html/NoAuth/css/3.5-default/main.css | 67 + rt/share/html/NoAuth/css/3.5-default/misc.css | 125 + rt/share/html/NoAuth/css/3.5-default/nav-left.css | 86 + rt/share/html/NoAuth/css/3.5-default/nav.css | 163 + rt/share/html/NoAuth/css/3.5-default/quickbar.css | 98 + .../html/NoAuth/css/3.5-default/ticket-search.css | 86 + rt/share/html/NoAuth/css/3.5-default/ticket.css | 57 + rt/share/html/NoAuth/css/3.5-default/titlebox.css | 162 + .../html/NoAuth/css/3.5-default/transactions.css | 146 + rt/share/html/NoAuth/css/autohandler | 59 + rt/share/html/NoAuth/css/dhandler | 77 + rt/share/html/NoAuth/css/print.css | 94 + rt/share/html/NoAuth/css/web2/InHeader | 54 + rt/share/html/NoAuth/css/web2/admin.css | 60 + rt/share/html/NoAuth/css/web2/base.css | 70 + rt/share/html/NoAuth/css/web2/boxes.css | 192 + rt/share/html/NoAuth/css/web2/forms.css | 242 ++ rt/share/html/NoAuth/css/web2/images/dhandler | 8 + .../css/web2/images/source/background-gradient.png | Bin 0 -> 394 bytes rt/share/html/NoAuth/css/web2/layout.css | 234 ++ rt/share/html/NoAuth/css/web2/login.css | 82 + rt/share/html/NoAuth/css/web2/main.css | 68 + rt/share/html/NoAuth/css/web2/misc.css | 108 + rt/share/html/NoAuth/css/web2/msie.css | 239 ++ rt/share/html/NoAuth/css/web2/msie6.css | 88 + rt/share/html/NoAuth/css/web2/nav.css | 203 + rt/share/html/NoAuth/css/web2/portlets.css | 65 + rt/share/html/NoAuth/css/web2/ticket-lists.css | 172 + rt/share/html/NoAuth/css/web2/ticket-search.css | 199 + rt/share/html/NoAuth/css/web2/ticket.css | 230 ++ rt/share/html/NoAuth/css/web2/tools.css | 56 + rt/share/html/NoAuth/css/web2/yui-fonts.css | 7 + rt/share/html/NoAuth/iCal/dhandler | 122 + rt/share/html/NoAuth/images/autohandler | 7 + rt/share/html/NoAuth/images/bplogo.gif | Bin 0 -> 755 bytes rt/share/html/NoAuth/images/css/cb-light.gif | Bin 0 -> 186 bytes rt/share/html/NoAuth/images/css/cb.gif | Bin 0 -> 163 bytes rt/share/html/NoAuth/images/css/cbr-b2g.gif | Bin 0 -> 135 bytes rt/share/html/NoAuth/images/css/cbr-b2lb.gif | Bin 0 -> 137 bytes rt/share/html/NoAuth/images/css/cbr-gray.gif | Bin 0 -> 137 bytes rt/share/html/NoAuth/images/css/cbr-trans.gif | Bin 0 -> 183 bytes rt/share/html/NoAuth/images/css/cbr.gif | Bin 0 -> 188 bytes rt/share/html/NoAuth/images/css/ct-light.gif | Bin 0 -> 162 bytes rt/share/html/NoAuth/images/css/ct.gif | Bin 0 -> 162 bytes rt/share/html/NoAuth/images/css/ctr-b2g.gif | Bin 0 -> 136 bytes rt/share/html/NoAuth/images/css/ctr-b2lb.gif | Bin 0 -> 114 bytes rt/share/html/NoAuth/images/css/ctr-gray.gif | Bin 0 -> 138 bytes rt/share/html/NoAuth/images/css/ctr-trans.gif | Bin 0 -> 182 bytes rt/share/html/NoAuth/images/css/ctr.gif | Bin 0 -> 188 bytes rt/share/html/NoAuth/images/css/dark-arrow-up.png | Bin 0 -> 346 bytes rt/share/html/NoAuth/images/css/dark-arrow.png | Bin 0 -> 337 bytes .../NoAuth/images/css/fieldbg-autocomplete.gif | Bin 0 -> 1164 bytes rt/share/html/NoAuth/images/css/light-arrow-up.png | Bin 0 -> 348 bytes rt/share/html/NoAuth/images/css/light-arrow.png | Bin 0 -> 340 bytes rt/share/html/NoAuth/images/css/rolldown-arrow.gif | Bin 0 -> 83 bytes rt/share/html/NoAuth/images/css/rolldown-arrow.png | Bin 0 -> 259 bytes rt/share/html/NoAuth/images/css/rollup-arrow.gif | Bin 0 -> 82 bytes rt/share/html/NoAuth/images/empty_star.gif | Bin 0 -> 914 bytes rt/share/html/NoAuth/images/favicon.png | Bin 0 -> 335 bytes rt/share/html/NoAuth/images/star.gif | Bin 0 -> 161 bytes rt/share/html/NoAuth/images/test.png | 2 + rt/share/html/NoAuth/js/IE7/IE7.js | 2 + rt/share/html/NoAuth/js/IE7/IE8.js | 2 + rt/share/html/NoAuth/js/IE7/blank.gif | Bin 0 -> 48 bytes rt/share/html/NoAuth/js/IE7/ie7-recalc.js | 2 + rt/share/html/NoAuth/js/IE7/ie7-squish.js | 36 + rt/share/html/NoAuth/js/ahah.js | 48 + rt/share/html/NoAuth/js/autohandler | 61 + rt/share/html/NoAuth/js/cascaded.js | 102 + rt/share/html/NoAuth/js/class.js | 15 + rt/share/html/NoAuth/js/combobox.js | 262 ++ rt/share/html/NoAuth/js/list.js | 112 + rt/share/html/NoAuth/js/prototype/prototype.js | 4320 ++++++++++++++++++++ rt/share/html/NoAuth/js/scriptaculous/controls.js | 971 +++++ rt/share/html/NoAuth/js/scriptaculous/effects.js | 1130 +++++ .../html/NoAuth/js/scriptaculous/scriptaculous.js | 60 + rt/share/html/NoAuth/js/titlebox-state.js | 83 + rt/share/html/NoAuth/js/util.js | 317 ++ rt/share/html/Prefs/Elements/Tabs | 76 + rt/share/html/Prefs/MyRT.html | 157 + rt/share/html/Prefs/Other.html | 111 + rt/share/html/Prefs/Quicksearch.html | 97 + rt/share/html/Prefs/Search.html | 111 + rt/share/html/Prefs/SearchOptions.html | 111 + rt/share/html/REST/1.0/Forms/attachment/default | 102 + rt/share/html/REST/1.0/Forms/group/customfields | 96 + rt/share/html/REST/1.0/Forms/group/default | 203 + rt/share/html/REST/1.0/Forms/group/ns | 62 + rt/share/html/REST/1.0/Forms/queue/customfields | 96 + rt/share/html/REST/1.0/Forms/queue/default | 186 + rt/share/html/REST/1.0/Forms/queue/ns | 62 + .../html/REST/1.0/Forms/queue/ticketcustomfields | 97 + rt/share/html/REST/1.0/Forms/ticket/attachments | 135 + rt/share/html/REST/1.0/Forms/ticket/comment | 152 + rt/share/html/REST/1.0/Forms/ticket/default | 447 ++ rt/share/html/REST/1.0/Forms/ticket/history | 205 + rt/share/html/REST/1.0/Forms/ticket/links | 172 + rt/share/html/REST/1.0/Forms/ticket/merge | 96 + rt/share/html/REST/1.0/Forms/ticket/take | 135 + rt/share/html/REST/1.0/Forms/transaction/default | 143 + rt/share/html/REST/1.0/Forms/user/default | 188 + rt/share/html/REST/1.0/Forms/user/ns | 65 + rt/share/html/REST/1.0/NoAuth/mail-gateway | 84 + rt/share/html/REST/1.0/autohandler | 56 + rt/share/html/REST/1.0/dhandler | 326 ++ rt/share/html/REST/1.0/logout | 51 + rt/share/html/REST/1.0/search/dhandler | 56 + rt/share/html/REST/1.0/search/ticket | 159 + rt/share/html/REST/1.0/ticket/comment | 177 + rt/share/html/REST/1.0/ticket/link | 123 + rt/share/html/REST/1.0/ticket/merge | 102 + rt/share/html/Search/Build.html | 323 ++ rt/share/html/Search/Bulk.html | 446 ++ rt/share/html/Search/Chart | 186 + rt/share/html/Search/Chart.html | 98 + rt/share/html/Search/Edit.html | 99 + rt/share/html/Search/Elements/BuildFormatString | 250 ++ rt/share/html/Search/Elements/Chart | 147 + rt/share/html/Search/Elements/ConditionRow | 97 + rt/share/html/Search/Elements/DisplayOptions | 134 + rt/share/html/Search/Elements/EditFormat | 113 + rt/share/html/Search/Elements/EditQuery | 243 ++ rt/share/html/Search/Elements/EditSearches | 296 ++ rt/share/html/Search/Elements/Graph | 50 + rt/share/html/Search/Elements/NewListActions | 66 + rt/share/html/Search/Elements/PickBasics | 214 + rt/share/html/Search/Elements/PickCFs | 104 + rt/share/html/Search/Elements/PickCriteria | 72 + rt/share/html/Search/Elements/ResultViews | 80 + rt/share/html/Search/Elements/SearchPrivacy | 55 + rt/share/html/Search/Elements/SearchesForObject | 65 + rt/share/html/Search/Elements/SelectAndOr | 53 + rt/share/html/Search/Elements/SelectChartType | 58 + rt/share/html/Search/Elements/SelectGroup | 67 + rt/share/html/Search/Elements/SelectGroupBy | 63 + rt/share/html/Search/Elements/SelectLinks | 66 + rt/share/html/Search/Elements/SelectPersonType | 84 + rt/share/html/Search/Elements/SelectSearchObject | 68 + .../html/Search/Elements/SelectSearchesForObjects | 69 + rt/share/html/Search/Graph.html | 50 + rt/share/html/Search/Results.html | 201 + rt/share/html/Search/Results.rdf | 103 + rt/share/html/Search/Results.tsv | 162 + rt/share/html/Search/Simple.html | 106 + rt/share/html/SelfService/Attachment/dhandler | 51 + rt/share/html/SelfService/Closed.html | 60 + rt/share/html/SelfService/Create.html | 149 + rt/share/html/SelfService/CreateTicketInQueue.html | 63 + rt/share/html/SelfService/Display.html | 233 ++ rt/share/html/SelfService/Elements/GotoTicket | 50 + rt/share/html/SelfService/Elements/Header | 49 + rt/share/html/SelfService/Elements/MyRequests | 87 + rt/share/html/SelfService/Elements/Tabs | 113 + rt/share/html/SelfService/Error.html | 71 + rt/share/html/SelfService/Prefs.html | 92 + rt/share/html/SelfService/Update.html | 133 + rt/share/html/SelfService/index.html | 57 + .../html/Ticket/Attachment/WithHeaders/dhandler | 80 + rt/share/html/Ticket/Attachment/dhandler | 93 + rt/share/html/Ticket/Create.html | 430 ++ rt/share/html/Ticket/Display.html | 207 + rt/share/html/Ticket/Elements/AddWatchers | 140 + rt/share/html/Ticket/Elements/Bookmark | 93 + rt/share/html/Ticket/Elements/BulkLinks | 195 + rt/share/html/Ticket/Elements/EditBasics | 130 + rt/share/html/Ticket/Elements/EditCustomFields | 108 + rt/share/html/Ticket/Elements/EditDates | 77 + rt/share/html/Ticket/Elements/EditPeople | 93 + .../Ticket/Elements/EditTransactionCustomFields | 81 + rt/share/html/Ticket/Elements/EditWatchers | 79 + rt/share/html/Ticket/Elements/FindAttachments | 95 + rt/share/html/Ticket/Elements/LoadTextAttachments | 93 + rt/share/html/Ticket/Elements/PreviewScrips | 235 ++ rt/share/html/Ticket/Elements/Reminders | 178 + rt/share/html/Ticket/Elements/ShowAttachments | 104 + rt/share/html/Ticket/Elements/ShowBasics | 87 + rt/share/html/Ticket/Elements/ShowCustomFields | 51 + rt/share/html/Ticket/Elements/ShowDates | 91 + rt/share/html/Ticket/Elements/ShowDependencies | 65 + rt/share/html/Ticket/Elements/ShowGnuPGStatus | 177 + rt/share/html/Ticket/Elements/ShowGroupMembers | 65 + rt/share/html/Ticket/Elements/ShowHistory | 171 + rt/share/html/Ticket/Elements/ShowMembers | 69 + rt/share/html/Ticket/Elements/ShowMessageHeaders | 91 + rt/share/html/Ticket/Elements/ShowMessageStanza | 110 + rt/share/html/Ticket/Elements/ShowParents | 63 + rt/share/html/Ticket/Elements/ShowPeople | 72 + rt/share/html/Ticket/Elements/ShowPriority | 51 + rt/share/html/Ticket/Elements/ShowQueue | 56 + rt/share/html/Ticket/Elements/ShowRequestor | 105 + rt/share/html/Ticket/Elements/ShowSummary | 117 + rt/share/html/Ticket/Elements/ShowTime | 59 + rt/share/html/Ticket/Elements/ShowTransaction | 216 + .../Ticket/Elements/ShowTransactionAttachments | 252 ++ rt/share/html/Ticket/Elements/ShowUpdateStatus | 64 + rt/share/html/Ticket/Elements/ShowUserEntry | 56 + rt/share/html/Ticket/Elements/Tabs | 341 ++ rt/share/html/Ticket/Elements/UpdateCc | 80 + rt/share/html/Ticket/Forward.html | 123 + rt/share/html/Ticket/GnuPG.html | 104 + .../Ticket/Graphs/Elements/EditGraphProperties | 167 + rt/share/html/Ticket/Graphs/Elements/ShowGraph | 71 + rt/share/html/Ticket/Graphs/Elements/ShowLegends | 73 + rt/share/html/Ticket/Graphs/dhandler | 80 + rt/share/html/Ticket/Graphs/index.html | 114 + rt/share/html/Ticket/History.html | 91 + rt/share/html/Ticket/Modify.html | 95 + rt/share/html/Ticket/ModifyAll.html | 255 ++ rt/share/html/Ticket/ModifyDates.html | 79 + rt/share/html/Ticket/ModifyLinks.html | 85 + rt/share/html/Ticket/ModifyPeople.html | 94 + rt/share/html/Ticket/Reminders.html | 74 + rt/share/html/Ticket/ShowEmailRecord.html | 96 + rt/share/html/Ticket/Update.html | 269 ++ rt/share/html/Tools/Elements/Tabs | 90 + rt/share/html/Tools/MyDay.html | 114 + rt/share/html/Tools/Offline.html | 168 + rt/share/html/Tools/Reports/CreatedByDates.html | 94 + rt/share/html/Tools/Reports/Elements/Tabs | 89 + rt/share/html/Tools/Reports/ResolvedByDates.html | 95 + rt/share/html/Tools/Reports/ResolvedByOwner.html | 70 + rt/share/html/Tools/Reports/index.html | 76 + rt/share/html/Tools/index.html | 81 + rt/share/html/User/Delegation.html | 107 + rt/share/html/User/Elements/DelegateRights | 110 + rt/share/html/User/Elements/GroupTabs | 84 + rt/share/html/User/Elements/Tabs | 95 + rt/share/html/User/Groups/Members.html | 160 + rt/share/html/User/Groups/Modify.html | 157 + rt/share/html/User/Groups/index.html | 67 + rt/share/html/User/Prefs.html | 314 ++ rt/share/html/Widgets/BulkEdit | 67 + rt/share/html/Widgets/BulkProcess | 73 + rt/share/html/Widgets/ComboBox | 77 + rt/share/html/Widgets/FinalizeWidgetArguments | 64 + rt/share/html/Widgets/Form/Boolean | 103 + rt/share/html/Widgets/Form/Integer | 99 + rt/share/html/Widgets/Form/Select | 165 + rt/share/html/Widgets/Form/String | 108 + rt/share/html/Widgets/SavedSearch | 189 + rt/share/html/Widgets/SelectionBox | 254 ++ rt/share/html/Widgets/TitleBox | 54 + rt/share/html/Widgets/TitleBoxEnd | 59 + rt/share/html/Widgets/TitleBoxStart | 97 + rt/share/html/autohandler | 61 + rt/share/html/dhandler | 54 + rt/share/html/index.html | 143 + rt/share/html/l | 52 + 872 files changed, 130728 insertions(+) create mode 100644 rt/share/html/Admin/CustomFields/GroupRights.html create mode 100644 rt/share/html/Admin/CustomFields/Modify.html create mode 100644 rt/share/html/Admin/CustomFields/Objects.html create mode 100644 rt/share/html/Admin/CustomFields/UserRights.html create mode 100644 rt/share/html/Admin/CustomFields/index.html create mode 100755 rt/share/html/Admin/Elements/AddCustomFieldValue create mode 100644 rt/share/html/Admin/Elements/ConfigureMyRT create mode 100755 rt/share/html/Admin/Elements/CreateUserCalled create mode 100644 rt/share/html/Admin/Elements/CustomFieldTabs create mode 100755 rt/share/html/Admin/Elements/EditCustomField create mode 100755 rt/share/html/Admin/Elements/EditCustomFieldValues create mode 100644 rt/share/html/Admin/Elements/EditCustomFieldValuesSource create mode 100755 rt/share/html/Admin/Elements/EditCustomFields create mode 100755 rt/share/html/Admin/Elements/EditQueueWatchers create mode 100755 rt/share/html/Admin/Elements/EditScrip create mode 100755 rt/share/html/Admin/Elements/EditScrips create mode 100755 rt/share/html/Admin/Elements/EditTemplates create mode 100755 rt/share/html/Admin/Elements/EditUserComments create mode 100755 rt/share/html/Admin/Elements/GlobalCustomFieldTabs create mode 100755 rt/share/html/Admin/Elements/GroupTabs create mode 100755 rt/share/html/Admin/Elements/Header create mode 100755 rt/share/html/Admin/Elements/ListGlobalCustomFields create mode 100755 rt/share/html/Admin/Elements/ListGlobalScrips create mode 100755 rt/share/html/Admin/Elements/ModifyTemplate create mode 100644 rt/share/html/Admin/Elements/ObjectCustomFields create mode 100644 rt/share/html/Admin/Elements/PickCustomFields create mode 100644 rt/share/html/Admin/Elements/PickObjects create mode 100755 rt/share/html/Admin/Elements/QueueRightsForUser create mode 100755 rt/share/html/Admin/Elements/QueueTabs create mode 100644 rt/share/html/Admin/Elements/SelectCustomField create mode 100644 rt/share/html/Admin/Elements/SelectCustomFieldLookupType create mode 100755 rt/share/html/Admin/Elements/SelectCustomFieldType create mode 100755 rt/share/html/Admin/Elements/SelectGroups create mode 100755 rt/share/html/Admin/Elements/SelectModifyGroup create mode 100755 rt/share/html/Admin/Elements/SelectModifyQueue create mode 100755 rt/share/html/Admin/Elements/SelectModifyUser create mode 100755 rt/share/html/Admin/Elements/SelectNewGroupMembers create mode 100755 rt/share/html/Admin/Elements/SelectRights create mode 100755 rt/share/html/Admin/Elements/SelectScrip create mode 100755 rt/share/html/Admin/Elements/SelectScripAction create mode 100755 rt/share/html/Admin/Elements/SelectScripCondition create mode 100755 rt/share/html/Admin/Elements/SelectSingleOrMultiple create mode 100644 rt/share/html/Admin/Elements/SelectStage create mode 100755 rt/share/html/Admin/Elements/SelectTemplate create mode 100755 rt/share/html/Admin/Elements/SelectUsers create mode 100644 rt/share/html/Admin/Elements/ShowKeyInfo create mode 100755 rt/share/html/Admin/Elements/SystemTabs create mode 100755 rt/share/html/Admin/Elements/Tabs create mode 100755 rt/share/html/Admin/Elements/ToolTabs create mode 100755 rt/share/html/Admin/Elements/UserTabs create mode 100644 rt/share/html/Admin/Global/CustomFields/Groups.html create mode 100755 rt/share/html/Admin/Global/CustomFields/Queue-Tickets.html create mode 100755 rt/share/html/Admin/Global/CustomFields/Queue-Transactions.html create mode 100644 rt/share/html/Admin/Global/CustomFields/Queues.html create mode 100644 rt/share/html/Admin/Global/CustomFields/Users.html create mode 100644 rt/share/html/Admin/Global/CustomFields/index.html create mode 100755 rt/share/html/Admin/Global/GroupRights.html create mode 100644 rt/share/html/Admin/Global/MyRT.html create mode 100755 rt/share/html/Admin/Global/Scrip.html create mode 100755 rt/share/html/Admin/Global/Scrips.html create mode 100755 rt/share/html/Admin/Global/Template.html create mode 100755 rt/share/html/Admin/Global/Templates.html create mode 100755 rt/share/html/Admin/Global/UserRights.html create mode 100755 rt/share/html/Admin/Global/index.html create mode 100644 rt/share/html/Admin/Groups/CustomFields.html create mode 100755 rt/share/html/Admin/Groups/GroupRights.html create mode 100644 rt/share/html/Admin/Groups/History.html create mode 100755 rt/share/html/Admin/Groups/Members.html create mode 100755 rt/share/html/Admin/Groups/Modify.html create mode 100755 rt/share/html/Admin/Groups/UserRights.html create mode 100755 rt/share/html/Admin/Groups/index.html create mode 100755 rt/share/html/Admin/Queues/CustomField.html create mode 100755 rt/share/html/Admin/Queues/CustomFields.html create mode 100755 rt/share/html/Admin/Queues/GroupRights.html create mode 100644 rt/share/html/Admin/Queues/History.html create mode 100755 rt/share/html/Admin/Queues/Modify.html create mode 100755 rt/share/html/Admin/Queues/People.html create mode 100755 rt/share/html/Admin/Queues/Scrip.html create mode 100755 rt/share/html/Admin/Queues/Scrips.html create mode 100755 rt/share/html/Admin/Queues/Template.html create mode 100755 rt/share/html/Admin/Queues/Templates.html create mode 100755 rt/share/html/Admin/Queues/UserRights.html create mode 100755 rt/share/html/Admin/Queues/index.html create mode 100644 rt/share/html/Admin/Tools/Configuration.html create mode 100644 rt/share/html/Admin/Tools/Shredder/Dumps/dhandler create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/DumpFileLink create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/Error/NoRights create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--User create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/ObjectCheckBox create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/PluginArguments create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/SelectObjects create mode 100644 rt/share/html/Admin/Tools/Shredder/Elements/SelectPlugin create mode 100644 rt/share/html/Admin/Tools/Shredder/autohandler create mode 100644 rt/share/html/Admin/Tools/Shredder/index.html create mode 100644 rt/share/html/Admin/Tools/index.html create mode 100644 rt/share/html/Admin/Users/CustomFields.html create mode 100644 rt/share/html/Admin/Users/GnuPG.html create mode 100644 rt/share/html/Admin/Users/History.html create mode 100644 rt/share/html/Admin/Users/Memberships.html create mode 100755 rt/share/html/Admin/Users/Modify.html create mode 100644 rt/share/html/Admin/Users/MyRT.html create mode 100755 rt/share/html/Admin/Users/index.html create mode 100644 rt/share/html/Admin/autohandler create mode 100755 rt/share/html/Admin/index.html create mode 100755 rt/share/html/Approvals/Display.html create mode 100755 rt/share/html/Approvals/Elements/Approve create mode 100755 rt/share/html/Approvals/Elements/PendingMyApproval create mode 100755 rt/share/html/Approvals/Elements/ShowDependency create mode 100755 rt/share/html/Approvals/Elements/Tabs create mode 100644 rt/share/html/Approvals/autohandler create mode 100755 rt/share/html/Approvals/index.html create mode 100644 rt/share/html/Dashboards/Elements/DashboardsForObject create mode 100644 rt/share/html/Dashboards/Elements/DashboardsForObjects create mode 100644 rt/share/html/Dashboards/Elements/Deleted create mode 100644 rt/share/html/Dashboards/Elements/HiddenSearches create mode 100644 rt/share/html/Dashboards/Elements/ListOfDashboards create mode 100644 rt/share/html/Dashboards/Elements/SelectPrivacy create mode 100644 rt/share/html/Dashboards/Elements/ShowDashboards create mode 100644 rt/share/html/Dashboards/Elements/ShowPortlet/component create mode 100644 rt/share/html/Dashboards/Elements/ShowPortlet/dashboard create mode 100644 rt/share/html/Dashboards/Elements/ShowPortlet/search create mode 100644 rt/share/html/Dashboards/Elements/ShowSubscription create mode 100755 rt/share/html/Dashboards/Elements/Tabs create mode 100755 rt/share/html/Dashboards/Modify.html create mode 100644 rt/share/html/Dashboards/Queries.html create mode 100644 rt/share/html/Dashboards/Render.html create mode 100644 rt/share/html/Dashboards/Subscription.html create mode 100644 rt/share/html/Dashboards/dhandler create mode 100644 rt/share/html/Dashboards/index.html create mode 100644 rt/share/html/Download/CustomFieldValue/dhandler create mode 100644 rt/share/html/Download/Tabular/dhandler create mode 100755 rt/share/html/Elements/BevelBoxRaisedEnd create mode 100755 rt/share/html/Elements/BevelBoxRaisedStart create mode 100755 rt/share/html/Elements/Callback create mode 100755 rt/share/html/Elements/Checkbox create mode 100644 rt/share/html/Elements/CollectionAsTable/Header create mode 100644 rt/share/html/Elements/CollectionAsTable/ParseFormat create mode 100644 rt/share/html/Elements/CollectionAsTable/Row create mode 100644 rt/share/html/Elements/CollectionList create mode 100644 rt/share/html/Elements/CollectionListPaging create mode 100644 rt/share/html/Elements/ColumnMap create mode 100755 rt/share/html/Elements/CreateTicket create mode 100644 rt/share/html/Elements/DashboardTabs create mode 100644 rt/share/html/Elements/Dashboards create mode 100644 rt/share/html/Elements/EditCustomField create mode 100644 rt/share/html/Elements/EditCustomFieldAutocomplete create mode 100644 rt/share/html/Elements/EditCustomFieldBinary create mode 100644 rt/share/html/Elements/EditCustomFieldCombobox create mode 100644 rt/share/html/Elements/EditCustomFieldFreeform create mode 100644 rt/share/html/Elements/EditCustomFieldImage create mode 100644 rt/share/html/Elements/EditCustomFieldSelect create mode 100644 rt/share/html/Elements/EditCustomFieldText create mode 100644 rt/share/html/Elements/EditCustomFieldWikitext create mode 100755 rt/share/html/Elements/EditLinks create mode 100644 rt/share/html/Elements/EditTimeValue create mode 100644 rt/share/html/Elements/EmailInput create mode 100755 rt/share/html/Elements/Error create mode 100755 rt/share/html/Elements/Footer create mode 100644 rt/share/html/Elements/GnuPG/KeyIssues create mode 100644 rt/share/html/Elements/GnuPG/SelectKeyForEncryption create mode 100644 rt/share/html/Elements/GnuPG/SelectKeyForSigning create mode 100644 rt/share/html/Elements/GnuPG/SignEncryptWidget create mode 100755 rt/share/html/Elements/GotoTicket create mode 100755 rt/share/html/Elements/Header create mode 100644 rt/share/html/Elements/HeaderJavascript create mode 100755 rt/share/html/Elements/ListActions create mode 100644 rt/share/html/Elements/ListMenu create mode 100755 rt/share/html/Elements/Login create mode 100644 rt/share/html/Elements/Logo create mode 100644 rt/share/html/Elements/Logout create mode 100644 rt/share/html/Elements/MakeClicky create mode 100755 rt/share/html/Elements/Menu create mode 100755 rt/share/html/Elements/MessageBox create mode 100644 rt/share/html/Elements/MyAdminQueues create mode 100644 rt/share/html/Elements/MyRT create mode 100755 rt/share/html/Elements/MyReminders create mode 100755 rt/share/html/Elements/MyRequests create mode 100644 rt/share/html/Elements/MySupportQueues create mode 100755 rt/share/html/Elements/MyTickets create mode 100755 rt/share/html/Elements/PageLayout create mode 100644 rt/share/html/Elements/PersonalQuickbar create mode 100644 rt/share/html/Elements/QueryString create mode 100644 rt/share/html/Elements/QueueSummary create mode 100644 rt/share/html/Elements/QuickCreate create mode 100755 rt/share/html/Elements/Quicksearch create mode 100644 rt/share/html/Elements/RT__Group/ColumnMap create mode 100644 rt/share/html/Elements/RT__Queue/ColumnMap create mode 100644 rt/share/html/Elements/RT__Scrip/ColumnMap create mode 100644 rt/share/html/Elements/RT__Template/ColumnMap create mode 100644 rt/share/html/Elements/RT__Ticket/ColumnMap create mode 100644 rt/share/html/Elements/RT__User/ColumnMap create mode 100755 rt/share/html/Elements/Refresh create mode 100644 rt/share/html/Elements/RefreshHomepage create mode 100644 rt/share/html/Elements/ScrubHTML create mode 100755 rt/share/html/Elements/Section create mode 100755 rt/share/html/Elements/SelectAttachmentField create mode 100755 rt/share/html/Elements/SelectBoolean create mode 100755 rt/share/html/Elements/SelectCustomFieldOperator create mode 100755 rt/share/html/Elements/SelectCustomFieldValue create mode 100755 rt/share/html/Elements/SelectDate create mode 100755 rt/share/html/Elements/SelectDateRelation create mode 100755 rt/share/html/Elements/SelectDateType create mode 100755 rt/share/html/Elements/SelectEqualityOperator create mode 100755 rt/share/html/Elements/SelectGroups create mode 100755 rt/share/html/Elements/SelectLang create mode 100755 rt/share/html/Elements/SelectLinkType create mode 100755 rt/share/html/Elements/SelectMatch create mode 100755 rt/share/html/Elements/SelectNewTicketQueue create mode 100755 rt/share/html/Elements/SelectOwner create mode 100644 rt/share/html/Elements/SelectPriority create mode 100755 rt/share/html/Elements/SelectQueue create mode 100755 rt/share/html/Elements/SelectResultsPerPage create mode 100755 rt/share/html/Elements/SelectSortOrder create mode 100755 rt/share/html/Elements/SelectStatus create mode 100755 rt/share/html/Elements/SelectTicketSortBy create mode 100755 rt/share/html/Elements/SelectTicketTypes create mode 100755 rt/share/html/Elements/SelectTimeUnits create mode 100644 rt/share/html/Elements/SelectTimezone create mode 100755 rt/share/html/Elements/SelectUsers create mode 100755 rt/share/html/Elements/SelectWatcherType create mode 100755 rt/share/html/Elements/SetupSessionCookie create mode 100644 rt/share/html/Elements/ShowCustomFieldBinary create mode 100644 rt/share/html/Elements/ShowCustomFieldImage create mode 100644 rt/share/html/Elements/ShowCustomFieldText create mode 100644 rt/share/html/Elements/ShowCustomFieldWikitext create mode 100644 rt/share/html/Elements/ShowCustomFields create mode 100644 rt/share/html/Elements/ShowLink create mode 100755 rt/share/html/Elements/ShowLinks create mode 100644 rt/share/html/Elements/ShowMemberships create mode 100644 rt/share/html/Elements/ShowSearch create mode 100644 rt/share/html/Elements/ShowUser create mode 100644 rt/share/html/Elements/ShowUserConcise create mode 100644 rt/share/html/Elements/ShowUserEmailFrequency create mode 100644 rt/share/html/Elements/ShowUserVerbose create mode 100755 rt/share/html/Elements/SimpleSearch create mode 100755 rt/share/html/Elements/Submit create mode 100755 rt/share/html/Elements/Tabs create mode 100644 rt/share/html/Elements/TicketList create mode 100644 rt/share/html/Elements/TitleBox create mode 100644 rt/share/html/Elements/TitleBoxEnd create mode 100644 rt/share/html/Elements/TitleBoxStart create mode 100644 rt/share/html/Elements/ValidateCustomFields create mode 100644 rt/share/html/Helpers/Autocomplete/CustomFieldValues create mode 100644 rt/share/html/Helpers/CalPopup.html create mode 100644 rt/share/html/Helpers/Toggle/TicketBookmark create mode 100644 rt/share/html/Install/Basics.html create mode 100644 rt/share/html/Install/DatabaseDetails.html create mode 100644 rt/share/html/Install/DatabaseType.html create mode 100644 rt/share/html/Install/Elements/Errors create mode 100644 rt/share/html/Install/Elements/Wrapper create mode 100644 rt/share/html/Install/Finish.html create mode 100644 rt/share/html/Install/Global.html create mode 100644 rt/share/html/Install/Initialize.html create mode 100644 rt/share/html/Install/Sendmail.html create mode 100644 rt/share/html/Install/autohandler create mode 100644 rt/share/html/Install/index.html create mode 100755 rt/share/html/NoAuth/Logout.html create mode 100755 rt/share/html/NoAuth/Reminder.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckcontextmenu.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdataprocessor.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdocumentfragment_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdocumentfragment_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdomrange.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdomrange_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdomrange_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdomrangeiterator.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckeditingarea.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckelementpath.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckenterkey.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckevents.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckhtmliterator.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckicon.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckiecleanup.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckimagepreloader.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckkeystrokehandler.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckmenublock.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckmenublockpanel.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckmenuitem.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckpanel.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckplugin.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckspecialcombo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckstyle.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbar.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarbreak_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarbreak_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarbutton.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarbuttonui.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarfontformatcombo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarfontscombo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarfontsizecombo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarpanelbutton.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarspecialcombo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fcktoolbarstylecombo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckw3crange.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckxml.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckxml_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckxml_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fck_othercommands.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckblockquotecommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckcorestylecommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckfitwindow.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckindentcommands.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckjustifycommands.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fcklistcommands.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fcknamedcommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckpastewordcommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckremoveformatcommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckshowblocks.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fckstylecommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fcktablecommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/commandclasses/fcktextcolorcommand.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/fckconstants.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/fckeditorapi.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/fckjscoreextensions.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/fckscriptloader.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fck.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fck_contextmenu.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fck_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fck_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckbrowserinfo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckcodeformatter.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckcommands.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckconfig.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckdebug.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckdebug_empty.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckdialog.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckdocumentprocessor.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckdomtools.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcklanguagemanager.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcklisthandler.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcklistslib.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckplugins.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckregexlib.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckselection.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckselection_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckselection_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckstyles.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcktablehandler.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcktablehandler_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcktablehandler_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcktoolbaritems.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcktoolbarset.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcktools.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcktools_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fcktools_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckundo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckurlparams.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckxhtml.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckxhtml_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckxhtml_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/internals/fckxhtmlentities.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/behaviors/disablehandles.htc create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/behaviors/showtableborders.htc create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/fck_editorarea.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/fck_internal.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/fck_showtableborders_gecko.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_address.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_blockquote.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_div.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_h1.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_h2.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_h3.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_h4.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_h5.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_h6.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_p.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/block_pre.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/fck_anchor.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/fck_flashlogo.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/fck_hiddenfield.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/fck_pagebreak.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/css/images/fck_plugin.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/common/fck_dialog_common.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/common/fck_dialog_common.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/common/images/locked.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/common/images/reset.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/common/images/unlocked.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_about.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_about/logo_fckeditor.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_about/logo_fredck.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_anchor.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_button.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_checkbox.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_colorselector.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_div.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_docprops.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_docprops/fck_document_preview.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_flash.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_flash/fck_flash.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_flash/fck_flash_preview.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_form.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_hiddenfield.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_image.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_image/fck_image.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_image/fck_image_preview.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_link.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_link/fck_link.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_listprop.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_paste.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_radiobutton.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_replace.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_select.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_select/fck_select.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_smiley.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_source.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_specialchar.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_table.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_tablecell.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_template.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_template/images/template1.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_template/images/template2.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_template/images/template3.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_textarea.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_textfield.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dtd/fck_dtd_test.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dtd/fck_xhtml10strict.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/dtd/fck_xhtml10transitional.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/fckdebug.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/fckdialog.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/fckeditor.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/fckeditor.original.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/anchor.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/arrow_ltr.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/arrow_rtl.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/angel_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/angry_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/broken_heart.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/cake.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/confused_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/cry_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/devil_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/embaressed_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/envelope.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/heart.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/kiss.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/lightbulb.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/omg_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/regular_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/sad_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/shades_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/teeth_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/thumbs_down.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/thumbs_up.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/tounge_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/smiley/msn/wink_smile.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/images/spacer.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/js/fckadobeair.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/js/fckeditorcode_gecko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/js/fckeditorcode_ie.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/_translationstatus.txt create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/af.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/ar.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/bg.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/bn.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/bs.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/ca.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/cs.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/da.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/de.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/el.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/en-au.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/en-ca.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/en-uk.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/en.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/eo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/es.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/et.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/eu.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/fa.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/fi.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/fo.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/fr-ca.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/fr.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/gl.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/gu.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/he.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/hi.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/hr.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/hu.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/is.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/it.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/ja.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/km.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/ko.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/lt.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/lv.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/mn.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/ms.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/nb.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/nl.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/no.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/pl.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/pt-br.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/pt.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/ro.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/ru.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/sk.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/sl.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/sr-latn.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/sr.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/sv.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/th.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/tr.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/uk.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/vi.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/zh-cn.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/lang/zh.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/autogrow/fckplugin.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/bbcode/_sample/sample.config.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/bbcode/_sample/sample.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/bbcode/fckplugin.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/dragresizetable/fckplugin.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/fck_placeholder.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/fckplugin.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/lang/de.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/lang/en.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/lang/es.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/lang/fr.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/lang/it.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/lang/pl.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/placeholder.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/simplecommands/fckplugin.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/tablecommands/fckplugin.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/_fckviewstrips.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/fck_dialog.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/fck_dialog_ie6.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/fck_editor.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/fck_strip.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/dialog.sides.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/dialog.sides.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/dialog.sides.rtl.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/sprites.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/sprites.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/toolbar.arrowright.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/toolbar.buttonarrow.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/toolbar.collapse.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/toolbar.end.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/toolbar.expand.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/toolbar.separator.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/default/images/toolbar.start.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/fck_dialog.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/fck_dialog_ie6.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/fck_editor.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/fck_strip.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/dialog.sides.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/dialog.sides.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/dialog.sides.rtl.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/sprites.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/sprites.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/toolbar.arrowright.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/toolbar.bg.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/toolbar.collapse.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/toolbar.end.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/toolbar.expand.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/toolbar.separator.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/office2003/images/toolbar.start.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/fck_dialog.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/fck_dialog_ie6.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/fck_editor.css create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/fck_strip.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/dialog.sides.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/dialog.sides.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/dialog.sides.rtl.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/sprites.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/sprites.png create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/toolbar.arrowright.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/toolbar.buttonarrow.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/toolbar.buttonbg.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/toolbar.collapse.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/toolbar.end.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/toolbar.expand.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/toolbar.separator.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/skins/silver/images/toolbar.start.gif create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/wsc/ciframe.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/wsc/tmpFrameset.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/editor/wsc/w.html create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/fckconfig.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/fckeditor.js create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/fckpackager.xml create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/fckstyles.xml create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/fcktemplates.xml create mode 100644 rt/share/html/NoAuth/RichText/FCKeditor/license.txt create mode 100644 rt/share/html/NoAuth/RichText/dhandler create mode 100644 rt/share/html/NoAuth/css/3.4-compat/body.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/footer.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/forms.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/header.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/login.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/main.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/misc.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/nav.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/quickbar.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/ticket.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/titlebox.css create mode 100644 rt/share/html/NoAuth/css/3.4-compat/transactions.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/approvals.css create mode 100755 rt/share/html/NoAuth/css/3.5-default/body.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/footer.css create mode 100755 rt/share/html/NoAuth/css/3.5-default/forms.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/header.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/local.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/login.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/logo.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/main.css create mode 100755 rt/share/html/NoAuth/css/3.5-default/misc.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/nav-left.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/nav.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/quickbar.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/ticket-search.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/ticket.css create mode 100644 rt/share/html/NoAuth/css/3.5-default/titlebox.css create mode 100755 rt/share/html/NoAuth/css/3.5-default/transactions.css create mode 100644 rt/share/html/NoAuth/css/autohandler create mode 100644 rt/share/html/NoAuth/css/dhandler create mode 100644 rt/share/html/NoAuth/css/print.css create mode 100644 rt/share/html/NoAuth/css/web2/InHeader create mode 100644 rt/share/html/NoAuth/css/web2/admin.css create mode 100644 rt/share/html/NoAuth/css/web2/base.css create mode 100644 rt/share/html/NoAuth/css/web2/boxes.css create mode 100755 rt/share/html/NoAuth/css/web2/forms.css create mode 100644 rt/share/html/NoAuth/css/web2/images/dhandler create mode 100644 rt/share/html/NoAuth/css/web2/images/source/background-gradient.png create mode 100644 rt/share/html/NoAuth/css/web2/layout.css create mode 100644 rt/share/html/NoAuth/css/web2/login.css create mode 100644 rt/share/html/NoAuth/css/web2/main.css create mode 100644 rt/share/html/NoAuth/css/web2/misc.css create mode 100644 rt/share/html/NoAuth/css/web2/msie.css create mode 100644 rt/share/html/NoAuth/css/web2/msie6.css create mode 100644 rt/share/html/NoAuth/css/web2/nav.css create mode 100644 rt/share/html/NoAuth/css/web2/portlets.css create mode 100644 rt/share/html/NoAuth/css/web2/ticket-lists.css create mode 100644 rt/share/html/NoAuth/css/web2/ticket-search.css create mode 100644 rt/share/html/NoAuth/css/web2/ticket.css create mode 100644 rt/share/html/NoAuth/css/web2/tools.css create mode 100644 rt/share/html/NoAuth/css/web2/yui-fonts.css create mode 100644 rt/share/html/NoAuth/iCal/dhandler create mode 100644 rt/share/html/NoAuth/images/autohandler create mode 100755 rt/share/html/NoAuth/images/bplogo.gif create mode 100644 rt/share/html/NoAuth/images/css/cb-light.gif create mode 100644 rt/share/html/NoAuth/images/css/cb.gif create mode 100644 rt/share/html/NoAuth/images/css/cbr-b2g.gif create mode 100644 rt/share/html/NoAuth/images/css/cbr-b2lb.gif create mode 100644 rt/share/html/NoAuth/images/css/cbr-gray.gif create mode 100644 rt/share/html/NoAuth/images/css/cbr-trans.gif create mode 100644 rt/share/html/NoAuth/images/css/cbr.gif create mode 100644 rt/share/html/NoAuth/images/css/ct-light.gif create mode 100644 rt/share/html/NoAuth/images/css/ct.gif create mode 100644 rt/share/html/NoAuth/images/css/ctr-b2g.gif create mode 100644 rt/share/html/NoAuth/images/css/ctr-b2lb.gif create mode 100644 rt/share/html/NoAuth/images/css/ctr-gray.gif create mode 100644 rt/share/html/NoAuth/images/css/ctr-trans.gif create mode 100644 rt/share/html/NoAuth/images/css/ctr.gif create mode 100644 rt/share/html/NoAuth/images/css/dark-arrow-up.png create mode 100644 rt/share/html/NoAuth/images/css/dark-arrow.png create mode 100644 rt/share/html/NoAuth/images/css/fieldbg-autocomplete.gif create mode 100644 rt/share/html/NoAuth/images/css/light-arrow-up.png create mode 100644 rt/share/html/NoAuth/images/css/light-arrow.png create mode 100644 rt/share/html/NoAuth/images/css/rolldown-arrow.gif create mode 100644 rt/share/html/NoAuth/images/css/rolldown-arrow.png create mode 100644 rt/share/html/NoAuth/images/css/rollup-arrow.gif create mode 100644 rt/share/html/NoAuth/images/empty_star.gif create mode 100755 rt/share/html/NoAuth/images/favicon.png create mode 100644 rt/share/html/NoAuth/images/star.gif create mode 100644 rt/share/html/NoAuth/images/test.png create mode 100644 rt/share/html/NoAuth/js/IE7/IE7.js create mode 100644 rt/share/html/NoAuth/js/IE7/IE8.js create mode 100644 rt/share/html/NoAuth/js/IE7/blank.gif create mode 100644 rt/share/html/NoAuth/js/IE7/ie7-recalc.js create mode 100644 rt/share/html/NoAuth/js/IE7/ie7-squish.js create mode 100644 rt/share/html/NoAuth/js/ahah.js create mode 100644 rt/share/html/NoAuth/js/autohandler create mode 100644 rt/share/html/NoAuth/js/cascaded.js create mode 100644 rt/share/html/NoAuth/js/class.js create mode 100644 rt/share/html/NoAuth/js/combobox.js create mode 100644 rt/share/html/NoAuth/js/list.js create mode 100644 rt/share/html/NoAuth/js/prototype/prototype.js create mode 100644 rt/share/html/NoAuth/js/scriptaculous/controls.js create mode 100644 rt/share/html/NoAuth/js/scriptaculous/effects.js create mode 100644 rt/share/html/NoAuth/js/scriptaculous/scriptaculous.js create mode 100644 rt/share/html/NoAuth/js/titlebox-state.js create mode 100644 rt/share/html/NoAuth/js/util.js create mode 100644 rt/share/html/Prefs/Elements/Tabs create mode 100644 rt/share/html/Prefs/MyRT.html create mode 100644 rt/share/html/Prefs/Other.html create mode 100644 rt/share/html/Prefs/Quicksearch.html create mode 100644 rt/share/html/Prefs/Search.html create mode 100644 rt/share/html/Prefs/SearchOptions.html create mode 100644 rt/share/html/REST/1.0/Forms/attachment/default create mode 100644 rt/share/html/REST/1.0/Forms/group/customfields create mode 100644 rt/share/html/REST/1.0/Forms/group/default create mode 100644 rt/share/html/REST/1.0/Forms/group/ns create mode 100644 rt/share/html/REST/1.0/Forms/queue/customfields create mode 100755 rt/share/html/REST/1.0/Forms/queue/default create mode 100755 rt/share/html/REST/1.0/Forms/queue/ns create mode 100644 rt/share/html/REST/1.0/Forms/queue/ticketcustomfields create mode 100755 rt/share/html/REST/1.0/Forms/ticket/attachments create mode 100755 rt/share/html/REST/1.0/Forms/ticket/comment create mode 100755 rt/share/html/REST/1.0/Forms/ticket/default create mode 100755 rt/share/html/REST/1.0/Forms/ticket/history create mode 100755 rt/share/html/REST/1.0/Forms/ticket/links create mode 100755 rt/share/html/REST/1.0/Forms/ticket/merge create mode 100755 rt/share/html/REST/1.0/Forms/ticket/take create mode 100644 rt/share/html/REST/1.0/Forms/transaction/default create mode 100755 rt/share/html/REST/1.0/Forms/user/default create mode 100755 rt/share/html/REST/1.0/Forms/user/ns create mode 100755 rt/share/html/REST/1.0/NoAuth/mail-gateway create mode 100755 rt/share/html/REST/1.0/autohandler create mode 100755 rt/share/html/REST/1.0/dhandler create mode 100755 rt/share/html/REST/1.0/logout create mode 100755 rt/share/html/REST/1.0/search/dhandler create mode 100755 rt/share/html/REST/1.0/search/ticket create mode 100755 rt/share/html/REST/1.0/ticket/comment create mode 100755 rt/share/html/REST/1.0/ticket/link create mode 100755 rt/share/html/REST/1.0/ticket/merge create mode 100644 rt/share/html/Search/Build.html create mode 100755 rt/share/html/Search/Bulk.html create mode 100644 rt/share/html/Search/Chart create mode 100644 rt/share/html/Search/Chart.html create mode 100755 rt/share/html/Search/Edit.html create mode 100644 rt/share/html/Search/Elements/BuildFormatString create mode 100644 rt/share/html/Search/Elements/Chart create mode 100644 rt/share/html/Search/Elements/ConditionRow create mode 100644 rt/share/html/Search/Elements/DisplayOptions create mode 100644 rt/share/html/Search/Elements/EditFormat create mode 100644 rt/share/html/Search/Elements/EditQuery create mode 100644 rt/share/html/Search/Elements/EditSearches create mode 100644 rt/share/html/Search/Elements/Graph create mode 100644 rt/share/html/Search/Elements/NewListActions create mode 100644 rt/share/html/Search/Elements/PickBasics create mode 100644 rt/share/html/Search/Elements/PickCFs create mode 100644 rt/share/html/Search/Elements/PickCriteria create mode 100644 rt/share/html/Search/Elements/ResultViews create mode 100644 rt/share/html/Search/Elements/SearchPrivacy create mode 100644 rt/share/html/Search/Elements/SearchesForObject create mode 100644 rt/share/html/Search/Elements/SelectAndOr create mode 100644 rt/share/html/Search/Elements/SelectChartType create mode 100644 rt/share/html/Search/Elements/SelectGroup create mode 100644 rt/share/html/Search/Elements/SelectGroupBy create mode 100644 rt/share/html/Search/Elements/SelectLinks create mode 100644 rt/share/html/Search/Elements/SelectPersonType create mode 100644 rt/share/html/Search/Elements/SelectSearchObject create mode 100644 rt/share/html/Search/Elements/SelectSearchesForObjects create mode 100644 rt/share/html/Search/Graph.html create mode 100755 rt/share/html/Search/Results.html create mode 100644 rt/share/html/Search/Results.rdf create mode 100644 rt/share/html/Search/Results.tsv create mode 100644 rt/share/html/Search/Simple.html create mode 100755 rt/share/html/SelfService/Attachment/dhandler create mode 100755 rt/share/html/SelfService/Closed.html create mode 100755 rt/share/html/SelfService/Create.html create mode 100755 rt/share/html/SelfService/CreateTicketInQueue.html create mode 100755 rt/share/html/SelfService/Display.html create mode 100755 rt/share/html/SelfService/Elements/GotoTicket create mode 100755 rt/share/html/SelfService/Elements/Header create mode 100755 rt/share/html/SelfService/Elements/MyRequests create mode 100755 rt/share/html/SelfService/Elements/Tabs create mode 100755 rt/share/html/SelfService/Error.html create mode 100755 rt/share/html/SelfService/Prefs.html create mode 100755 rt/share/html/SelfService/Update.html create mode 100755 rt/share/html/SelfService/index.html create mode 100644 rt/share/html/Ticket/Attachment/WithHeaders/dhandler create mode 100755 rt/share/html/Ticket/Attachment/dhandler create mode 100755 rt/share/html/Ticket/Create.html create mode 100755 rt/share/html/Ticket/Display.html create mode 100755 rt/share/html/Ticket/Elements/AddWatchers create mode 100644 rt/share/html/Ticket/Elements/Bookmark create mode 100755 rt/share/html/Ticket/Elements/BulkLinks create mode 100755 rt/share/html/Ticket/Elements/EditBasics create mode 100755 rt/share/html/Ticket/Elements/EditCustomFields create mode 100755 rt/share/html/Ticket/Elements/EditDates create mode 100755 rt/share/html/Ticket/Elements/EditPeople create mode 100644 rt/share/html/Ticket/Elements/EditTransactionCustomFields create mode 100755 rt/share/html/Ticket/Elements/EditWatchers create mode 100644 rt/share/html/Ticket/Elements/FindAttachments create mode 100644 rt/share/html/Ticket/Elements/LoadTextAttachments create mode 100755 rt/share/html/Ticket/Elements/PreviewScrips create mode 100644 rt/share/html/Ticket/Elements/Reminders create mode 100755 rt/share/html/Ticket/Elements/ShowAttachments create mode 100755 rt/share/html/Ticket/Elements/ShowBasics create mode 100755 rt/share/html/Ticket/Elements/ShowCustomFields create mode 100755 rt/share/html/Ticket/Elements/ShowDates create mode 100755 rt/share/html/Ticket/Elements/ShowDependencies create mode 100644 rt/share/html/Ticket/Elements/ShowGnuPGStatus create mode 100644 rt/share/html/Ticket/Elements/ShowGroupMembers create mode 100755 rt/share/html/Ticket/Elements/ShowHistory create mode 100755 rt/share/html/Ticket/Elements/ShowMembers create mode 100755 rt/share/html/Ticket/Elements/ShowMessageHeaders create mode 100755 rt/share/html/Ticket/Elements/ShowMessageStanza create mode 100644 rt/share/html/Ticket/Elements/ShowParents create mode 100755 rt/share/html/Ticket/Elements/ShowPeople create mode 100644 rt/share/html/Ticket/Elements/ShowPriority create mode 100644 rt/share/html/Ticket/Elements/ShowQueue create mode 100755 rt/share/html/Ticket/Elements/ShowRequestor create mode 100755 rt/share/html/Ticket/Elements/ShowSummary create mode 100644 rt/share/html/Ticket/Elements/ShowTime create mode 100755 rt/share/html/Ticket/Elements/ShowTransaction create mode 100644 rt/share/html/Ticket/Elements/ShowTransactionAttachments create mode 100644 rt/share/html/Ticket/Elements/ShowUpdateStatus create mode 100644 rt/share/html/Ticket/Elements/ShowUserEntry create mode 100755 rt/share/html/Ticket/Elements/Tabs create mode 100644 rt/share/html/Ticket/Elements/UpdateCc create mode 100644 rt/share/html/Ticket/Forward.html create mode 100644 rt/share/html/Ticket/GnuPG.html create mode 100644 rt/share/html/Ticket/Graphs/Elements/EditGraphProperties create mode 100644 rt/share/html/Ticket/Graphs/Elements/ShowGraph create mode 100644 rt/share/html/Ticket/Graphs/Elements/ShowLegends create mode 100644 rt/share/html/Ticket/Graphs/dhandler create mode 100644 rt/share/html/Ticket/Graphs/index.html create mode 100755 rt/share/html/Ticket/History.html create mode 100755 rt/share/html/Ticket/Modify.html create mode 100755 rt/share/html/Ticket/ModifyAll.html create mode 100755 rt/share/html/Ticket/ModifyDates.html create mode 100755 rt/share/html/Ticket/ModifyLinks.html create mode 100755 rt/share/html/Ticket/ModifyPeople.html create mode 100755 rt/share/html/Ticket/Reminders.html create mode 100644 rt/share/html/Ticket/ShowEmailRecord.html create mode 100755 rt/share/html/Ticket/Update.html create mode 100644 rt/share/html/Tools/Elements/Tabs create mode 100644 rt/share/html/Tools/MyDay.html create mode 100644 rt/share/html/Tools/Offline.html create mode 100644 rt/share/html/Tools/Reports/CreatedByDates.html create mode 100644 rt/share/html/Tools/Reports/Elements/Tabs create mode 100644 rt/share/html/Tools/Reports/ResolvedByDates.html create mode 100644 rt/share/html/Tools/Reports/ResolvedByOwner.html create mode 100644 rt/share/html/Tools/Reports/index.html create mode 100644 rt/share/html/Tools/index.html create mode 100755 rt/share/html/User/Delegation.html create mode 100755 rt/share/html/User/Elements/DelegateRights create mode 100755 rt/share/html/User/Elements/GroupTabs create mode 100755 rt/share/html/User/Elements/Tabs create mode 100755 rt/share/html/User/Groups/Members.html create mode 100755 rt/share/html/User/Groups/Modify.html create mode 100755 rt/share/html/User/Groups/index.html create mode 100755 rt/share/html/User/Prefs.html create mode 100644 rt/share/html/Widgets/BulkEdit create mode 100644 rt/share/html/Widgets/BulkProcess create mode 100644 rt/share/html/Widgets/ComboBox create mode 100644 rt/share/html/Widgets/FinalizeWidgetArguments create mode 100644 rt/share/html/Widgets/Form/Boolean create mode 100644 rt/share/html/Widgets/Form/Integer create mode 100644 rt/share/html/Widgets/Form/Select create mode 100644 rt/share/html/Widgets/Form/String create mode 100644 rt/share/html/Widgets/SavedSearch create mode 100644 rt/share/html/Widgets/SelectionBox create mode 100644 rt/share/html/Widgets/TitleBox create mode 100755 rt/share/html/Widgets/TitleBoxEnd create mode 100755 rt/share/html/Widgets/TitleBoxStart create mode 100755 rt/share/html/autohandler create mode 100644 rt/share/html/dhandler create mode 100755 rt/share/html/index.html create mode 100755 rt/share/html/l (limited to 'rt/share/html') diff --git a/rt/share/html/Admin/CustomFields/GroupRights.html b/rt/share/html/Admin/CustomFields/GroupRights.html new file mode 100644 index 000000000..4171f041e --- /dev/null +++ b/rt/share/html/Admin/CustomFields/GroupRights.html @@ -0,0 +1,114 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/CustomFieldTabs, + id => $id, + current_tab => "Admin/CustomFields/GroupRights.html?id=".$id, + Title => $title +&> +<& /Elements/ListActions, actions => \@results &> + +
+ + + +

<&|/l&>System groups

+ +% my $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToSystemInternalGroups(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
+ <% loc($Group->Type) %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $CustomFieldObj &> +
+

<&|/l&>User defined groups

+ +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToUserDefinedGroups(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
+ <% $Group->Name %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $CustomFieldObj &> +
+ + <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> + +
+ +<%INIT> + +if (!defined $id) { + $m->comp("/Elements/Error", Why => loc("No CustomField defined")); +} + +my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'}); +$CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc("Couldn't load CustomField [_1]",$id)); + +my @results = ProcessACLChanges( \%ARGS ); + +my $title = loc('Modify group rights for custom field [_1]', $CustomFieldObj->Name); + + + +<%ARGS> +$id => undef + diff --git a/rt/share/html/Admin/CustomFields/Modify.html b/rt/share/html/Admin/CustomFields/Modify.html new file mode 100644 index 000000000..f75607a8d --- /dev/null +++ b/rt/share/html/Admin/CustomFields/Modify.html @@ -0,0 +1,249 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/CustomFieldTabs, + id => $CustomFieldObj->Id , + current_tab => $current_tab, + Title => $title &> +<& /Elements/ListActions, actions => \@results &> + + +
+ + + + + + + + + + + + + +% if ( $CustomFieldObj->Id and $CustomFieldObj->IsSelectionType and RT->Config->Get('CustomFieldValuesSources') and ( scalar(@{RT->Config->Get('CustomFieldValuesSources')}) > 0 ) ) { + +% } + + + + + + + + + + + +% if ( $CustomFieldObj->Id && $CustomFieldObj->IsSelectionType && !$CustomFieldObj->IsExternalValues ) { + +% } + + + +
<&|/l&>Name
<&|/l&>Description
<&|/l&>Type<& /Admin/Elements/SelectCustomFieldType, + Name => "TypeComposite", + Default => $CustomFieldObj->TypeComposite, &> +
<&|/l&>Field values source: +<& /Admin/Elements/EditCustomFieldValuesSource, CustomField => $CustomFieldObj &> +
<&|/l&>Applies to<& /Admin/Elements/SelectCustomFieldLookupType, + Name => "LookupType", + Default => $CustomFieldObj->LookupType, &> +
<&|/l&>Validation<& /Widgets/ComboBox, + Name => 'Pattern', + Default => $CustomFieldObj->Pattern, + Size => 20, + Values => \@CFvalidations, +&>
<&|/l&>Link values to + +
+<&|/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 __id__ and __CustomField__ with the record id and custom field value, respectively +
<&|/l&>Include page + +
+<&|/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 __id__ and __CustomField__ with the record id and custom field value, respectively +<&|/l&>Some browsers may only load content from the same domain as your RT server. +
<&|/l&>Categories are based on +<& /Admin/Elements/SelectCustomField, + Name => "BasedOn", + LookupType => $CustomFieldObj->LookupType, + Default => $CustomFieldObj->BasedOnObj, + Not => $CustomFieldObj->id, +&> +
  + + /> +<&|/l&>Enabled (Unchecking this box disables this custom field) +
+ +% if ( $CustomFieldObj->Id && $CustomFieldObj->IsSelectionType && !$CustomFieldObj->IsExternalValues ) { +

<&|/l&>Values

+
+<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &> +<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &> +
+% } + +<& /Elements/Submit, Name => 'Update', Label => $id eq 'new'? loc('Create'): loc('Save Changes') &> + +
+<%INIT> +my ($title, @results, $Disabled); + +my $CustomFieldObj = RT::CustomField->new( $session{'CurrentUser'} ); +my $current_tab = 'Admin/CustomFields/Modify.html'; + +unless ( $id ) { + $title = loc("Create a CustomField"); + $id = 'new'; + $current_tab .= '?Create=1'; +} +else { + if ( $id eq 'new' ) { + my ( $val, $msg ) = $CustomFieldObj->Create( + Name => $Name, + TypeComposite => $TypeComposite, + LookupType => $LookupType, + Description => $Description, + Pattern => $Pattern, + LinkValueTo => $LinkValueTo, + IncludeContentForValue => $IncludeContentForValue, + BasedOn => $BasedOn, + ); + $m->comp( "/Elements/Error", Why => loc( "Could not create CustomField", $msg ) ) unless $val; + push @results, $msg; + $title = loc( 'Created CustomField [_1]', $CustomFieldObj->Name ); + } else { + $CustomFieldObj->Load( $id ) || $m->comp("/Elements/Error", Why => loc('No CustomField') ); + $title = loc( 'Editing CustomField [_1]', $CustomFieldObj->Name ); + } + $current_tab .= "?id=$id"; +} + +if ( $ARGS{'Update'} && $id ne 'new' ) { + + #we're asking about enabled on the web page but really care about disabled. + $ARGS{'Disabled'} = $Disabled = $Enabled? 0 : 1; + + my @attribs = qw(Disabled Pattern Name TypeComposite LookupType Description LinkValueTo IncludeContentForValue); + push @results, UpdateRecordObject( + AttributesRef => \@attribs, + Object => $CustomFieldObj, + ARGSRef => \%ARGS + ); + $CustomFieldObj->SetValuesClass( $ValuesClass ); + + $CustomFieldObj->SetBasedOn( $BasedOn ); + + my $paramtag = "CustomField-". $CustomFieldObj->Id ."-Value"; + # Delete any fields that want to be deleted + foreach my $key ( keys %ARGS ) { + next unless $key =~ /^Delete-$paramtag-(\d+)$/o; + my ($val, $msg) = $CustomFieldObj->DeleteValue( $1 ); + push (@results, $msg); + } + + # Update any existing values + my $values = $CustomFieldObj->ValuesObj; + while ( my $value = $values->Next ) { + foreach my $attr qw(Name Description SortOrder Category) { + my $param = join("-", $paramtag, $value->Id, $attr); + next unless exists $ARGS{$param}; + next if ($value->$attr()||'') eq ($ARGS{$param}||''); + + my $mutator = "Set$attr"; + my ($id, $msg) = $value->$mutator( $ARGS{$param} ); + push (@results, $msg); + } + } + + # Add any new values + if ( defined $ARGS{ $paramtag ."-new-Name" } && length $ARGS{ $paramtag ."-new-Name" } ) { + my ($id, $msg) = $CustomFieldObj->AddValue( + map { $_ => $ARGS{ $paramtag ."-new-$_" } } + qw( Name Description SortOrder Category ) + ); + push (@results, $msg); + } +} + +$id = $CustomFieldObj->id if $CustomFieldObj->id; + +my $EnabledChecked = qq[checked="checked"]; +$EnabledChecked = '' if $CustomFieldObj->Disabled; + +my @CFvalidations = ( + '(?#Mandatory).', + '(?#Digits)^[\d.]+$', + '(?#Year)^[12]\d{3}$', +); + +$m->callback(CallbackName => 'ValidationPatterns', Values => \@CFvalidations); + + +<%ARGS> +$id => undef +$TypeComposite => undef +$LookupType => undef +$MaxValues => undef +$SortOrder => undef +$Description => undef +$Pattern => undef +$Name => undef +$SetEnabled => undef +$Enabled => 0 +$ValuesClass => 'RT::CustomFieldValues' +$LinkValueTo => undef +$IncludeContentForValue => undef +$BasedOn => undef + diff --git a/rt/share/html/Admin/CustomFields/Objects.html b/rt/share/html/Admin/CustomFields/Objects.html new file mode 100644 index 000000000..20d79b294 --- /dev/null +++ b/rt/share/html/Admin/CustomFields/Objects.html @@ -0,0 +1,153 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/CustomFieldTabs, + id => $id, + current_tab => "Admin/CustomFields/Objects.html?id=".$id, + Title => $title + &> + +<& /Elements/ListActions, actions => \@results &> + +
+ + + +

<&|/l&>Selected objects

+<& /Admin/Elements/PickObjects, Objects => \@AssignedObjs, id => $id, Checked => 1 &> +

<&|/l&>Unselected objects

+<& /Admin/Elements/PickObjects, Objects => \@UnassignedObjs, id => $id &> + +<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &> +
+ +<%INIT> +my $CF = RT::CustomField->new($session{'CurrentUser'}); +$CF->Load($id) or Abort(loc("Could not load CustomField [_1]"), $id); +my $LookupType = $CF->LookupType || ''; +$LookupType =~ /^([^-]+)/ || + Abort(loc("Object of type [_1] cannot take custom fields", $LookupType)); + +my $Class = $1; +my $CollectionClass; +if (UNIVERSAL::can($Class.'Collection', 'new') ) { +$CollectionClass = $Class.'Collection'; + +} elsif (UNIVERSAL::can($Class.'es', 'new') ) { + $CollectionClass = $Class.'es'; + +} elsif (UNIVERSAL::can($Class.'s', 'new') ) { + $CollectionClass = $Class.'s'; + +} else { + Abort(loc("Can't find a collection class for '[_1]'", $Class)); +} + + +my $title = loc('Modify associated objects for [_1]', $CF->Name); + +my $Objects = $CollectionClass->new($session{'CurrentUser'}); + +# If CF is a Group CF, only display user-defined groups +if ($Class eq 'RT::Group') { + $Objects->LimitToUserDefinedGroups; +} + +my (@results); +my (@AssignedObjs, @UnassignedObjs); + +$Objects->UnLimit; +$Objects->OrderBy( FIELD => 'Name' ); + + +my $ObjectCFs; +$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'}); +$ObjectCFs->UnLimit; +$ObjectCFs->LimitToCustomField($id); + +my %seen; +while (my $OCF = $ObjectCFs->Next) { + $seen{$OCF->ObjectId}++; +} + +while (my $obj = $Objects->Next) { + my $obj_id = $obj->Id; + + if ($UpdateObjs) { + # Go through and delete all the custom field relationships that this object + # no longer has + my $key = "Object-$obj_id-CF-$id"; + if ($ARGS{$key}) { + if (!$seen{$obj_id}) { + my ($val, $msg) = $CF->AddToObject($obj); + push (@results, $msg); + push @UnassignedObjs, $obj if !$val; + } + } + else { + push @UnassignedObjs, $obj; + if ($seen{$obj_id}) { + my ($val, $msg) = $CF->RemoveFromObject($obj); + push (@results, $msg); + pop @UnassignedObjs if !$val; + } + } + } + elsif (!$seen{$obj_id}) { + push @UnassignedObjs, $obj; + } + next if @UnassignedObjs and $UnassignedObjs[-1] == $obj; + push @AssignedObjs, $obj; +} + + +<%ARGS> +$id => undef +$FindDisabledObjects => 0 +$UpdateObjs => 0 + diff --git a/rt/share/html/Admin/CustomFields/UserRights.html b/rt/share/html/Admin/CustomFields/UserRights.html new file mode 100644 index 000000000..9efd9acdb --- /dev/null +++ b/rt/share/html/Admin/CustomFields/UserRights.html @@ -0,0 +1,110 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/CustomFieldTabs, id => $id, +current_tab => "Admin/CustomFields/UserRights.html?id=".$id, +Title => $title, &> +<& /Elements/ListActions, actions => \@results &> + +
+ + + + + +% while (my $Member = $Users->Next()) { +% my $UserObj = $Member->MemberObj->Object(); +% my $group = RT::Group->new($session{'CurrentUser'}); +% $group->LoadACLEquivalenceGroup($Member->MemberObj); + + + + +% } +
<& /Elements/ShowUser, User => $UserObj &> + <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId, + Object => $CustomFieldObj &> +
+ + <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> + +
+ +<%INIT> + +#Update the acls. +my @results = ProcessACLChanges( \%ARGS ); + +# {{{ Deal with setting up the display of current rights. + + + +if (!defined $id) { + $m->comp("/Elements/Error", Why => loc("No Class defined")); +} + +my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'}); +$CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc("Couldn't load Class [_1]",$id)); + +# Find out which users we want to display ACL selects for +my $Privileged = RT::Group->new($session{'CurrentUser'}); +$Privileged->LoadSystemInternalGroup('Privileged'); +my $Users = $Privileged->MembersObj(); + +my $title = loc('Modify user rights for custom field [_1]', $CustomFieldObj->Name); + +# }}} + + + +<%ARGS> +$id => undef +$UserString => undef +$UserOp => undef +$UserField => undef + diff --git a/rt/share/html/Admin/CustomFields/index.html b/rt/share/html/Admin/CustomFields/index.html new file mode 100644 index 000000000..139b8ebd6 --- /dev/null +++ b/rt/share/html/Admin/CustomFields/index.html @@ -0,0 +1,108 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Select a Custom Field') &> +<& /Admin/Elements/CustomFieldTabs, + current_tab => 'Admin/CustomFields/', + Title => loc('Select a Custom Field') &> + +% my @types; +% my $prev_lookup = ''; +% while (my $CustomFieldObj = $CustomFields->Next) { +% next unless $CustomFieldObj->CurrentUserHasRight('AdminCustomField'); +% my $lookup = $CustomFieldObj->FriendlyLookupType; +% if ($lookup ne $prev_lookup) { +% if ($prev_lookup) { + +% } +

<% loc("Custom Fields for [_1]", $lookup) %>

+ +% } + +
+<&|/l&>Only show custom fields for: + +
+ /> +<&|/l&>Include disabled custom fields in listing. +
+ + +
+ +<%args> +$Type => '' +$ShowDisabled => 0 + +<%INIT> +$Type ||= $ARGS{'type'} || ''; +if ( !$Type && $ARGS{'type'} ) { + $Type ||= $ARGS{'type'}; + $RT::Logger->warning("'type' argument is deprecated use 'Type' instead"); +} + +my $CustomFields = RT::CustomFields->new($session{'CurrentUser'}); +$CustomFields->UnLimit; +$CustomFields->{'find_disabled_rows'} = 1 if $ShowDisabled; +$CustomFields->LimitToLookupType( $Type ) if $Type; +$CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } ); + diff --git a/rt/share/html/Admin/Elements/AddCustomFieldValue b/rt/share/html/Admin/Elements/AddCustomFieldValue new file mode 100755 index 000000000..9fe464a5d --- /dev/null +++ b/rt/share/html/Admin/Elements/AddCustomFieldValue @@ -0,0 +1,86 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +

<&|/l&>Add Value

+ + + + + + + +% if ( $CustomField->Type ne 'Combobox' ) { + +% } + + +% my $paramtag = "CustomField-". $CustomField->Id ."-Value-new"; + + + + +% if ( $CustomField->Type ne 'Combobox' ) { + +% } + + +
<&|/l&>Sort<&|/l&>Name<&|/l&>Description<&|/l&>Category
+% my $BasedOnObj = $CustomField->BasedOnObj; +% if ( $BasedOnObj and $BasedOnObj->id ) { +% my $Categories = $BasedOnObj->Values; + +% } +
+<%args> +$CustomField => undef + diff --git a/rt/share/html/Admin/Elements/ConfigureMyRT b/rt/share/html/Admin/Elements/ConfigureMyRT new file mode 100644 index 000000000..35c01bc52 --- /dev/null +++ b/rt/share/html/Admin/Elements/ConfigureMyRT @@ -0,0 +1,82 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +$ReadOnly => 0 + +<%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, + ReadOnly => $ReadOnly, + 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; + diff --git a/rt/share/html/Admin/Elements/CreateUserCalled b/rt/share/html/Admin/Elements/CreateUserCalled new file mode 100755 index 000000000..78eb82c02 --- /dev/null +++ b/rt/share/html/Admin/Elements/CreateUserCalled @@ -0,0 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +
+<&|/l&>New user called +
diff --git a/rt/share/html/Admin/Elements/CustomFieldTabs b/rt/share/html/Admin/Elements/CustomFieldTabs new file mode 100644 index 000000000..30f5adf11 --- /dev/null +++ b/rt/share/html/Admin/Elements/CustomFieldTabs @@ -0,0 +1,118 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Tabs, + current_tab => 'Admin/CustomFields/', + subtabs => $tabs, + current_subtab => $current_tab, + Title => $Title &> +<%INIT> +my $tabs; + +if ($id) { + my $cf = RT::CustomField->new( $session{'CurrentUser'} ); + $cf->Load($id); + $tabs = { + this => { + title => $cf->Name, + path => "Admin/CustomFields/Modify.html?id=" . $id, + current_subtab => $current_tab, + + subtabs => { + + C => { title => loc('Basics'), + path => "Admin/CustomFields/Modify.html?id=" . $id, + }, + F => { title => loc('Group Rights'), + path => "Admin/CustomFields/GroupRights.html?id=" + . $id, }, + G => { + title => loc('User Rights'), + path => "Admin/CustomFields/UserRights.html?id=" . $id, + }, + + } } + + }; + + + if ($cf->LookupType =~ /^RT::(?:Queue|Group)(?:\Z|-)/i) { + $tabs->{'this'}->{subtabs}->{D} = { + title => loc('Applies to'), + path => "Admin/CustomFields/Objects.html?id=" . $id, + }; + } +} + +if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField')) { + $tabs->{"A"} = { title => loc('Select'), + path => "Admin/CustomFields/", + }; + $tabs->{"B"} = { title => loc('Create'), + path => "Admin/CustomFields/Modify.html?Create=1", + separator => 1, + }; +} + + # Now let callbacks add their extra tabs + $m->callback( %ARGS, tabs => $tabs ); + +foreach my $tab (sort keys %{$tabs->{'this'}->{'subtabs'}}) { + if ($tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab) { + $tabs->{'this'}->{'subtabs'}->{$tab}->{'subtabs'} = $subtabs; + $tabs->{'this'}->{'subtabs'}->{$tab}->{'current_subtab'} = $current_subtab; + } +} +if( $id ) { $current_tab = "Admin/CustomFields/Modify.html?id=" . $id } + +<%ARGS> +$Title => undef +$id => undef +$current_tab => undef +$subtabs => undef +$current_subtab => undef + diff --git a/rt/share/html/Admin/Elements/EditCustomField b/rt/share/html/Admin/Elements/EditCustomField new file mode 100755 index 000000000..368ea2d68 --- /dev/null +++ b/rt/share/html/Admin/Elements/EditCustomField @@ -0,0 +1,159 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/ListActions, actions => \@results &> + + +
+ + + + + + + + +
+<&|/l&>Name: + + +
+<&|/l&>Description: + + +
+<&|/l&>Type: + +<& /Admin/Elements/SelectCustomFieldType, Name => "Type", Default => $CustomFieldObj->Type &> +
+ + + /> <&|/l&>Enabled (Unchecking this box disables this custom field) +
+ +

+% if ($CustomFieldObj->Id and $CustomFieldObj->Type =~ /Select/) { +

<&|/l&>Values

+ +<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &> +<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &> + +% } +<&/Elements/Submit, Label => loc('Create') &> +
+ + + +<%INIT> + +my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'}); +my $EnabledChecked = 'checked="checked"'; +my (@results); + +if (! $CustomField ) { + $title = loc("Create a CustomField"); + $id = 'new'; +} else { + + if ($CustomField eq 'new') { + my ($val, $msg) = $CustomFieldObj->Create(Queue => $Queue, + Name => $Name, + Type => $Type, + Description => $Description, + ); + + # if there is an error, then abort. But since at this point there's + # stuff already printed, clear it out. + # (This only works in conjunction with temporarily turning autoflush + # off in the files that use this component.) + unless ($val) { + $m->clear_buffer; + Abort(loc("Could not create CustomField: [_1]", $msg), SuppressHeader => 1); + } + push @results, $msg; + $CustomFieldObj->SetSortOrder($CustomFieldObj->id); + $title = loc('Created CustomField [_1]', $CustomFieldObj->Name()); + } else { + $CustomFieldObj->Load($CustomField) || Abort(loc('No CustomField'), SuppressHeader => 1); + $title = loc('Editing CustomField [_1]', $CustomFieldObj->Name()); + + my @aresults = ProcessCustomFieldUpdates ( + CustomFieldObj => $CustomFieldObj, + ARGSRef => \%ARGS ); + push @results, @aresults; + } + + +$id = $CustomFieldObj->id; + + #we're asking about enabled on the web page but really care about disabled. + my $Disabled = ($Enabled ? 0 : 1); + + if ( ($SetEnabled) and ( $Disabled != $CustomFieldObj->Disabled) ) { + my ($code, $msg) = $CustomFieldObj->SetDisabled($Disabled); + push @results, loc('Enabled status [_1]', loc_fuzzy($msg)); + } + + if ($CustomFieldObj->Disabled()) { + $EnabledChecked =""; + } + +} + + + +<%ARGS> +$id => undef +$title => undef +$Queue => undef +$CustomField => undef +$Type => undef +$Description => undef +$Name => undef +$SetEnabled => undef +$Enabled => undef + diff --git a/rt/share/html/Admin/Elements/EditCustomFieldValues b/rt/share/html/Admin/Elements/EditCustomFieldValues new file mode 100755 index 000000000..96610b2b5 --- /dev/null +++ b/rt/share/html/Admin/Elements/EditCustomFieldValues @@ -0,0 +1,104 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% unless ( $values->Count ) { +

<&|/l&>(no values)

+% return; +% } + + + + + + + + +% if ($CustomField->Type ne 'Combobox') { + +% } + + +% while ( my $value = $values->Next ) { +% my $paramtag = "CustomField-". $CustomField->Id ."-Value-". $value->Id; + + + + + +% if ( $CustomField->Type ne 'Combobox' ) { + +% } + +% } + +
 <&|/l&>Sort<&|/l&>Name<&|/l&>Description<&|/l&>Category
+% if ( $Categories ) { +% my $selected = $value->Category; +% $selected = '' unless defined $selected; + +% } +
+<&|/l&>(Check box to delete) +<%init> + +my $values = $CustomField->ValuesObj(); + +my $BasedOnObj = $CustomField->BasedOnObj; +my $Categories; +if ($BasedOnObj and $BasedOnObj->Id) { + $Categories = $BasedOnObj->Values; +} + +<%args> +$CustomField => undef + diff --git a/rt/share/html/Admin/Elements/EditCustomFieldValuesSource b/rt/share/html/Admin/Elements/EditCustomFieldValuesSource new file mode 100644 index 000000000..c4b41114d --- /dev/null +++ b/rt/share/html/Admin/Elements/EditCustomFieldValuesSource @@ -0,0 +1,82 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +return unless $CustomField->IsSelectionType; + +my @sources; +foreach my $class( 'RT::CustomFieldValues', RT->Config->Get('CustomFieldValuesSources') ) { + next unless $class; + + local $@; + eval "require $class"; + if( $@ ) { + $RT::Logger->crit("Couldn't load class '$class': $@"); + next; + } + + my %res = ( Class => $class ); + $res{'Description'} = $class->SourceDescription if $class->can('SourceDescription'); + $res{'Description'} ||= $class; + $res{'Description'} = 'Provide list of values below' if $class eq 'RT::CustomFieldValues'; + push @sources, \%res; +} + +return unless grep $_->{'Class'} ne 'RT::CustomFieldValues', @sources; + + +<%ARGS> +$CustomField => undef + diff --git a/rt/share/html/Admin/Elements/EditCustomFields b/rt/share/html/Admin/Elements/EditCustomFields new file mode 100755 index 000000000..89c6d0f65 --- /dev/null +++ b/rt/share/html/Admin/Elements/EditCustomFields @@ -0,0 +1,205 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/ListActions, actions => \@results &> + +
+ + + + + +% if ($Object->Id) { +

<&|/l&>Global Custom Fields

+<& PickCustomFields, CustomFields => \@GlobalCFs, ReadOnly => 1, id => $id, SubType => $SubType &> +% } +

<&|/l&>Selected Custom Fields

+<& PickCustomFields, CustomFields => [$ObjectCFs->CustomFields], id => $id, Checked => 1, SubType => $SubType &> +

<&|/l&>Unselected Custom Fields

+<& PickCustomFields, CustomFields => \@UnassignedCFs, id => $id, SubType => $SubType &> + +<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &> +
+ + +<%INIT> +my $CustomFields = RT::CustomFields->new($session{'CurrentUser'}); +my @results; +my (@GlobalCFs, @UnassignedCFs); + +my $id = $Object->Id; +if ($id and !$Object->CurrentUserHasRight('AssignCustomFields')) { + $m->out('

', loc('(No custom fields)'), '

'); + return; +} + +my $lookup = $ObjectType; +$lookup .= "-$SubType" if $SubType; + +$CustomFields->LimitToLookupType($lookup); +$CustomFields->OrderBy( FIELD => 'Name' ); + + +my ($GlobalCFs, $ObjectCFs); +$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'}); +$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'}); + $SourceObj->LoadByCols( ObjectId => $id, CustomField => $CustomField ); + + my $TargetObj; + my $target_order = $SourceObj->SortOrder + $Move; + while (my $ObjectCF = $ObjectCFs->Next) { + my $this_order = $ObjectCF->SortOrder; + + # if we have an exact match, finish the loop now + ($TargetObj = $ObjectCF, last) if $this_order == $target_order; + + # otherwise, we need to apropos toward the general direction + # ... first, check the sign is correct + next unless ($this_order - $SourceObj->SortOrder) * $Move > 0; + + # ... next, see if we already have a candidate + if ($TargetObj) { + # ... if yes, compare the delta and choose the smaller one + my $orig_delta = abs($TargetObj->SortOrder - $target_order); + my $this_delta = abs($this_order - $target_order); + next if $orig_delta < $this_delta; + } + + $TargetObj = $ObjectCF; + } + + if ($TargetObj) { + # swap their sort order + my ($s, $t) = ($SourceObj->SortOrder, $TargetObj->SortOrder); + $TargetObj->SetSortOrder($s); + $SourceObj->SetSortOrder($t); + # because order changed, we must redo search for subsequent uses + } + + $ObjectCFs->GotoFirstItem; +} +# }}} + +if ($id) { + $GlobalCFs = RT::ObjectCustomFields->new($session{'CurrentUser'}); + $GlobalCFs->LimitToObjectId(0); + $GlobalCFs->LimitToLookupType($lookup); +} + +while (my $cf = $CustomFields->Next) { + my $cf_id = $cf->Id; + + if ($GlobalCFs and $GlobalCFs->HasEntryForCustomField($cf_id)) { + push @GlobalCFs, $cf; + next; + } + + if ($UpdateCFs) { + # Go through and delete all the custom field relationships that this object + # no longer has + my $key = "Object-$id-CF-$cf_id"; + if ($ARGS{$key}) { + if (!$ObjectCFs->HasEntryForCustomField($cf_id)) { + my ($val, $msg) = $cf->AddToObject($Object); + push (@results, $msg); + push @UnassignedCFs, $cf if !$val; + } + } + else { + push @UnassignedCFs, $cf; + if ($ObjectCFs->HasEntryForCustomField($cf_id)) { + my ($val, $msg) = $cf->RemoveFromObject($Object); + push (@results, $msg); + pop @UnassignedCFs if !$val; + } + } + } + elsif (!$ObjectCFs->HasEntryForCustomField($cf_id)) { + push @UnassignedCFs, $cf; + } + else { + } +} + +# redo search... +$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'}); +$ObjectCFs->UnLimit; +$ObjectCFs->LimitToObjectId($id); +$ObjectCFs->LimitToLookupType($lookup); + + +<%ARGS> +$title => undef +$Move => undef +$Source => undef +$CustomField => undef +$FindDisabledCustomFields => undef +$UpdateCFs => 0 +$Object +$ObjectType +$SubType => '' + diff --git a/rt/share/html/Admin/Elements/EditQueueWatchers b/rt/share/html/Admin/Elements/EditQueueWatchers new file mode 100755 index 000000000..56ffb0e0f --- /dev/null +++ b/rt/share/html/Admin/Elements/EditQueueWatchers @@ -0,0 +1,78 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ($Members->Count == 0 ) { +
    +
  • <&|/l&>none +% } else { + +<&|/l&>(Check box to delete)

    + +<%INIT> +my $Members = $Watchers->MembersObj; + + +<%ARGS> +$QueueObj => undef +$Watchers => undef + + + + diff --git a/rt/share/html/Admin/Elements/EditScrip b/rt/share/html/Admin/Elements/EditScrip new file mode 100755 index 000000000..29ec71cd7 --- /dev/null +++ b/rt/share/html/Admin/Elements/EditScrip @@ -0,0 +1,197 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/ListActions, actions => \@actions &> + +
    + + + +<&| /Widgets/TitleBox, title => loc('Scrip Fields') &> + + + + + + + + + + + + +
    <&|/l&>Description: +Description || '' %>" /> +
    <&|/l&>Condition: +<& /Admin/Elements/SelectScripCondition, + Name => "Scrip-$id-ScripCondition", + Default => $ARGS{"Scrip-$id-ScripCondition"} || $scrip->ConditionObj->Id, +&>
    <&|/l&>Action: +<& /Admin/Elements/SelectScripAction, + Name => "Scrip-$id-ScripAction", + Default => $ARGS{"Scrip-$id-ScripAction"} || $scrip->ActionObj->Id, +&>
    <&|/l&>Template: +<& /Admin/Elements/SelectTemplate, + Name => "Scrip-$id-Template", + Default => $ARGS{"Scrip-$id-Template"} || $scrip->TemplateObj->Id, + Queue => $Queue, +&>
    <&|/l&>Stage: +<& /Admin/Elements/SelectStage, + Name => "Scrip-$id-Stage", + Default => $ARGS{"Scrip-$id-Stage"} || $scrip->Stage, +&>
    + + +<& /Elements/Submit, + Label => $SubmitLabel, + Reset => 1, +&>
    + +<&| /Widgets/TitleBox, title => loc('User Defined conditions and actions') &> + + + + + + + + + +
    +<&|/l&>(Use these fields when you choose 'User Defined' for a condition or action) +
    <&|/l&>Custom condition: +% my $code = $ARGS{"Scrip-$id-CustomIsApplicableCode"} || $scrip->CustomIsApplicableCode || ''; +% my $lines = @{[ $code =~ /\n/gs ]} + 3; +% $lines = $min_lines if $lines < $min_lines; + +
    <&|/l&>Custom action preparation code: +% $code = $ARGS{"Scrip-$id-CustomPrepareCode"} || $scrip->CustomPrepareCode || ''; +% $lines = @{[ $code =~ /\n/gs ]} + 3; +% $lines = $min_lines if $lines < $min_lines; + +
    <&|/l&>Custom action cleanup code: +% $code = $ARGS{"Scrip-$id-CustomCommitCode"} || $scrip->CustomCommitCode || ''; +% $lines = @{[ $code =~ /\n/gs ]} + 3; +% $lines = $min_lines if $lines < $min_lines; + +
    + + +<& /Elements/Submit, + Label => $SubmitLabel, + Reset => 1, +&> + +
    +<%init> + +my (@actions, $SubmitLabel); +my $scrip = RT::Scrip->new( $session{'CurrentUser'} ); + +if ( $id ) { + $scrip->Load( $id ); + unless ( $id = $scrip->id ) { + push @actions, loc("Couldn't load scrip #[_1]", $id); + } + $SubmitLabel = loc('Save Changes'); +} + +unless ( $id ) { + $id = 'new'; + $SubmitLabel = loc('Create'); +} + +my $min_lines = 10; + + + +<%ARGS> +$id => undef +$title => undef +$Queue => 0 + + +<%METHOD Process> +<%ARGS> +$id => undef +$Queue => undef + +<%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"}, + Stage => $ARGS{"Scrip-new-Stage"}, + ); +} +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); +} + + diff --git a/rt/share/html/Admin/Elements/EditScrips b/rt/share/html/Admin/Elements/EditScrips new file mode 100755 index 000000000..df349e1b9 --- /dev/null +++ b/rt/share/html/Admin/Elements/EditScrips @@ -0,0 +1,124 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/ListActions, actions => \@actions &> + +
    + + +

    <&|/l&>Current Scrips

    +<& /Elements/CollectionList, + OrderBy => 'Description', + Order => 'ASC', + Rows => 100, + %ARGS, + Format => $Format, + DisplayFormat => "__CheckBox.{DeleteScrip}__, $Format", + Collection => $Scrips, + AllowSorting => 1, + PassArguments => [ qw(Query Format Rows Page Order OrderBy id) ], +&> + +% if ( $Scrips->Count ) { +

    <&|/l&>(Check box to delete)

    +% } else { +

    <&|/l&>(No scrips)

    +% } +<& /Elements/Submit, + Caption => loc("Delete selected scrips"), + Label => loc("Delete") +&> +
    + +<%init> +my (@actions); + +my $Scrips = RT::Scrips->new($session{'CurrentUser'}); + +my $QueueObj = RT::Queue->new($session{'CurrentUser'}); +if ( $id ) { + $QueueObj->Load( $id ); + unless ( $QueueObj->id ) { + push @actions, loc("Couldn't load queue #[_1]", $id) + } +} + +if ($QueueObj->id) { + $Scrips->LimitToQueue($id); +} +else { + $Scrips->LimitToGlobal(); +} + +# {{{ deal with modifying and deleting existing scrips +# we still support DeleteScrip-id format but array is preferred +foreach my $id ( grep $_, @DeleteScrip, map /^DeleteScrip-(\d+)/, keys %ARGS ) { + my $scrip = RT::Scrip->new($session{'CurrentUser'}); + $scrip->Load( $id ); + my ($retval, $msg) = $scrip->Delete; + if ($retval) { + push @actions, loc("Scrip deleted"); + } + else { + push @actions, $msg; + } +} +# }}} + +my $dir_path = $m->request_comp->dir_path; +$Format ||= qq{'__id__/TITLE:#'} + .qq{,'__Description__/TITLE:Description'} + .q{,__Stage__, __Condition__, __Action__, __Template__}; + + + +<%ARGS> +$id => undef +$title => undef +$Format => undef +@DeleteScrip => () + diff --git a/rt/share/html/Admin/Elements/EditTemplates b/rt/share/html/Admin/Elements/EditTemplates new file mode 100755 index 000000000..0bd68c2c0 --- /dev/null +++ b/rt/share/html/Admin/Elements/EditTemplates @@ -0,0 +1,127 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/ListActions, actions => \@actions &> + +
    + + +% unless ( $Templates->Count ) { +

    <&|/l&>(No templates)

    +% } else { + + +<& /Elements/CollectionList, + OrderBy => 'id', + Order => 'ASC', + %ARGS, + DisplayFormat => '__CheckBox.{DeleteTemplates}__,'. $Format, + Format => $Format, + Collection => $Templates, + AllowSorting => 1, + PassArguments => [qw(Format Rows Page Order OrderBy FindDisabledQueues)], +&> + +<&|/l&>(Check box to delete) +% } + +<& /Elements/Submit, Label => loc('Delete Template') &> +
    + +<%INIT> +my $dir_path = $m->request_comp->dir_path; +$Format ||= qq{'__id__/TITLE:#'} + .qq{,'__Name__/TITLE:Name'} + .qq{,'__Description__'}; + +my $QueueObj = RT::Queue->new( $session{'CurrentUser'} ); +$QueueObj->Load( $id ) if $id; + +my $Templates = RT::Templates->new($session{'CurrentUser'}); +if ( $QueueObj->id ) { + $Templates->LimitToQueue( $id ); +} +else { + $Templates->LimitToGlobal; +} + +# Now let callbacks add their extra limits +$m->callback( %ARGS, Templates => $Templates ); +$Templates->RedoSearch; + +# deal with deleting existing templates +my @actions; +# backwards compatibility, use DeleteTemplates array for this +foreach my $key (keys %ARGS) { + next unless $key =~ /^DeleteTemplate-(\d+)/; + push @DeleteTemplates, $1; +} + +foreach my $id( @DeleteTemplates ) { + my $TemplateObj = RT::Template->new( $session{'CurrentUser'} ); + $TemplateObj->Load( $id ); + unless ( $TemplateObj->id ) { + push @actions, loc("Couldn't load template #[_1]", $id); + next; + } + + my ($retval, $msg) = $TemplateObj->Delete; + if ( $retval ) { + push @actions, loc("Template #[_1] deleted", $id); + } + else { + push @actions, $msg; + } +} + +<%ARGS> +$id => 0 + +$Format => undef + +@DeleteTemplates => () + diff --git a/rt/share/html/Admin/Elements/EditUserComments b/rt/share/html/Admin/Elements/EditUserComments new file mode 100755 index 000000000..21bad8209 --- /dev/null +++ b/rt/share/html/Admin/Elements/EditUserComments @@ -0,0 +1,56 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => "Comments about $name" &> +<&|/l&>These comments aren't generally visible to the user:
    + + + + +<%ARGS> +$UserObj => undef + diff --git a/rt/share/html/Admin/Elements/GlobalCustomFieldTabs b/rt/share/html/Admin/Elements/GlobalCustomFieldTabs new file mode 100755 index 000000000..a53d7f24b --- /dev/null +++ b/rt/share/html/Admin/Elements/GlobalCustomFieldTabs @@ -0,0 +1,105 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/SystemTabs, subtabs => $tabs, + current_tab => 'Admin/Global/CustomFields/index.html', + current_subtab => $current_tab, + Title => $Title &> +<%INIT> + +my $tabs = { + + A => { + title => loc('Users'), + text => loc('Select custom fields for all users'), + path => 'Admin/Global/CustomFields/Users.html', + }, + + B => { + title => loc('Groups'), + text => loc('Select custom fields for all user groups'), + path => 'Admin/Global/CustomFields/Groups.html', + }, + + C => { + title => loc('Queues'), + text => loc('Select custom fields for all queues'), + path => 'Admin/Global/CustomFields/Queues.html', + }, + + F => { + title => loc('Tickets'), + text => loc('Select custom fields for tickets in all queues'), + path => 'Admin/Global/CustomFields/Queue-Tickets.html', + }, + + G => { + title => loc('Ticket Transactions'), + text => loc('Select custom fields for transactions on tickets in all queues'), + path => 'Admin/Global/CustomFields/Queue-Transactions.html', + }, + +}; + # Now let callbacks add their extra tabs + $m->callback( %ARGS, tabs => $tabs ); + + foreach my $tab (sort keys %{$tabs}) { + if ($tabs->{$tab}->{'path'} eq $current_tab) { + $tabs->{$tab}->{"subtabs"} = $subtabs; + $tabs->{$tab}->{"current_subtab"} = $current_subtab; + } + } + + + +<%ARGS> +$id => undef +$current_tab => '' +$subtabs => undef +$current_subtab => undef +$Title => undef + diff --git a/rt/share/html/Admin/Elements/GroupTabs b/rt/share/html/Admin/Elements/GroupTabs new file mode 100755 index 000000000..2b5bb6540 --- /dev/null +++ b/rt/share/html/Admin/Elements/GroupTabs @@ -0,0 +1,102 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Tabs, + subtabs => $tabs, + current_tab => 'Admin/Groups/', + current_subtab => $current_tab, + Title => $Title &> +<%INIT> +my $tabs; + +if ( $GroupObj and $GroupObj->id ) { +$tabs->{"this"} = { class => "currentnav", + path => "Admin/Groups/Modify.html?id=" . $GroupObj->id, + title => $GroupObj->Name, + current_subtab => $current_subtab, + subtabs => { + C => { title => loc('Basics'), + path => "Admin/Groups/Modify.html?id=" . $GroupObj->id }, + + D => { title => loc('Members'), + path => "Admin/Groups/Members.html?id=" . $GroupObj->id }, + + F => { title => loc('Group Rights'), + path => "Admin/Groups/GroupRights.html?id=" . $GroupObj->id, }, + G => { title => loc('User Rights'), + path => "Admin/Groups/UserRights.html?id=" . $GroupObj->id, }, + H => { title => loc('History'), + path => "Admin/Groups/History.html?id=" . $GroupObj->id }, + } +} +} +$tabs->{"A"} = { title => loc('Select'), + path => "Admin/Groups/", }; +$tabs->{"B"} = { title => loc('Create'), + path => "Admin/Groups/Modify.html?Create=1", + separator => 1, }; + +# Now let callbacks add their extra tabs +$m->callback( %ARGS, tabs => $tabs ); +foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) { + if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) { + $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs; + $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab; + } +} + $tabs->{'this'}->{"current_subtab"} = $current_tab; + $current_tab = "Admin/Groups/Modify.html?id=".$GroupObj->id if $GroupObj; + + +<%ARGS> +$GroupObj => undef +$subtabs => undef +$current_subtab => undef +$current_tab => undef +$Title => undef + + diff --git a/rt/share/html/Admin/Elements/Header b/rt/share/html/Admin/Elements/Header new file mode 100755 index 000000000..659c40b01 --- /dev/null +++ b/rt/share/html/Admin/Elements/Header @@ -0,0 +1,52 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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, %ARGS &> + +<%ARGS> +$Title => undef + diff --git a/rt/share/html/Admin/Elements/ListGlobalCustomFields b/rt/share/html/Admin/Elements/ListGlobalCustomFields new file mode 100755 index 000000000..d3777217c --- /dev/null +++ b/rt/share/html/Admin/Elements/ListGlobalCustomFields @@ -0,0 +1,61 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% my $count = 0; +% while (my $CustomFieldObj = $CustomFields->Next) { +% $count++; +<%$CustomFieldObj->id%>/<% loc($CustomFieldObj->Type) %>/<%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%> +
    +% } +% if (!$count) { +<&|/l&>(No custom fields) +% } + +<%init> +my $CustomFields = new RT::CustomFields ($session{'CurrentUser'}); +$CustomFields->LimitToGlobal(); + diff --git a/rt/share/html/Admin/Elements/ListGlobalScrips b/rt/share/html/Admin/Elements/ListGlobalScrips new file mode 100755 index 000000000..e03224a2d --- /dev/null +++ b/rt/share/html/Admin/Elements/ListGlobalScrips @@ -0,0 +1,71 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% unless ( $Scrips->Count ) { +

    <&|/l&>(No scrips)

    +% } else { + +<& /Elements/CollectionList, + OrderBy => 'Description', + Order => 'ASC', + Rows => 0, + %ARGS, + Format => $Format, + Collection => $Scrips, + ShowHeader => 0, +&> + +% } + +<%init> +my $Format = q{'__id__/TITLE:#'} + .q{,'__AutoDescription__/TITLE:Condition, Action and Template'} + .q{__NEWLINE__,'','__Description__'}; + +my $Scrips = RT::Scrips->new( $session{'CurrentUser'} ); +$Scrips->LimitToGlobal; + diff --git a/rt/share/html/Admin/Elements/ModifyTemplate b/rt/share/html/Admin/Elements/ModifyTemplate new file mode 100755 index 000000000..a0057617b --- /dev/null +++ b/rt/share/html/Admin/Elements/ModifyTemplate @@ -0,0 +1,84 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + + + + + + + + + + + +
    +<&|/l&>Name: + +
    +
    +<&|/l&>Description: + +
    +
    +<&|/l&>Content:
    +
    + +
    + +<%INIT> + + + +<%ARGS> +$Name => undef +$Description => undef +$Content => undef + diff --git a/rt/share/html/Admin/Elements/ObjectCustomFields b/rt/share/html/Admin/Elements/ObjectCustomFields new file mode 100644 index 000000000..d3fc28b8e --- /dev/null +++ b/rt/share/html/Admin/Elements/ObjectCustomFields @@ -0,0 +1,111 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> +<& $ObjectTabs, +$id ? ( + id => $Object->id, + current_tab => "Admin/$Types/CustomFields.html?$sub_type_url&id=".$id, + current_subtab => "Admin/$Types/CustomFields.html?$sub_type_url&id=".$id, + "${Type}Obj" => $Object, +) : ( + current_tab => "Admin/Global/CustomFields/${QualifiedType}s.html", +), + Title => $title + &> + +<& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object &> +<%INIT> +# XXX TODO: Validate here? +#$ObjectType =~ /^RT::(Queue|User|Group)$/ +# or Abort(loc("Object of type [_1] cannot take custom fields", $ObjectType), SuppressHeader => 1); + + + +my $Type = $1; +my $Types = $Type.'s'; +my $ObjectTabs; +my $Object = $ObjectType->new($session{'CurrentUser'}); + + +my $QualifiedType; +my $FriendlySubTypes; +if (defined $SubType && $SubType =~/^RT::(.*)$/) { + $FriendlySubTypes = RT::CustomField->new($session{'CurrentUser'})->FriendlyLookupType($Object->CustomFieldLookupType); + $QualifiedType = "$Type-$1"; +} else { + $QualifiedType = $Type; +} + +if ($id) { + $Object->Load($id) || Abort(loc("Couldn't load object [_1]", $id), SuppressHeader => 1); + $ObjectTabs = "/Admin/Elements/${Type}Tabs"; +} else { + $ObjectTabs = "/Admin/Elements/GlobalCustomFieldTabs"; + +} + +my $title; +if ($id) { +$title = loc('Edit Custom Fields for [_1]', $Object->Name); +} +elsif ($SubType) { + + $title= loc("Modify Custom Fields which apply to [_1] for all [_2]", loc(lc($FriendlySubTypes)), loc(lc($Types))); +} else { + $title =loc("Modify Custom Fields which apply to all [_1]", loc(lc($Types))); + +} +my $sub_type_url; +$sub_type_url = "SubType=$SubType" if $SubType; + + +<%ARGS> +$id => undef +$ObjectType +$SubType => undef + diff --git a/rt/share/html/Admin/Elements/PickCustomFields b/rt/share/html/Admin/Elements/PickCustomFields new file mode 100644 index 000000000..b27227990 --- /dev/null +++ b/rt/share/html/Admin/Elements/PickCustomFields @@ -0,0 +1,98 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 (@CustomFields == 0) { +

    <&|/l&>(None)

    +% } else { + +% my $count; +% foreach my $CustomFieldObj (@CustomFields) { + +% if (!$ReadOnly) { + +% } + + +% # show 'move up' unless it's the first item +% if ($count++ and $Checked) { + + +% } +
    + +/> + + +% if ($CustomFieldObj->Name) { +<%$CustomFieldObj->Name%> +% } else { +(<&|/l&>no name) +% } +
    + <%$CustomFieldObj->Description%> +
    + <% $CustomFieldObj->FriendlyTypeComposite %> + + [<&|/l&>Move up] +% } else { + +% } + +% # show 'move down' unless it's the last item +% if ($count != @CustomFields and $Checked) { +% $m->print(' | ') if $count > 1; + [<&|/l&>Move down] +% } +
    +% } +<%ARGS> +@CustomFields +$id +$ReadOnly => 0 +$Checked => 0 +$SubType + diff --git a/rt/share/html/Admin/Elements/PickObjects b/rt/share/html/Admin/Elements/PickObjects new file mode 100644 index 000000000..74e02c94f --- /dev/null +++ b/rt/share/html/Admin/Elements/PickObjects @@ -0,0 +1,81 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 (@Objects == 0) { +

    <&|/l&>(None)

    +% } else { + +% my $count; +% foreach my $Object (@Objects) { + +% my $id = "Object-".$Object->id."-CF-".$id; +% if (!$ReadOnly) { + +% } + + +% } +
    + +/> + + +
    +% } +<%ARGS> +@Objects +$id +$ReadOnly => 0 +$Checked => 0 + diff --git a/rt/share/html/Admin/Elements/QueueRightsForUser b/rt/share/html/Admin/Elements/QueueRightsForUser new file mode 100755 index 000000000..60651ee97 --- /dev/null +++ b/rt/share/html/Admin/Elements/QueueRightsForUser @@ -0,0 +1,64 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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(my $ACE = $ACL->Next) { + +
    • <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>) + +%} +
    + +<%INIT> +my $ACL = new RT::ACL($session{'CurrentUser'}); +$ACL->LimitToQueue($QueueObj->id); +$ACL->LimitPrincipalToUser($PrincipalId); + +<%ARGS> +$PrincipalId => undef +$QueueObj => undef + diff --git a/rt/share/html/Admin/Elements/QueueTabs b/rt/share/html/Admin/Elements/QueueTabs new file mode 100755 index 000000000..b4f2d1f27 --- /dev/null +++ b/rt/share/html/Admin/Elements/QueueTabs @@ -0,0 +1,123 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Tabs, + subtabs => $tabs, + current_tab => 'Admin/Queues/', + current_subtab => $current_tab, + Title => $Title &> + +<%INIT> +my $tabs; +if ($id) { + $tabs->{'this'} = { + title => $QueueObj->Name, + path => "Admin/Queues/Modify.html?id=".$id, + current_subtab => $current_tab, + subtabs => { + C => { title => loc('Basics'), + path => "Admin/Queues/Modify.html?id=".$id, + }, + D => { title => loc('Watchers'), + path => "Admin/Queues/People.html?id=".$id, + }, + + E => { title => loc('Scrips'), + path => "Admin/Queues/Scrips.html?id=".$id, + }, + F => { title => loc('Templates'), + path => "Admin/Queues/Templates.html?id=".$id, + }, + + G1 => { title => loc('Ticket Custom Fields'), + path => 'Admin/Queues/CustomFields.html?SubType=RT::Ticket&id='.$id, + }, + + G2 => { title => loc('Transaction Custom Fields'), + path => 'Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='.$id, + }, + + H => { title => loc('Group Rights'), + path => "Admin/Queues/GroupRights.html?id=".$id, + }, + I => { title => loc('User Rights'), + path => "Admin/Queues/UserRights.html?id=".$id, + }, + J => { title => loc('History'), + path => "Admin/Queues/History.html?id=" . $QueueObj->id + }, + } + }; +} +if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue')) { + $tabs->{"A"} = { title => loc('Select'), + path => "Admin/Queues/", + }; + $tabs->{"B"} = { title => loc('Create'), + path => "Admin/Queues/Modify.html?Create=1", + separator => 1, }; +} + + # Now let callbacks add their extra tabs + $m->callback( %ARGS, tabs => $tabs ); +foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) { + if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) { + $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs; + $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab; + } +} + $current_tab = "Admin/Queues/Modify.html?id=".$id if $id; + + +<%ARGS> +$QueueObj => undef +$id => undef +$subtabs => undef +$current_subtab => undef +$current_tab => undef +$Title => undef + diff --git a/rt/share/html/Admin/Elements/SelectCustomField b/rt/share/html/Admin/Elements/SelectCustomField new file mode 100644 index 000000000..1eb1f63c4 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectCustomField @@ -0,0 +1,71 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $CustomFields = RT::CustomFields->new($session{'CurrentUser'}); +$CustomFields->UnLimit; +$CustomFields->LimitToLookupType( $LookupType ) if $LookupType; +$CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } ); + +$Default = $Default->id || 0 if ref $Default; + +<%ARGS> +$None => 1 +$Name => 'BasedOn' +$Default => 0 +$LookupType => 'RT::Queue-RT::Ticket' +$OnlySelectionType => 1 +$Not => 0 + diff --git a/rt/share/html/Admin/Elements/SelectCustomFieldLookupType b/rt/share/html/Admin/Elements/SelectCustomFieldLookupType new file mode 100644 index 000000000..c4e7a56a4 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectCustomFieldLookupType @@ -0,0 +1,60 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $cf = RT::CustomField->new($session{'CurrentUser'}); + + +<%ARGS> +$Default=> '' +$Name => 'LookupType' + diff --git a/rt/share/html/Admin/Elements/SelectCustomFieldType b/rt/share/html/Admin/Elements/SelectCustomFieldType new file mode 100755 index 000000000..a37b80020 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectCustomFieldType @@ -0,0 +1,60 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $cf = RT::CustomField->new($session{'CurrentUser'}); + + +<%ARGS> +$Default=>undef +$Name => 'TypeComposite' + diff --git a/rt/share/html/Admin/Elements/SelectGroups b/rt/share/html/Admin/Elements/SelectGroups new file mode 100755 index 000000000..b6250251c --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectGroups @@ -0,0 +1,62 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $groups = new RT::Groups($session{'CurrentUser'}); +$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain); + + +<%ARGS> +$Name => 'groups' +$Domain => 'UserDefined'; + diff --git a/rt/share/html/Admin/Elements/SelectModifyGroup b/rt/share/html/Admin/Elements/SelectModifyGroup new file mode 100755 index 000000000..1bf4d22a7 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectModifyGroup @@ -0,0 +1,57 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ( $Group = $Groups->Next) { +<%$Group->id%>: <%$Group->Name%>
    +%} +<%INIT> +my ($Group); +my $Groups = new RT::Groups($session{'CurrentUser'}); +$Groups->UnLimit; + +<%ARGS> + diff --git a/rt/share/html/Admin/Elements/SelectModifyQueue b/rt/share/html/Admin/Elements/SelectModifyQueue new file mode 100755 index 000000000..f5ba69296 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectModifyQueue @@ -0,0 +1,57 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ( $queue = $queues->Next) { +<%$queue->id%>: <%$queue->Name%>
    +%} +<%INIT> +my ($queue); +my $queues = new RT::Queues($session{'CurrentUser'}); +$queues->UnLimit; + +<%ARGS> + diff --git a/rt/share/html/Admin/Elements/SelectModifyUser b/rt/share/html/Admin/Elements/SelectModifyUser new file mode 100755 index 000000000..32a60ba36 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectModifyUser @@ -0,0 +1,73 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ( $user = $users->Next) { +<%$user->id%>: <& /Elements/ShowUser, User => $user &>
    +%} +<%INIT> +my ($user); +my $users = new RT::Users($session{'CurrentUser'}); +$users->Limit(FIELD => 'id', + VALUE => $RT::SystemUser->id, + OPERATOR => '!=' ); + +if (defined $IdLike) { +$users->Limit(FIELD => 'Name', + VALUE => $IdLike, + OPERATOR => 'LIKE' ); +} +if (defined $EmailLike) { +$users->Limit(FIELD => 'EmailAddress', + VALUE => $EmailLike, + OPERATOR => 'LIKE'); + +} + +<%ARGS> +$IdLike => undef +$EmailLike => undef + diff --git a/rt/share/html/Admin/Elements/SelectNewGroupMembers b/rt/share/html/Admin/Elements/SelectNewGroupMembers new file mode 100755 index 000000000..1083b4359 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectNewGroupMembers @@ -0,0 +1,108 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ( $Show ne 'Groups' ) { +<&|/l&>Users +
    + +
    +% } + +% if ( $Show ne 'Users' ) { +<&|/l&>Groups +
    + +% } + +<%INIT> +my $users = new RT::Users($session{'CurrentUser'}); + +$users->Limit( + FIELD => 'id', + VALUE => $RT::SystemUser->id, + OPERATOR => '!=', + ENTRYAGGREGATOR => 'AND' +); +$users->Limit( + FIELD => 'id', + VALUE => $RT::Nobody->id, + OPERATOR => '!=', + ENTRYAGGREGATOR => 'AND' +); +$users->LimitToPrivileged(); + +my $groups = new RT::Groups($session{'CurrentUser'}); + +# self-recursive group membership considered harmful! +$groups->Limit(FIELD => 'id', VALUE => $Group->id, OPERATOR => '!=' ); +$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined'); + + + +<%ARGS> +$Name => 'Users' +$Show => 'All' +$Group +$SkipUsers => {} +$SkipGroups => {} + diff --git a/rt/share/html/Admin/Elements/SelectRights b/rt/share/html/Admin/Elements/SelectRights new file mode 100755 index 000000000..4c1940acc --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectRights @@ -0,0 +1,121 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + + + + +
    +<%PERL> +my %current_rights; +my @pairs; +while ( my $ace = $ACLObj->Next ) { + my $right = $ace->RightName; + $current_rights{ $right } = 1; + push @pairs, [$right, loc($right)]; +} +@pairs = sort { $a->[1] cmp $b->[1] } @pairs; + +

    <&|/l&>Current rights

    +% unless ( @pairs ) { +<&|/l&>No rights granted.
    +% } else { +(<&|/l&>Check box to revoke right)
    +% foreach my $pair ( @pairs ) { + <% $pair->[1] %>
    +% } } +
    +

    <&|/l&>New rights

    + +
    +<%INIT> + my ($ACLDesc, $AppliesTo, %Rights); + + # if the principal id points to a user, we really want to point + # to their ACL equivalence group. The machinations we're going through + # lead me to start to suspect that we really want users and groups + # to just be the same table. or _maybe_ that we want an object db. + my $princ = RT::Principal->new($RT::SystemUser); + $princ->Load($PrincipalId); + if ($princ->PrincipalType eq 'User') { + my $group = RT::Group->new($RT::SystemUser); + $group->LoadACLEquivalenceGroup($princ); + $PrincipalId = $group->PrincipalId; + } + + + my $ACLObj = new RT::ACL($session{'CurrentUser'}); + my $ACE = new RT::ACE($session{'CurrentUser'}); + + + $ACLObj->LimitToObject( $Object); + $ACLObj->LimitToPrincipal( Id => $PrincipalId); + $ACLObj->OrderBy(FIELD=>'RightName'); + + if (ref($Object) && UNIVERSAL::can($Object, 'AvailableRights')) { + %Rights = %{$Object->AvailableRights}; + } + + else { + %Rights = ( loc('System Error') => loc("No rights found") ); + } + + $ACLDesc = "$PrincipalId-".ref($Object)."-".$Object->Id; + + +<%ARGS> +$PrincipalType => undef +$PrincipalId => undef +$Object =>undef + diff --git a/rt/share/html/Admin/Elements/SelectScrip b/rt/share/html/Admin/Elements/SelectScrip new file mode 100755 index 000000000..b5f6e639d --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectScrip @@ -0,0 +1,72 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $Scrips = RT::Scrips->new($session{'CurrentUser'}); +$Scrips->UnLimit; + + + + +<%ARGS> + +$Default => undef +$Name => 'Scrip' + + diff --git a/rt/share/html/Admin/Elements/SelectScripAction b/rt/share/html/Admin/Elements/SelectScripAction new file mode 100755 index 000000000..f6d5bb23f --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectScripAction @@ -0,0 +1,73 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $ScripActions = RT::ScripActions->new($session{'CurrentUser'}); +$ScripActions->UnLimit; +$ScripActions->OrderBy(FIELD => 'Name'); + + + + +<%ARGS> + +$Default => undef +$Name => 'ScripAction' + + diff --git a/rt/share/html/Admin/Elements/SelectScripCondition b/rt/share/html/Admin/Elements/SelectScripCondition new file mode 100755 index 000000000..34e700d9e --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectScripCondition @@ -0,0 +1,72 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $ScripConditions = RT::ScripConditions->new($session{'CurrentUser'}); +$ScripConditions->UnLimit; +$ScripConditions->OrderBy(FIELD => 'Name'); + + + +<%ARGS> + +$Default => undef +$Name => 'ScripCondition' + + diff --git a/rt/share/html/Admin/Elements/SelectSingleOrMultiple b/rt/share/html/Admin/Elements/SelectSingleOrMultiple new file mode 100755 index 000000000..07d224b50 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectSingleOrMultiple @@ -0,0 +1,67 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ($SingleDefault, $MultipleDefault); +if ($Default == 1) { + $SingleDefault = qq[ selected="selected"]; +} +elsif ($Default == 0 ) { + $MultipleDefault = qq[ selected="selected"]; +} + + +<%ARGS> +$Name => 'Single' +$Default => 1 + diff --git a/rt/share/html/Admin/Elements/SelectStage b/rt/share/html/Admin/Elements/SelectStage new file mode 100644 index 000000000..3188d0ecc --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectStage @@ -0,0 +1,75 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 (my $Template = $PrimaryTemplates->Next) { + +%} +%while (my $Template = $OtherTemplates->Next) { + +%} + + +<%INIT> + + +my $PrimaryTemplates = RT::Templates->new($session{'CurrentUser'}); +if ($Queue != 0) { +$PrimaryTemplates->LimitToQueue($Queue); +$PrimaryTemplates->OrderBy(FIELD => 'Name'); +} + +my $OtherTemplates = RT::Templates->new($session{'CurrentUser'}); +$OtherTemplates->LimitToGlobal($DefaultQueue); +$OtherTemplates->OrderBy(FIELD => 'Name'); + + +<%ARGS> + +$Queue => undef +$Default => 'none' +$DefaultQueue => undef +$Name => 'Template' + + diff --git a/rt/share/html/Admin/Elements/SelectUsers b/rt/share/html/Admin/Elements/SelectUsers new file mode 100755 index 000000000..6ae6a1c52 --- /dev/null +++ b/rt/share/html/Admin/Elements/SelectUsers @@ -0,0 +1,66 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $users = new RT::Users($session{'CurrentUser'}); + +$users->Limit(FIELD => 'id', VALUE => $RT::SystemUser->id, OPERATOR => '!=' ); +$users->Limit(FIELD => 'id', VALUE => $RT::Nobody->id, OPERATOR => '!=' ); +$users->LimitToPrivileged(); + + +<%ARGS> +$Name => 'Users' + diff --git a/rt/share/html/Admin/Elements/ShowKeyInfo b/rt/share/html/Admin/Elements/ShowKeyInfo new file mode 100644 index 000000000..35d38a718 --- /dev/null +++ b/rt/share/html/Admin/Elements/ShowKeyInfo @@ -0,0 +1,91 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => $title &> +% if ( $res{'exit_code'} || !keys %{ $res{'info'} } ) { +<% loc('No keys for this address') %> +% } else { + + +% unless ( $Type eq 'private' ) { + +% } + + + + + + + +% foreach my $uinfo( @{ $res{'info'}{'User'} } ) { + + +% } + +
    <% loc('Trust') %>: <% loc( $res{'info'}{'Trust'} ) %>
    <% loc('Created') %>:<% $res{'info'}{'Created'}? $res{'info'}{'Created'}->AsString( Time => 0 ): loc('never') %>
    <% loc('Expire') %>:<% $res{'info'}{'Expire'}? $res{'info'}{'Expire'}->AsString( Time => 0 ): loc('never') %>
    <% loc('User (created - expire)') %>:<% $uinfo->{'String'} %>\ +(<% $uinfo->{'Created'}? $uinfo->{'Created'}->AsString( Time => 0 ): loc('never') %> - \ +<% $uinfo->{'Expire'}? $uinfo->{'Expire'}->AsString( Time => 0 ): loc('never') %>) +
    +% } + + +<%ARGS> +$EmailAddress +$Type => 'public' + +<%INIT> +require RT::Crypt::GnuPG; +my %res = RT::Crypt::GnuPG::GetKeyInfo( $EmailAddress, $Type ); + +my $title; +unless ( $Type eq 'private' ) { + $title = loc('GnuPG public key(s) for [_1]', $EmailAddress); +} else { + $title = loc('GnuPG private key(s) for [_1]', $EmailAddress); +} + + diff --git a/rt/share/html/Admin/Elements/SystemTabs b/rt/share/html/Admin/Elements/SystemTabs new file mode 100755 index 000000000..4a20dab58 --- /dev/null +++ b/rt/share/html/Admin/Elements/SystemTabs @@ -0,0 +1,102 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Tabs, subtabs => $tabs, + current_tab => 'Admin/Global/', + current_subtab => $current_tab, + Title => $Title &> + +<%INIT> + my $tabs = { + + A => { title => loc('Scrips'), + path => 'Admin/Global/Scrips.html', + }, + B => { title => loc('Templates'), + path => 'Admin/Global/Templates.html', + }, + + F => { title => loc('Custom Fields'), + path => 'Admin/Global/CustomFields/index.html', + }, + + G => { title => loc('Group Rights'), + path => 'Admin/Global/GroupRights.html', + }, + H => { title => loc('User Rights'), + path => 'Admin/Global/UserRights.html', + }, + I => { title => loc('RT at a glance'), + path => 'Admin/Global/MyRT.html', + }, + +}; + +# Use current $tabs as $subtabs if there is no $subtabs for this tab +$subtabs = ($subtabs) ? $subtabs : $tabs; + + # Now let callbacks add their extra tabs + $m->callback( %ARGS, tabs => $tabs ); + + if ($current_tab) { + foreach my $tab (sort keys %{$tabs}) { + if ($tabs->{$tab}->{'path'} eq $current_tab) { + $tabs->{$tab}->{"subtabs"} = $subtabs; + $tabs->{$tab}->{"current_subtab"} = $current_subtab; + } + } + } + + + +<%ARGS> +$id => undef +$current_tab => undef +$subtabs => undef +$current_subtab => undef +$Title => undef + diff --git a/rt/share/html/Admin/Elements/Tabs b/rt/share/html/Admin/Elements/Tabs new file mode 100755 index 000000000..f7b0ad7ef --- /dev/null +++ b/rt/share/html/Admin/Elements/Tabs @@ -0,0 +1,95 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Tabs, + tabs => $tabs, + current_toptab => 'Admin/', + current_tab => $current_tab, + Title => $Title &> + +<%INIT> + my $tabs = { A => { title => loc('Users'), + path => 'Admin/Users/', + }, + B => { title => loc('Groups'), + path => 'Admin/Groups/', + }, + C => { title => loc('Queues'), + path => 'Admin/Queues/', + }, + D => { 'title' => loc('Custom Fields'), + path => 'Admin/CustomFields/', + }, + E => { 'title' => loc('Global'), + path => 'Admin/Global/', + }, + F => { 'title' => loc('Tools'), + path => 'Admin/Tools/', + }, + }; + + # Now let callbacks add their extra tabs + $m->callback( %ARGS, tabs => $tabs ); + + if( defined $current_tab ) { + foreach my $tab (keys %{$tabs}) { + if ($tabs->{$tab}->{'path'} eq $current_tab) { + $tabs->{$tab}->{"subtabs"} = $subtabs; + $tabs->{$tab}->{"current_subtab"} = $current_subtab; + } + } + } + + + + +<%ARGS> +$subtabs => undef +$current_tab => undef +$current_subtab => undef +$Title => undef + diff --git a/rt/share/html/Admin/Elements/ToolTabs b/rt/share/html/Admin/Elements/ToolTabs new file mode 100755 index 000000000..d8be841b9 --- /dev/null +++ b/rt/share/html/Admin/Elements/ToolTabs @@ -0,0 +1,82 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Tabs, + Title => $Title, + current_tab => 'Admin/Tools/', + subtabs => $tabs, + current_subtab => $current_tab, +&> + +<%INIT> + my $tabs = { + A => { title => loc('System Configuration'), + path => 'Admin/Tools/Configuration.html', + }, + E => { title => loc('Shredder'), + path => 'Admin/Tools/Shredder/', + }, + }; + + # Now let callbacks add their extra tabs + $m->callback( %ARGS, tabs => $tabs ); + + foreach my $tab ( values %{$tabs} ) { + next unless $tab->{'path'} eq $current_tab; + + $tab->{"subtabs"} = $subtabs; + $tab->{"current_subtab"} = $current_subtab; + } + + +<%ARGS> +$id => undef +$current_tab => undef +$subtabs => undef +$current_subtab => undef +$Title => undef + diff --git a/rt/share/html/Admin/Elements/UserTabs b/rt/share/html/Admin/Elements/UserTabs new file mode 100755 index 000000000..a5c3d9a2b --- /dev/null +++ b/rt/share/html/Admin/Elements/UserTabs @@ -0,0 +1,116 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Tabs, + subtabs => $tabs, + current_tab => 'Admin/Users/', + current_subtab => $current_tab, + Title => $Title &> +<%INIT> +my $tabs; +if ($id) { +$tabs->{'this'} = { title => eval { $UserObj->Name }, + + path => "Admin/Users/Modify.html?id=".$id, +subtabs => { + Basics => { title => loc('Basics'), + path => "Admin/Users/Modify.html?id=".$id + }, + Memberships => { title => loc('Memberships'), + path => "Admin/Users/Memberships.html?id=".$id + }, + 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 + }, + } +}; + if ( RT->Config->Get('GnuPG')->{'Enable'} ) { + $tabs->{'this'}{'subtabs'}{'GnuPG'} = { + title => loc('GnuPG'), + path => "Admin/Users/GnuPG.html?id=".$id, + }; + } +} + +if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers')) { + $tabs->{"A"} = { title => loc('Select'), + path => "Admin/Users/", + }; + $tabs->{"B"} = { title => loc('Create'), + path => "Admin/Users/Modify.html?Create=1", + separator => 1, + }; +} + + # Now let callbacks add their extra tabs + $m->callback( %ARGS, tabs => $tabs ); + +#foreach my $tab ( sort keys %{$tabs} ) { +# if ( $tabs->{$tab}->{'path'} eq $current_subtab ) { +# $tabs->{$tab}->{"current_subtab"} = $current_subtab; +# } +#} +foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) { + if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) { + $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs; + $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab; + } +} +$tabs->{'this'}->{"current_subtab"} = $current_tab; +$current_tab = "Admin/Users/Modify.html?id=".$id if $id; + +<%ARGS> +$UserObj => undef +$id => undef +$current_tab => undef +$subtabs => undef +$current_subtab => undef +$Title => undef + diff --git a/rt/share/html/Admin/Global/CustomFields/Groups.html b/rt/share/html/Admin/Global/CustomFields/Groups.html new file mode 100644 index 000000000..3b26aabfa --- /dev/null +++ b/rt/share/html/Admin/Global/CustomFields/Groups.html @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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", + current_subtab => "Admin/Global/CustomFields/Groups.html", + Title => $title + &> + <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Group', Object=> $object &> +<%INIT> + my $title = loc( 'Edit Custom Fields for all groups'); + my $object = RT::Group->new($session{'CurrentUser'}); + diff --git a/rt/share/html/Admin/Global/CustomFields/Queue-Tickets.html b/rt/share/html/Admin/Global/CustomFields/Queue-Tickets.html new file mode 100755 index 000000000..3ed3f3631 --- /dev/null +++ b/rt/share/html/Admin/Global/CustomFields/Queue-Tickets.html @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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", + current_subtab => "Admin/Global/CustomFields/Queue-Tickets.html", + Title => $title + &> + <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object, SubType => 'RT::Ticket' &> +<%INIT> + my $title = loc( 'Edit Custom Fields for tickets in all queues'); + my $object = RT::Queue->new($session{'CurrentUser'}); + diff --git a/rt/share/html/Admin/Global/CustomFields/Queue-Transactions.html b/rt/share/html/Admin/Global/CustomFields/Queue-Transactions.html new file mode 100755 index 000000000..ea037a42b --- /dev/null +++ b/rt/share/html/Admin/Global/CustomFields/Queue-Transactions.html @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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", + current_subtab => "Admin/Global/CustomFields/Queue-Transactions.html", + Title => $title + &> + <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object, SubType => 'RT::Ticket-RT::Transaction' &> +<%INIT> + my $title = loc( 'Edit Custom Fields for tickets in all queues'); + my $object = RT::Queue->new($session{'CurrentUser'}); + diff --git a/rt/share/html/Admin/Global/CustomFields/Queues.html b/rt/share/html/Admin/Global/CustomFields/Queues.html new file mode 100644 index 000000000..72c9489e0 --- /dev/null +++ b/rt/share/html/Admin/Global/CustomFields/Queues.html @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Queues.html", + current_subtab => "Admin/Global/CustomFields/Queues.html", + Title => $title + &> + <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object &> +<%INIT> + my $title = loc( 'Edit Custom Fields for all queues'); + my $object = RT::Queue->new($session{'CurrentUser'}); + diff --git a/rt/share/html/Admin/Global/CustomFields/Users.html b/rt/share/html/Admin/Global/CustomFields/Users.html new file mode 100644 index 000000000..a8fbd7c74 --- /dev/null +++ b/rt/share/html/Admin/Global/CustomFields/Users.html @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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", + current_subtab => "Admin/Global/CustomFields/Users.html", + Title => $title + &> + <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::User', Object=> $object &> +<%INIT> + my $title = loc( 'Edit Custom Fields for all users'); + my $object = RT::User->new($session{'CurrentUser'}); + diff --git a/rt/share/html/Admin/Global/CustomFields/index.html b/rt/share/html/Admin/Global/CustomFields/index.html new file mode 100644 index 000000000..e6ea0d688 --- /dev/null +++ b/rt/share/html/Admin/Global/CustomFields/index.html @@ -0,0 +1,99 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% $m->callback( %ARGS, tabs => $tabs ); +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/GlobalCustomFieldTabs, Title => $title &> + + + +<%INIT> +my $title = loc("Global custom field configuration"); + +my $tabs = { + + A => { + title => loc('Users'), + text => loc('Select custom fields for all users'), + path => 'Users.html', + }, + B => { + title => loc('Groups'), + text => loc('Select custom fields for all user groups'), + path => 'Groups.html', + }, + + C => { + title => loc('Queues'), + text => loc('Select custom fields for all queues'), + path => 'Queues.html', + }, + + F => { + title => loc('Tickets'), + text => loc('Select custom fields for tickets in all queues'), + path => 'Queue-Tickets.html', + }, + + G => { + title => loc('Ticket Transactions'), + text => + loc('Select custom fields for transactions on tickets in all queues'), + path => 'Queue-Transactions.html', + }, + +}; + + +$m->callback( tabs => $tabs ); + diff --git a/rt/share/html/Admin/Global/GroupRights.html b/rt/share/html/Admin/Global/GroupRights.html new file mode 100755 index 000000000..cec1d9044 --- /dev/null +++ b/rt/share/html/Admin/Global/GroupRights.html @@ -0,0 +1,123 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Modify global group rights') &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/GroupRights.html', + Title => loc('Modify global group rights') &> +<& /Elements/ListActions, actions => \@results &> + +
    + +<&| /Widgets/TitleBox, title => loc('Modify global group rights.')&> + +

    <&|/l&>System groups

    + +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToSystemInternalGroups(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
    + <% loc($Group->Type) %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object =>$RT::System &> +
    +

    <&|/l&>Roles

    + +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToRolesForSystem(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
    + <% loc($Group->Type) %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $RT::System &> +
    +

    <&|/l&>User defined groups

    + +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToUserDefinedGroups(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
    + <% $Group->Name %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $RT::System &> +
    + + + <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &> + +
    + +<%INIT> + + #Update the acls. + my @results = ProcessACLChanges(\%ARGS); + + +my $Groups; + + + +<%ARGS> + diff --git a/rt/share/html/Admin/Global/MyRT.html b/rt/share/html/Admin/Global/MyRT.html new file mode 100644 index 000000000..1511173a3 --- /dev/null +++ b/rt/share/html/Admin/Global/MyRT.html @@ -0,0 +1,112 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> +
    +% for my $pane (@panes) { +<&|/Widgets/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &> +<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &> +
    +% } +<%init> +my @actions; + +my @items = map { [ "component-$_", $_ ] } sort @{ RT->Config->Get('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 $has_right = $session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser'); + +my @panes = $m->comp( + '/Admin/Elements/ConfigureMyRT', + panes => ['body', 'summary'], + Action => 'MyRT.html', + items => \@items, + ReadOnly => !$has_right, + current_portlets => $default_portlets->Content, + OnSave => sub { + my ( $conf, $pane ) = @_; + if (!$has_right) { + push @actions, loc( 'Permission denied' ); + } + else { + $default_portlets->SetContent( $conf ); + push @actions, loc( 'Global portlet [_1] saved.', $pane ); + } + } +); + +$m->comp( '/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1 ) + for @panes; + + + + diff --git a/rt/share/html/Admin/Global/Scrip.html b/rt/share/html/Admin/Global/Scrip.html new file mode 100755 index 000000000..e2fc7414b --- /dev/null +++ b/rt/share/html/Admin/Global/Scrip.html @@ -0,0 +1,86 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/SystemTabs, + current_tab => 'Admin/Global/Scrips.html', + current_subtab => $current_subtab, + subtabs => $subtabs, + Title => $title &> + +<& /Elements/ListActions, actions => \@results &> +<& /Admin/Elements/EditScrip, title => $title, %ARGS, id => $id &> + +<%init> +my $subtabs = { + A => { + title => loc('Select'), + path => "Admin/Global/Scrips.html", + }, + B => { + title => loc('New'), + path => "Admin/Global/Scrip.html?create=1&Queue=0", + separator => 1, + }, +}; + +my ($id, @results) = $m->comp( '/Admin/Elements/EditScrip:Process', %ARGS ); + +my ($title, $current_subtab); +if ( $id ) { + $current_subtab = "Admin/Global/Scrip.html?id=$id&Queue=0"; + $title = loc("Modify a scrip that applies to all queues"); + $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"; + $title = loc("Add a scrip which will apply to all queues"); +} + diff --git a/rt/share/html/Admin/Global/Scrips.html b/rt/share/html/Admin/Global/Scrips.html new file mode 100755 index 000000000..da72e8f77 --- /dev/null +++ b/rt/share/html/Admin/Global/Scrips.html @@ -0,0 +1,77 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/SystemTabs, + current_tab => 'Admin/Global/Scrips.html', + current_subtab => 'Admin/Global/Scrips.html', + subtabs => $subtabs, + Title => $title &> +<& /Admin/Elements/EditScrips, title => $title, id => $id, %ARGS &> + +<%init> + +my $subtabs = { + A => { title => loc('Select'), + path => "Admin/Global/Scrips.html", + }, + B => { title => loc('New'), + path => "Admin/Global/Scrip.html?create=1&Queue=0", + separator => 1, + } + }; +my $title = loc("Modify scrips which apply to all queues"); + +my (@actions); + + + + + +<%ARGS> +$id => 0 + diff --git a/rt/share/html/Admin/Global/Template.html b/rt/share/html/Admin/Global/Template.html new file mode 100755 index 000000000..f833f8ee0 --- /dev/null +++ b/rt/share/html/Admin/Global/Template.html @@ -0,0 +1,123 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/SystemTabs, + current_tab => 'Admin/Global/Templates.html', + current_subtab => $current_subtab, + subtabs => $subtabs, + Title => $title &> +<& /Elements/ListActions, actions => \@results &> + +
    +%if ($Create ) { + +% } else { + +% } + +%# hang onto the queue id + +<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description => +$TemplateObj->Description, Content => $TemplateObj->Content &> +<& /Elements/Submit, Label => $SubmitLabel, Reset => 1 &> +
    + + +<%INIT> + +my $TemplateObj = new RT::Template($session{'CurrentUser'}); +my ($title, @results, $current_subtab, $SubmitLabel); + +my $subtabs = { + A => { title => loc('Select'), + path => "Admin/Global/Templates.html" + }, + B => { title => loc('New'), + path => "Admin/Global/Template.html?Create=1&Queue=0", + separator => 1, + } + }; + +if ($Create) { + $title = loc("Create a template"); + $current_subtab = "Admin/Global/Template.html?Create=1&Queue=0"; + $SubmitLabel = loc('Create'); +} + +else { + if (defined ($Template) && $Template eq 'new') { + my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name); + Abort(loc("Could not create template: [_1]", $msg)) unless ($val); + push @results, $msg; + } + else { + $TemplateObj->Load($Template) || Abort(loc('No Template')); + } + $title = loc('Modify template [_1]', loc($TemplateObj->Name())); + $SubmitLabel = loc('Save Changes'); + +} +if ($TemplateObj->Id()) { + my @attribs = qw( Description Content Queue Name); + my @aresults = UpdateRecordObject( AttributesRef => \@attribs, + Object => $TemplateObj, + ARGSRef => \%ARGS); + $current_subtab = "Admin/Global/Template.html?Queue=0&Template=".$TemplateObj->Id(); + $subtabs->{"C"} = { title => loc('Template #[_1]', $TemplateObj->Id()), + path => "Admin/Global/Template.html?Queue=0&Template=".$TemplateObj->Id(), + }; + push @results, @aresults; +} + + +<%ARGS> +$Queue => undef +$Template => undef +$Create => undef +$Name => undef + diff --git a/rt/share/html/Admin/Global/Templates.html b/rt/share/html/Admin/Global/Templates.html new file mode 100755 index 000000000..b918e145b --- /dev/null +++ b/rt/share/html/Admin/Global/Templates.html @@ -0,0 +1,77 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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, FeedURI => 'templates' &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/Templates.html', + current_subtab => 'Admin/Global/Templates.html', + subtabs => $subtabs, + Title => $title &> +<& /Admin/Elements/EditTemplates, title => $title, %ARGS &> + +<%init> + +my $subtabs = { + A => { title => loc('Select'), + path => "Admin/Global/Templates.html" + }, + B => { title => loc('New'), + path => "Admin/Global/Template.html?Create=1&Queue=0", + separator => 1, + } + }; +my $title = loc("Modify templates which apply to all queues"); + +my (@actions); + + + + + +<%ARGS> +$id => undef + diff --git a/rt/share/html/Admin/Global/UserRights.html b/rt/share/html/Admin/Global/UserRights.html new file mode 100755 index 000000000..7a56592ec --- /dev/null +++ b/rt/share/html/Admin/Global/UserRights.html @@ -0,0 +1,99 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Modify global user rights') &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/UserRights.html', + Title => loc('Modify global user rights') &> +<& /Elements/ListActions, actions => \@results &> + +
    + +<&| /Widgets/TitleBox, title => loc('Modify global user rights.') &> + + +% while ( my $UserObj = $Users->Next ) { +% my $group = RT::Group->new($session{'CurrentUser'}); +% $group->LoadACLEquivalenceGroup( $UserObj ); + + + + +% } +
    <& /Elements/ShowUser, User => $UserObj &><& /Admin/Elements/SelectRights, + PrincipalId => $group->PrincipalId, + Object => $RT::System, + &>
    + + +<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &> + +
    +<%INIT> + + #Update the acls. + my @results = ProcessACLChanges(\%ARGS); + +# {{{ Deal with setting up the display of current rights. + + +# Find out which users we want to display ACL selects for +my $Privileged = RT::Group->new($session{'CurrentUser'}); +$Privileged->LoadSystemInternalGroup('Privileged'); +my $Users = $Privileged->UserMembersObj(); +$Users->OrderBy( FIELD => $UserOrderBy, ORDER => $UserOrder ); + + + +# }}} + + + +<%ARGS> +$UserOrderBy => 'Name' +$UserOrder => 'ASC' + diff --git a/rt/share/html/Admin/Global/index.html b/rt/share/html/Admin/Global/index.html new file mode 100755 index 000000000..4ddd5c4ab --- /dev/null +++ b/rt/share/html/Admin/Global/index.html @@ -0,0 +1,86 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% $m->callback( %ARGS, tabs => $tabs ); +<& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &> +<& /Admin/Elements/SystemTabs, + Title => loc('Admin/Global configuration') &> + <& /Elements/ListMenu, items => $tabs &> +<%INIT> + my $tabs = { + + A => { title => loc('Scrips'), + text => loc('Modify scrips which apply to all queues'), + path => '/Admin/Global/Scrips.html', + }, + B => { title => loc('Templates'), + text => loc('Edit system templates'), + path => '/Admin/Global/Templates.html', + }, + + F => { title => loc('Custom Fields'), + text => loc('Modify global custom fields'), + path => '/Admin/Global/CustomFields/index.html', + }, + + G => { title => loc('Group Rights'), + text => loc('Modify global group rights'), + path => '/Admin/Global/GroupRights.html', + }, + H => { title => loc('User Rights'), + text => loc('Modify global user rights'), + path => '/Admin/Global/UserRights.html', + }, + I => { title => loc('RT at a glance'), + text => loc('Modify the default "RT at a glance" view'), + path => '/Admin/Global/MyRT.html', + }, + + + +}; + diff --git a/rt/share/html/Admin/Groups/CustomFields.html b/rt/share/html/Admin/Groups/CustomFields.html new file mode 100644 index 000000000..af76dcfb1 --- /dev/null +++ b/rt/share/html/Admin/Groups/CustomFields.html @@ -0,0 +1,48 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/ObjectCustomFields, %ARGS, ObjectType => 'RT::Group' &> diff --git a/rt/share/html/Admin/Groups/GroupRights.html b/rt/share/html/Admin/Groups/GroupRights.html new file mode 100755 index 000000000..0c11751cb --- /dev/null +++ b/rt/share/html/Admin/Groups/GroupRights.html @@ -0,0 +1,119 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Modify group rights for group [_1]', $GroupObj->Name) &> +<& /Admin/Elements/GroupTabs, + GroupObj => $GroupObj, + current_tab => 'Admin/Groups/GroupRights.html?id='.$id, + Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &> +<& /Elements/ListActions, actions => \@results &> + +
    + + +<&| /Widgets/TitleBox, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &> + +

    <&|/l&>System groups

    + +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToSystemInternalGroups(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
    + <% loc($Group->Type) %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + PrincipalType => 'Group', + Object => $GroupObj &> +
    +

    <&|/l&>User defined groups

    + +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToUserDefinedGroups(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
    + <% $Group->Name %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + PrincipalType => 'Group', + Object => $GroupObj &> +
    + + + <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &> + +
    + +<%INIT> + + #Update the acls. + my @results = ProcessACLChanges(\%ARGS); + + +if (!defined $id) { + Abort(loc("No Group defined")); +} + +my $GroupObj = RT::Group->new($session{'CurrentUser'}); +$GroupObj->Load($id) || Abort(loc("Couldn't load group [_1]",$id)); + +my $Groups; + + + +<%ARGS> +$id => undef + diff --git a/rt/share/html/Admin/Groups/History.html b/rt/share/html/Admin/Groups/History.html new file mode 100644 index 000000000..cde7c3f0c --- /dev/null +++ b/rt/share/html/Admin/Groups/History.html @@ -0,0 +1,68 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/GroupTabs, + id => $id, + GroupObj => $GroupObj, + current_subtab => $current_tab, + Title => $title &> + +<& /Ticket/Elements/ShowHistory, + Ticket => $GroupObj, + ShowDisplayModes => 0, +&> + +<%INIT> +my $current_tab = 'Admin/Groups/History.html?id='.$id; +my $GroupObj = new RT::Group($session{'CurrentUser'}); +$GroupObj->Load($id) || Abort("Couldn't load group '$id'"); +my $title = loc("History of the group [_1]", $GroupObj->Name); + +<%ARGS> +$id => '' unless defined $id + diff --git a/rt/share/html/Admin/Groups/Members.html b/rt/share/html/Admin/Groups/Members.html new file mode 100755 index 000000000..62bd8c843 --- /dev/null +++ b/rt/share/html/Admin/Groups/Members.html @@ -0,0 +1,159 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Admin/Edit the group [_1]', $Group->Name) &> +<& /Admin/Elements/GroupTabs, GroupObj => $Group, + current_tab => 'Admin/Groups/Members.html?id='.$id, + Title => "RT/Admin/Edit the group ". $Group->Name &> +<& /Elements/ListActions, actions => \@results &> + +
    + + +<&| /Widgets/TitleBox, title => loc('Editing membership for group [_1]', $Group->Name) &> + + + + + + + + + + + +
    +

    <&|/l&>Current members

    +
    +

    <&|/l&>Add members

    +
    + +% if ($Group->MembersObj->Count == 0 ) { +<&|/l&>(No members) +% } else { +<&|/l&>Users +% my $Users = $Group->UserMembersObj( Recursively => 0 ); +<%perl> +my @users = sort { lc($a->[0]) cmp lc($b->[0]) } + map { [$m->scomp("/Elements/ShowUser", User => $_), $_] } + @{ $Users->ItemsArrayRef }; + +
      +% for (@users) { +% my ($rendered, $user) = @$_; +% $UsersSeen{ $user->id } = 1 if $SkipSeenUsers; +
    • +<% $rendered |n%>
    • +% } +
    +<&|/l&>Groups +
      +% my $GroupMembers = $Group->MembersObj; +% $GroupMembers->LimitToGroups(); +% while ( my $member = $GroupMembers->Next ) { +% $GroupsSeen{ $member->MemberId } = 1 if $SkipSeenGroups; +
    • +<% $member->MemberObj->Object->Name %> +% } +
    +% } +
    +<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group, + SkipUsers => \%UsersSeen, SkipGroups => \%GroupsSeen &> +
    + +<&|/l&>(Check box to delete) +<& /Elements/Submit, Label => loc('Modify Members'), Reset => 1 &> +
    + + +<%INIT> + +my $Group = new RT::Group($session{'CurrentUser'}); +$Group->Load($id) || Abort(loc('Could not load group')); + +my (%UsersSeen, %GroupsSeen); +$GroupsSeen{ $Group->id } = 1; # can't be a member of ourself + +my (@results); + +# XXX: safe member id in value instead of name +foreach my $key (keys %ARGS) { + next unless $key =~ /^DeleteMember-(\d+)$/; + + my ($val,$msg) = $Group->DeleteMember($1); + push (@results, $msg); +} + +foreach my $member (grep $_, @AddMembersUsers, @AddMembersGroups) { + + my $principal; + + if ($member =~ /^Group-(\d+)$/) { + $principal = RT::Group->new($session{'CurrentUser'}); + $principal->Load($1); + } elsif ($member =~ /^User-(\d+)$/) { + $principal = RT::User->new($session{'CurrentUser'}); + $principal->Load($1); + } else { + next; + } + + + my ($val, $msg) = $Group->AddMember($principal->PrincipalId); + push (@results, $msg); +} + + + +<%ARGS> +@AddMembersUsers => () +@AddMembersGroups => () +$id => undef +$SkipSeenUsers => 1 +$SkipSeenGroups => 1 + diff --git a/rt/share/html/Admin/Groups/Modify.html b/rt/share/html/Admin/Groups/Modify.html new file mode 100755 index 000000000..81b8ca740 --- /dev/null +++ b/rt/share/html/Admin/Groups/Modify.html @@ -0,0 +1,178 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/GroupTabs, + GroupObj => $Group, + current_tab => $current_tab, + Title => $title &> +<& /Elements/ListActions, actions => \@results &> + + + +
    + +%unless ($Group->Id) { + +% } else { + +% } + + + + + + + +% my $CFs = $Group->CustomFields; +% while (my $CF = $CFs->Next) { + +% } + + + +% $m->callback( %ARGS, GroupObj => $Group, results => \@results ); +
    +<&|/l&>Name: +
    +<&|/l&>Description:
    +<% loc($CF->Name) %>: + +<& /Elements/EditCustomField, CustomField => $CF, + Object => $Group, + ($Create ? (NamePrefix => 'Object-RT::Group--CustomField-') + : () )&> +
    + + /> <&|/l&>Enabled (Unchecking this box disables this group)
    +
    +% if ( $Create ) { +<& /Elements/Submit, Label => loc('Create'), Reset => 1 &> +% } else { +<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &> +% } +
    +<%INIT> + +my $current_tab; +my ($title, @results, $Disabled, $EnabledChecked); + +my $Group = RT::Group->new($session{'CurrentUser'}); + +if ($Create) { + $current_tab = 'Admin/Groups/Modify.html?Create=1'; + $title = loc("Create a new group"); +} + +else { + $current_tab = 'Admin/Groups/Modify.html?id='.$id; + if ($id eq 'new' ) { + + my ($create_id, $create_msg) = $Group->CreateUserDefinedGroup(Name => + "$Name"); + unless ($create_id) { + Abort (loc("Group could not be created: [_1]", $create_msg)); + } + $id = $Group->Id; + } + else { + $Group->Load($id) || Abort('Could not load group'); + } + + + if ($id) { + $title = loc("Modify the group [_1]", $Group->Name); + + } + + # If the create failed + else { + $title = loc("Create a new group"); + $Create = 1; + } + +} + +if ($id) { + + my @fields = qw(Description Name ); + my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields, + Object => $Group, + ARGSRef => \%ARGS ); + push (@results,@fieldresults); + push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $Group ); +} + +#we're asking about enabled on the web page but really care about disabled. +if (defined $Enabled && $Enabled == 1) { + $Disabled = 0; +} +else { + $Disabled = 1; +} +if ( ($SetEnabled) and ( $Disabled != $Group->Disabled) ) { + my ($code, $msg) = $Group->SetDisabled($Disabled); + push @results, $msg; +} + +unless ($Group->Disabled()) { + $EnabledChecked ='checked="checked"'; +} + + + + + +<%ARGS> +$Create => undef +$Name => undef +$Description => undef +$SetEnabled => undef +$Enabled => undef +$id => '' unless defined $id + diff --git a/rt/share/html/Admin/Groups/UserRights.html b/rt/share/html/Admin/Groups/UserRights.html new file mode 100755 index 000000000..619a076d0 --- /dev/null +++ b/rt/share/html/Admin/Groups/UserRights.html @@ -0,0 +1,112 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Modify user rights for group [_1]', $GroupObj->Name) &> +<& /Admin/Elements/GroupTabs, + GroupObj => $GroupObj, + current_tab => 'Admin/Groups/UserRights.html?id='.$id, + Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &> +<& /Elements/ListActions, actions => \@results &> + +
    + + +<&| /Widgets/TitleBox, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &> + +% while ( my $Member = $Users->Next ) { +% my $UserObj = $Member->MemberObj->Object; + + + + +% } +
    <& /Elements/ShowUser, User => $UserObj &><& /Admin/Elements/SelectRights, + PrincipalId => $Member->MemberObj->Id, + PrincipalType => 'User', + Object => $GroupObj, + &>
    + + +<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &> + +
    + +<%INIT> + + #Update the acls. + my @results = ProcessACLChanges(\%ARGS); + +# {{{ Deal with setting up the display of current rights. + + +#Define vars used in html above + + +if (!defined $id) { + Abort(loc("No Group defined")); +} + +my $GroupObj = RT::Group->new($session{'CurrentUser'}); +$GroupObj->Load($id) || Abort(loc("Couldn't load group [_1]",$id)); + +# Find out which users we want to display ACL selects for +my $Privileged = RT::Group->new($session{'CurrentUser'}); +$Privileged->LoadSystemInternalGroup('Privileged'); +my $Users = $Privileged->MembersObj(); + + + +# }}} + + + +<%ARGS> +$id => undef +$UserString => undef +$UserOp => undef +$UserField => undef + diff --git a/rt/share/html/Admin/Groups/index.html b/rt/share/html/Admin/Groups/index.html new file mode 100755 index 000000000..078f51bd9 --- /dev/null +++ b/rt/share/html/Admin/Groups/index.html @@ -0,0 +1,129 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/GroupTabs, current_tab => 'Admin/Groups/', + current_subtab => 'Admin/Groups/', + Title => $title &> +<% $caption %>:
    + +% unless ( $Groups->Count ) { +<&|/l&>No groups matching search criteria found. +% } else { + +<& /Elements/CollectionList, + OrderBy => 'Name', + Order => 'ASC', + Rows => 100, + %ARGS, + Format => $Format, + Collection => $Groups, + AllowSorting => 1, + PassArguments => [qw(Format Rows Page Order OrderBy GroupString GroupOp GroupField FindDisabledGroups)], +&> + +% my $ids = join ',', map $_->id, @{ $Groups->ItemsArrayRef }; +% if ( $ids ) { + +% } + +

    +% } + +
    + /> <&|/l&>Include disabled groups in listing.
    +<&|/l&>Find groups whose <& /Elements/SelectGroups &>
    +
    +
    +<%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+)/) { + $Groups->LimitCustomField( + CUSTOMFIELD => $1, + OPERATOR => $GroupOp, + VALUE => $GroupString, + ); + } + else { + $Groups->Limit( + FIELD => $GroupField, + OPERATOR => $GroupOp, + VALUE => $GroupString, + ); + } +} +else { + $caption = loc("User-defined groups"); +} + + +$Format ||= q{'__id__/TITLE:#'} + .q{,'__Name__/TITLE:Name'} + .q{,'__Description__'}; + + +<%ARGS> +$Format => undef, + +$GroupString => '' unless defined $GroupString +$GroupOp => '=' +$GroupField => 'Name' +$FindDisabledGroups => 0 + diff --git a/rt/share/html/Admin/Queues/CustomField.html b/rt/share/html/Admin/Queues/CustomField.html new file mode 100755 index 000000000..0dd530d2c --- /dev/null +++ b/rt/share/html/Admin/Queues/CustomField.html @@ -0,0 +1,87 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/QueueTabs, id => $QueueObj->Id, + QueueObj => $QueueObj, + current_tab => 'Admin/Queues/CustomFields.html?id='.$QueueObj->id, + current_subtab => $current_subtab, + subtabs => $subtabs, + Title => $title &> + +<& /Admin/Elements/EditCustomField, title => $title, %ARGS &> + +<%INIT> +my $QueueObj = new RT::Queue($session{'CurrentUser'}); +$QueueObj->Load($Queue); + +my ($title, $current_subtab); + +unless($QueueObj->id) { + Abort(loc("Queue [_1] not found", $Queue)); +} +if ($CustomField) { + $title = loc('Modify a CustomField for queue [_1]', $QueueObj->Name()); +}else { + $current_subtab = "Admin/Queues/CustomField.html?create=1&Queue=".$QueueObj->id; + $title = loc('Create a CustomField for queue [_1]', $QueueObj->Name()); +} + +my $subtabs = { + A => { title => loc('New custom field'), + path => "Admin/Queues/CustomField.html?create=1&Queue=".$QueueObj->id + } + }; + + +<%ARGS> +$CustomField => undef +$Queue => 0 + +<%ATTR> +AutoFlush => 0 + diff --git a/rt/share/html/Admin/Queues/CustomFields.html b/rt/share/html/Admin/Queues/CustomFields.html new file mode 100755 index 000000000..9db9c4221 --- /dev/null +++ b/rt/share/html/Admin/Queues/CustomFields.html @@ -0,0 +1,72 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/QueueTabs, + id => $Object->id, + current_tab => "Admin/Queues/CustomFields.html?SubType=$SubType&id=$id", + current_subtab => "Admin/Queues/CustomFields.html?SubType=$SubType&id=$id", + QueueObj => $Object, + Title => $title + &> + + <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::Queue' &> +<%INIT> +my $Object = RT::Queue->new( $session{'CurrentUser'} ); + +$Object->Load($id) || Abort( loc( "Couldn't load object [_1]", $id ) ); +my $FriendlySubTypes = + RT::CustomField->new( $session{'CurrentUser'} ) + ->FriendlyLookupType( $Object->CustomFieldLookupType ); + +my $title = loc( 'Edit Custom Fields for [_1]', $Object->Name ); + + +<%ARGS> +$id => undef +$SubType => 'RT::Queue-RT::Ticket' + diff --git a/rt/share/html/Admin/Queues/GroupRights.html b/rt/share/html/Admin/Queues/GroupRights.html new file mode 100755 index 000000000..467b14987 --- /dev/null +++ b/rt/share/html/Admin/Queues/GroupRights.html @@ -0,0 +1,134 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Modify group rights for queue [_1]', $QueueObj->Name) &> +<& /Admin/Elements/QueueTabs, id => $id, + QueueObj => $QueueObj, + current_tab => $current_tab, + Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &> +<& /Elements/ListActions, actions => \@results &> + +
    + + + +

    <&|/l&>System groups

    + +% $m->callback( %ARGS, QueueObj => $QueueObj, results => \@results ); +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToSystemInternalGroups(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
    + <% loc($Group->Type) %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $QueueObj &> +
    +

    <&|/l&>Roles

    + +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToRolesForQueue($QueueObj->Id); +% while (my $Group = $Groups->Next()) { + + + + +% } +
    + <% loc($Group->Type) %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $QueueObj &> +
    +

    <&|/l&>User defined groups

    + +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToUserDefinedGroups(); +% while (my $Group = $Groups->Next()) { + + + + +% } +
    + <% $Group->Name %> + + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $QueueObj &> +
    + + <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &> + +
    + +<%INIT> + + #Update the acls. + my @results = ProcessACLChanges(\%ARGS); + + +if (!defined $id) { + Abort(loc("No Queue defined")); +} + +my $QueueObj = RT::Queue->new($session{'CurrentUser'}); +$QueueObj->Load($id) || Abort(loc("Couldn't load queue [_1]",$id)); + +my $Groups; +my $current_tab; +$current_tab = 'Admin/Queues/GroupRights.html?id='.$QueueObj->id; + + + +<%ARGS> +$id => undef + diff --git a/rt/share/html/Admin/Queues/History.html b/rt/share/html/Admin/Queues/History.html new file mode 100644 index 000000000..b0634c50e --- /dev/null +++ b/rt/share/html/Admin/Queues/History.html @@ -0,0 +1,68 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/QueueTabs, + id => $id, + QueueObj => $QueueObj, + current_subtab => $current_tab, + Title => $title &> + +<& /Ticket/Elements/ShowHistory, + Ticket => $QueueObj, + ShowDisplayModes => 0, +&> + +<%INIT> +my $current_tab = 'Admin/Queues/History.html?id='.$id; +my $QueueObj = new RT::Queue($session{'CurrentUser'}); +$QueueObj->Load($id) || Abort("Couldn't load queue '$id'"); +my $title = loc("History of the queue [_1]", $QueueObj->Name); + +<%ARGS> +$id => '' unless defined $id + diff --git a/rt/share/html/Admin/Queues/Modify.html b/rt/share/html/Admin/Queues/Modify.html new file mode 100755 index 000000000..df97a68c7 --- /dev/null +++ b/rt/share/html/Admin/Queues/Modify.html @@ -0,0 +1,214 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/QueueTabs, id => $QueueObj->id, + QueueObj => $QueueObj, + current_tab => $current_tab, + Title => $title &> +<& /Elements/ListActions, actions => \@results &> + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +% my $CFs = $QueueObj->CustomFields; +% while (my $CF = $CFs->Next) { + +% } + +% if ( RT->Config->Get('GnuPG')->{'Enable'} ) { + + + + + +% } + + + + +% if ( RT->Config->Get('GnuPG')->{'Enable'} ) { +% if ( my $email = $QueueObj->CorrespondAddress || RT->Config->Get('CorrespondAddress') ) { + +% } +% if ( my $email = $QueueObj->CommentAddress || RT->Config->Get('CommentAddress') ) { + +% } +% } + +
    <&|/l&>Queue Name:Name %>" />
    <&|/l&>Description:Description %>" size="60" />
    <&|/l&>Subject Tag:SubjectTag || '' ) %>" size="60" />
    <&|/l&>Reply Address:CorrespondAddress %>" /> +
    <&|/l , RT->Config->Get('CorrespondAddress')&>(If left blank, will default to [_1])
    <&|/l&>Comment Address:CommentAddress %>" /> +
    <&|/l , RT->Config->Get('CommentAddress')&>(If left blank, will default to [_1])
    <&|/l&>Priority starts at:<& /Elements/SelectPriority, + Name => "InitialPriority", + Default => $Create? 0: $QueueObj->InitialPriority, +&><&|/l&>Over time, priority moves toward:<& /Elements/SelectPriority, + Name => "FinalPriority", + Default => $Create? 0: $QueueObj->FinalPriority, +&>
    <&|/l&>Requests should be due in:DefaultDueIn%>" /> <&|/l&>days.
    +<% loc($CF->Name) %>: + +<& /Elements/EditCustomField, CustomField => $CF, + Object => $QueueObj, + ($Create ? (NamePrefix => 'Object-RT::Queue--CustomField-') + : () )&> +
    Sign? 'checked="checked"': '' |n%> /><&|/l&>Sign by defaultEncrypt? 'checked="checked"': '' |n%> /><&|/l&>Encrypt by default
    /><&|/l&>Enabled (Unchecking this box disables this queue)
    +% $m->callback( %ARGS, QueueObj => $QueueObj, results => \@results ); +
    <& /Admin/Elements/ShowKeyInfo, Type => 'private', EmailAddress => $email &>
    <& /Admin/Elements/ShowKeyInfo, Type => 'private', EmailAddress => $email &>
    +% if ( $Create ) { +<& /Elements/Submit, Label => loc('Create') &> +% } else { +<& /Elements/Submit, Label => loc('Save Changes') &> +% } +
    + + + +<%INIT> +my ($title, $current_tab, @results, $Disabled, $EnabledChecked); +my $QueueObj = RT::Queue->new( $session{'CurrentUser'} ); +$QueueObj->Load( $id ) if !$id || $id eq 'new'; + +$EnabledChecked = 'checked="checked"'; + +if ($Create) { + $current_tab = 'Admin/Queues/Modify.html?Create=1'; + $title = loc("Create a queue"); +} else { + if ( defined $id && $id eq 'new' ) { + my ($val, $msg) = $QueueObj->Create( Name => $Name ); + Abort("$msg") unless $val; + delete $session{'create_in_queues'}; + push @results, $msg; + } + else { + $QueueObj->Load($id) || $QueueObj->Load($Name) || Abort(loc("Couldn't load queue '[_1]'", $Name)); + } + $title = loc('Editing Configuration for queue [_1]', $QueueObj->Name); + + $current_tab = 'Admin/Queues/Modify.html?id='.$QueueObj->id; +} +if ( $QueueObj->Id ) { + delete $session{'create_in_queues'}; + my @attribs= qw(Description CorrespondAddress CommentAddress Name + InitialPriority FinalPriority DefaultDueIn Sign Encrypt SubjectTag Disabled); + + # we're asking about enabled on the web page but really care about disabled + if ( $SetEnabled ) { + $Disabled = $ARGS{'Disabled'} = $Enabled? 0: 1; + $ARGS{$_} = 0 foreach grep !defined $ARGS{$_} || !length $ARGS{$_}, + qw(Sign Encrypt Disabled); + } + + push @results, UpdateRecordObject( + AttributesRef => \@attribs, + Object => $QueueObj, + ARGSRef => \%ARGS + ); + + $Disabled = $ARGS{'Disabled'} = $Enabled? 0: 1; + + $EnabledChecked = "" if $QueueObj->Disabled; + + my @linkresults; + $m->callback( + results => \@linkresults, + RecordObj => $QueueObj, + ARGSRef => \%ARGS, + CallbackName => 'ProcessLinks' + ); + push @results, @linkresults; + push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $QueueObj ); +} + + + +<%ARGS> +$id => undef +$result => undef +$Name => undef +$Create => undef +$Description => undef +$CorrespondAddress => undef +$CommentAddress => undef +$InitialPriority => undef +$FinalPriority => undef +$DefaultDueIn => undef +$SetEnabled => undef +$Enabled => undef + diff --git a/rt/share/html/Admin/Queues/People.html b/rt/share/html/Admin/Queues/People.html new file mode 100755 index 000000000..0a2ab0de2 --- /dev/null +++ b/rt/share/html/Admin/Queues/People.html @@ -0,0 +1,215 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Modify people related to queue [_1]', $QueueObj->Name) &> +<& /Admin/Elements/QueueTabs, id => $id, + QueueObj => $QueueObj, + current_tab => $current_tab, + Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &> + +<& /Elements/ListActions, actions => \@results &> + + +
    + + + + + + + +
    + +

    <&|/l&>Current watchers

    + + +<&|/l&>Cc: + +<& /Admin/Elements/EditQueueWatchers, QueueObj => $QueueObj, Watchers => $QueueObj->Cc &> + +<&|/l&>Administrative Cc: + +<& /Admin/Elements/EditQueueWatchers, QueueObj => $QueueObj, Watchers => $QueueObj->AdminCc &> + + +
    +

    <&|/l&>New watchers

    + +<&|/l&>Find people whose
    +<& /Elements/SelectUsers &> + +
    +<&|/l&>Find groups whose
    +<& /Elements/SelectGroups &> + + +

    +<&|/l&>Add new watchers:
    +

    +<&|/l&>Users +% if ($user_msg) { +
    +<%$user_msg%> +% } elsif ($Users) { +

      +% while (my $u = $Users->Next ) { +
    • <& /Elements/SelectWatcherType, + Scope => 'queue', + Name => "Queue-AddWatcher-Principal-". $u->PrincipalId, +&> +<& /Elements/ShowUser, User => $u &>
    • +% } +
    +% } + +

    +<&|/l&>Groups + +% if ($group_msg) { +
    +<%$group_msg%> +% } elsif ($Groups) { +

      +% while (my $g = $Groups->Next ) { +
    • <&/Elements/SelectWatcherType, Scope=>'queue', Name => +"Queue-AddWatcher-Principal-".$g->PrincipalId &> <%$g->Name%> +(<%$g->Description%>) +% } +
    +% } + +
    + + + + +<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), Reset => 1 &> +
    + +<%INIT> + +my $current_tab; +my ($field, @results, $User, $Users, $Groups, $watcher, $user_msg, $group_msg); + +# {{{ Load the queue +#If we get handed two ids, mason will make them an array. bleck. +# We want teh first one. Just because there's no other sensible way +# to deal + + + +my $QueueObj = new RT::Queue($session{'CurrentUser'}); +$QueueObj->Load($id) || Abort(loc("Couldn't load queue", $id)); +# }}} + +unless ($OnlySearchForPeople or $OnlySearchForGroup) { +# {{{ Delete deletable watchers + + foreach my $key (keys %ARGS) { + my $id = $QueueObj->Id; + + if (($key =~ /^Queue-$id-DeleteWatcher-Type-(.*?)-Principal-(\d*)$/)) {; + my ($code, $msg) = $QueueObj->DeleteWatcher(Type => $1, + PrincipalId => $2); + push @results, $msg; + } + } +# }}} + +# {{{ Add new watchers + foreach my $key (keys %ARGS) { + #They're in this order because otherwise $1 gets clobbered :/ + if ( ($ARGS{$key} =~ /^(AdminCc|Cc)$/) and + ($key =~ /^Queue-AddWatcher-Principal-(\d*)$/) ) { + $RT::Logger->debug("Adding a watcher $1 to ".$ARGS{$key}."\n"); + my ($code, $msg) = $QueueObj->AddWatcher(Type => $ARGS{$key}, + PrincipalId => $1); + push @results, $msg; + } + } + +# }}} +} + + +if (!length $ARGS{'UserString'}) { +$user_msg = loc("No principals selected."); + } +else { + $Users = new RT::Users($session{'CurrentUser'}); + $Users->Limit(FIELD => $ARGS{'UserField'}, + VALUE => $ARGS{'UserString'}, + OPERATOR => $ARGS{'UserOp'}); + } + +if (!length $ARGS{'GroupString'}) { +$group_msg = loc("No principals selected."); + } +else { +$Groups = new RT::Groups($session{'CurrentUser'}); +$Groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined'); +$Groups->Limit(FIELD => $ARGS{'GroupField'}, + VALUE => $ARGS{'GroupString'}, + OPERATOR => $ARGS{'GroupOp'}); + } + +$current_tab = 'Admin/Queues/People.html?id='.$QueueObj->id; + + +<%ARGS> +$OnlySearchForPeople => undef +$OnlySearchForGroup => undef +$UserField => 'Name' +$UserOp => '=' +$UserString => undef +$GroupField => 'Name' +$GroupOp => '=' +$GroupString => undef +$Type => undef +$id => undef + + diff --git a/rt/share/html/Admin/Queues/Scrip.html b/rt/share/html/Admin/Queues/Scrip.html new file mode 100755 index 000000000..96c492a94 --- /dev/null +++ b/rt/share/html/Admin/Queues/Scrip.html @@ -0,0 +1,99 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/QueueTabs, id => $QueueObj->Id, + QueueObj => $QueueObj, + current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id, + current_subtab => $current_subtab, + subtabs => $subtabs, + Title => $title &> + +<& /Elements/ListActions, actions => \@results &> +<& /Admin/Elements/EditScrip, title => $title, %ARGS, id => $id &> + +<%init> +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, + }, +}; + +($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 + }; +} else { + $current_subtab = "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id; + $title = loc("Create a scrip for queue [_1]", $QueueObj->Name); +} + + + + +<%ARGS> +$id => undef +$Queue => undef + diff --git a/rt/share/html/Admin/Queues/Scrips.html b/rt/share/html/Admin/Queues/Scrips.html new file mode 100755 index 000000000..e6347b6d2 --- /dev/null +++ b/rt/share/html/Admin/Queues/Scrips.html @@ -0,0 +1,87 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/QueueTabs, id => $QueueObj->id, + QueueObj => $QueueObj, + current_tab => 'Admin/Queues/Scrips.html?id='.$id, + current_subtab => 'Admin/Queues/Scrips.html?id='.$id, + subtabs => $subtabs, + Title => $title &> + +% unless ( $QueueObj->Disabled ) { # Global scrips does not apply to disabled queues +

    <&|/l&>Scrips which apply to all queues

    +<& /Admin/Elements/ListGlobalScrips &> +
    +% } +<& /Admin/Elements/EditScrips, title => $title, %ARGS &> +<%init> +my $QueueObj = new RT::Queue($session{'CurrentUser'}); +$QueueObj->Load($id); + +my $title; + +if ($QueueObj->id) { + $title = loc("Modify scrips for queue [_1]", $QueueObj->Name); +} else { + Abort(loc("Queue [_1] not found",$id)); +} + +my $subtabs = { + A => { title => loc('Select scrip'), + path => "Admin/Queues/Scrips.html?id=".$id, + }, + B => { title => loc('New scrip'), + path => "Admin/Queues/Scrip.html?create=1&Queue=".$id, + separator => 1, + } + }; + + +<%ARGS> +$id => undef #some identifier that a Queue could + diff --git a/rt/share/html/Admin/Queues/Template.html b/rt/share/html/Admin/Queues/Template.html new file mode 100755 index 000000000..54ba8177b --- /dev/null +++ b/rt/share/html/Admin/Queues/Template.html @@ -0,0 +1,132 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/QueueTabs, id => $Queue, + QueueObj => $QueueObj, + current_tab => 'Admin/Queues/Templates.html?id='.$Queue, + current_subtab => $current_subtab, + subtabs => $subtabs, + Title => $title &> +<& /Elements/ListActions, actions => \@results &> + +
    +%if ($Create ) { + +% } else { + +% } + +%# hang onto the queue id + +<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description => +$TemplateObj->Description, Content => $TemplateObj->Content &> +<& /Elements/Submit, Label => $SubmitLabel, Reset => 1 &> +
    + + +<%INIT> + +my $TemplateObj = new RT::Template($session{'CurrentUser'}); +my ($title, @results, $current_subtab, $SubmitLabel); + +my $subtabs = { + A => { title => loc('Select template'), + path => "Admin/Queues/Templates.html?id=$Queue" + }, + B => { title => loc('New template'), + path => "Admin/Queues/Template.html?Create=1&Queue=$Queue", + separator => 1, + } + }; + +if ($Create) { + $title = loc("Create a template"); + $current_subtab = "Admin/Queues/Template.html?Create=1&Queue=".$Queue; + $SubmitLabel = loc('Create'); +} + +else { + if ($Template eq 'new') { + my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name); + Abort(loc("Could not create template: [_1]", $msg)) unless ($val); + push @results, $msg; + } + else { + $TemplateObj->Load($Template) || Abort(loc('No Template')); + } + $title = loc('Modify template [_1]', loc($TemplateObj->Name())); + $SubmitLabel = loc('Save Changes'); + + +} +my $QueueObj; +if ($TemplateObj->Id()) { + $Queue = $TemplateObj->Queue; + $QueueObj = $TemplateObj->QueueObj; + + my @attribs = qw( Description Content Queue Name); + my @aresults = UpdateRecordObject( AttributesRef => \@attribs, + Object => $TemplateObj, + ARGSRef => \%ARGS); + $current_subtab = "Admin/Queues/Template.html?Queue=$Queue&Template=".$TemplateObj->Id(); + $subtabs->{"C"} = { title => loc('Template #[_1]', $TemplateObj->Id()), + path => "Admin/Queues/Template.html?Queue=$Queue&Template=".$TemplateObj->Id(), + }; + push @results, @aresults; +} else { + $QueueObj = RT::Queue->new($session{'CurrentUser'}); + $QueueObj->Load($Queue); +} + + +<%ARGS> +$Queue => '' +$Template => '' +$Create => undef +$Name => undef + diff --git a/rt/share/html/Admin/Queues/Templates.html b/rt/share/html/Admin/Queues/Templates.html new file mode 100755 index 000000000..deb19ff89 --- /dev/null +++ b/rt/share/html/Admin/Queues/Templates.html @@ -0,0 +1,81 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/QueueTabs, id => $QueueObj->id, + current_tab => 'Admin/Queues/Templates.html?id='.$id, + current_subtab => 'Admin/Queues/Templates.html?id='.$id, + QueueObj => $QueueObj, + subtabs => $subtabs, + Title => $title &> + +<& /Admin/Elements/EditTemplates, title => $title, %ARGS &> + +<%INIT> +my $QueueObj = new RT::Queue($session{'CurrentUser'}); +$QueueObj->Load($id); + +my ($title, $current_subtab); + +if ($QueueObj->id) { + $title = loc("Edit Templates for queue [_1]", $QueueObj->Name); +} else { + Abort(loc("Queue [_1] not found",$id)); +} +my $subtabs = { + A => { title => loc('Select template'), + path => "Admin/Queues/Templates.html?id=".$id, + }, + B => { title => loc('New template'), + path => "Admin/Queues/Template.html?Create=1&Queue=".$id, + } + }; + + +<%ARGS> +$id => undef #some identifier that a Queue could + diff --git a/rt/share/html/Admin/Queues/UserRights.html b/rt/share/html/Admin/Queues/UserRights.html new file mode 100755 index 000000000..31d748acc --- /dev/null +++ b/rt/share/html/Admin/Queues/UserRights.html @@ -0,0 +1,112 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Modify user rights for queue [_1]', $QueueObj->Name) &> +<& /Admin/Elements/QueueTabs, id => $id, + QueueObj => $QueueObj, + current_tab => $current_tab, + Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &> +<& /Elements/ListActions, actions => \@results &> + +
    + + + + +% $m->callback( %ARGS, QueueObj => $QueueObj, results => \@results ); +% while (my $Member = $Users->Next()) { +% my $UserObj = $Member->MemberObj->Object(); +% my $group = RT::Group->new($session{'CurrentUser'}); +% $group->LoadACLEquivalenceGroup($Member->MemberObj); + + + + +% } +
    <& /Elements/ShowUser, User => $UserObj &> + <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId, + Object => $QueueObj &> +
    + + <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &> + +
    + +<%INIT> + + #Update the acls. + my @results = ProcessACLChanges(\%ARGS); + +# {{{ Deal with setting up the display of current rights. + + + +if (!defined $id) { + Abort(loc("No Queue defined")); +} + +my $QueueObj = RT::Queue->new($session{'CurrentUser'}); +$QueueObj->Load($id) || Abort(loc("Couldn't load queue [_1]",$id)); + +# Find out which users we want to display ACL selects for +my $Privileged = RT::Group->new($session{'CurrentUser'}); +$Privileged->LoadSystemInternalGroup('Privileged'); +my $Users = $Privileged->MembersObj(); + + + +# }}} +my $current_tab; +$current_tab = 'Admin/Queues/UserRights.html?id='.$QueueObj->id; + + +<%ARGS> +$id => undef +$UserString => undef +$UserOp => undef +$UserField => undef + diff --git a/rt/share/html/Admin/Queues/index.html b/rt/share/html/Admin/Queues/index.html new file mode 100755 index 000000000..52e7b3bfd --- /dev/null +++ b/rt/share/html/Admin/Queues/index.html @@ -0,0 +1,126 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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("Admin queues") &> +<& /Admin/Elements/QueueTabs, current_tab => 'Admin/Queues/', + current_subtab => 'Admin/Queues/', + Title => loc("Admin queues") &> + + + +

    <%$caption%>

    +

    <&|/l&>Select a queue:

    +% unless ( $queues->Count ) { +<&|/l&>No queues matching search criteria found. +% } else { +<& /Elements/CollectionList, + OrderBy => 'Name', + Order => 'ASC', + %ARGS, + Format => $Format, + Collection => $queues, + AllowSorting => 1, + PassArguments => [qw( + Format Rows Page Order OrderBy + FindDisabledQueues QueueString QueueOp QueueField + )], +&> +% } +
    +% foreach my $field( qw(Format Rows Page Order OrderBy) ) { +% next unless defined $ARGS{ $field } && length $ARGS{ $field }; + +% } + + +<& /Elements/SelectMatch, Name => 'QueueOp', Default => $QueueOp &> + +
    + + /> +<&|/l&>Include disabled queues in listing. +
    +
    + +<%INIT> +my $queues = new RT::Queues($session{'CurrentUser'}); +$queues->{'find_disabled_rows'} = 1 if $FindDisabledQueues; + +my ($caption); +if ( defined $QueueString && length $QueueString ) { + $caption = $FindDisabledQueues + ? loc("All queues matching search criteria") + : loc("Enabled queues matching search criteria"); + $queues->Limit( + FIELD => $QueueField, + OPERATOR => $QueueOp, + VALUE => $QueueString, + ); +} else { + $queues->UnLimit; + $caption = $FindDisabledQueues + ? loc("All Queues") + : loc("Enabled Queues"); +} + +$Format ||= q{'__id__/TITLE:#'} + .q{,'__Name__/TITLE:Name'} + .q{,__Description__,__Address__,__Priority__,__DefaultDueIn__,__Disabled__}; + + +<%ARGS> +$FindDisabledQueues => 0 +$Format => undef + +$QueueField => 'Name' +$QueueOp => '=' +$QueueString => '' + diff --git a/rt/share/html/Admin/Tools/Configuration.html b/rt/share/html/Admin/Tools/Configuration.html new file mode 100644 index 000000000..eb48af19c --- /dev/null +++ b/rt/share/html/Admin/Tools/Configuration.html @@ -0,0 +1,170 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +require Module::Versions::Report; +my $title = loc('System Configuration'); +unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) { + Abort(loc('This feature is only available to system administrators')); +} + + + +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/ToolTabs, + current_tab => 'Admin/Tools/Configuration.html', + current_subtab => 'Admin/Tools/Configuration.html', + Title => $title &> + + + +

    <&|/l&>Loaded perl modules

    +% my $report = Module::Versions::Report::report(); +% my @report = grep /v\d/, split("\n",$report); +
    +<% join('
    ', @report) |n %> +
    + +

    <&|/l&>RT Config

    + +<%PERL> +foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) { + my $val = RT->Config->Get( $key ); + next unless defined $val; + + my $meta = RT->Config->Meta( $key ); + my $description = ''; + if ( $meta->{'Source'}{'Extension'} && $meta->{'Source'}{'SiteConfig'} ) { + $description = loc("[_1] site config", $meta->{'Source'}{'Extension'}); + } + elsif ( $meta->{'Source'}{'Extension'} ) { + $description = loc("[_1] core config", $meta->{'Source'}{'Extension'}); + } + elsif ( $meta->{'Source'}{'SiteConfig'} ) { + $description = loc("site config"); + } + else { + $description = loc("core config"); + } + + + + +% } +
    <% $key %>\ +% if ( $key =~ /Password(?!Length)/i ) { +Password not printed\ +% } elsif ( !ref $val ) { +<% "$val" %>\ +% } elsif ( ref $val eq 'ARRAY' ) { +<% join ', ', @$val %>\ +% } elsif ( ref $val eq 'HASH' ) { +<% join ', ', %$val %>\ +% } else { +<% ref $val %>\ +% } +
    <% $description %>
    + +

    <&|/l&>RT Variables

    + +% { no strict qw/refs/; +% my %config_opt = map { $_ => 1 } RT->Config->Options( Overridable => undef ); +% foreach my $key ( sort keys %{*RT::} ) { +% next if !${'RT::'.$key} || ref ${'RT::'.$key} || $config_opt{ $key }; + + + +% } +% } +
    RT::<% $key %> +% if ( $key =~ /Password(?!Length)/i ) { +Password not printed +% } else { +<% ${'RT::'.$key} %> +% } +
    + +

    <&|/l&>RT Size

    + +<%PERL> +for my $type (qw/Ticket Queue Transaction Group/) { + my $class = 'RT::' . $type . 's'; + my $collection = $class->new($RT::SystemUser); + $collection->UnLimit; + my $count = $collection->CountAll; + + + +% } + +<%PERL> +my $users = RT::Users->new($RT::SystemUser); +$users->UnLimit; +my $user_count = $users->CountAll; + +$users->LimitToPrivileged; +my $privileged_count = $users->CountAll; +my $unprivileged_count = $user_count - $privileged_count; + + + + + +
    <% $type %>s<% $count %>
    Privileged Users<% $privileged_count %>
    Unprivileged Users<% $unprivileged_count %>
    + +

    <&|/l&>Perl configuration

    +% require Config; +
    +<% Config::myconfig() %>
    +
    + +

    <&|/l&>Perl Include Paths (@INC)

    +
    +% foreach my $inc (@INC) {
    +<% $inc %>
    +% }
    +
    diff --git a/rt/share/html/Admin/Tools/Shredder/Dumps/dhandler b/rt/share/html/Admin/Tools/Shredder/Dumps/dhandler new file mode 100644 index 000000000..f316f2218 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Dumps/dhandler @@ -0,0 +1,68 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<%ATTR> +AutoFlush => 0 + +<%FLAGS> +inherit => undef + +<%INIT> +my $arg = $m->dhandler_arg; +$m->abort(404) if $arg =~ m{\.\.|/|\\}; + +use File::Spec (); +use RT::Shredder (); +my $File = File::Spec->catfile( RT::Shredder->StoragePath, $arg ); +$r->content_type('application/octets-stream'); +open my $fh, "<:raw", $File or $m->abort(404); +my $buf; +while( read $fh, $buf, 1024*1024 ) { + $m->out($buf); +} +return 0; + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/DumpFileLink b/rt/share/html/Admin/Tools/Shredder/Elements/DumpFileLink new file mode 100644 index 000000000..ba0aeb85f --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/DumpFileLink @@ -0,0 +1,61 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$File => '' + +<%INIT> +return unless $File; +use File::Spec (); +use RT::Shredder (); + +$File = File::Spec->abs2rel( $File, RT::Shredder->StoragePath ) + if File::Spec->file_name_is_absolute($File); + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoRights b/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoRights new file mode 100644 index 000000000..0665c076b --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoRights @@ -0,0 +1,55 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => 'Error' &> +<& /Admin/Elements/ToolTabs, + current_tab => 'Admin/Tools/Shredder', + current_subtab => 'Admin/Tools/Shredder', + Title => 'Error', +&> +
    <% loc("You don't have SuperUser right.") |n%>
    + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage b/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage new file mode 100644 index 000000000..5d857ca56 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage @@ -0,0 +1,59 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Path => '' + +<& /Admin/Elements/Header, Title => 'Error' &> +<& /Admin/Elements/ToolTabs, + current_tab => 'Admin/Tools/Shredder', + current_subtab => 'Admin/Tools/Shredder', + Title => 'Error', +&> +
    +<% loc('Shredder needs a directory to write dumps to. Please check that you have [_1] and it is writable by your web server.', $m->interp->apply_escapes( $Path ) ) |n%> +
    diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment new file mode 100644 index 000000000..b7067b703 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment @@ -0,0 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 + + +<% loc('Attachment') %>(<% loc('id') %>:<% $Object->id %>, <% loc('FileName') %>: <% $Object->Filename || loc('(no value)') %>) + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket new file mode 100644 index 000000000..43307873d --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket @@ -0,0 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 + + +<% loc('Ticket') %>(<% loc('id') %>:<% $Object->id %>, <% loc('Subject') %>: <% substr($Object->Subject, 0, 30) %>...) + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--User b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--User new file mode 100644 index 000000000..d852f5a74 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--User @@ -0,0 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 + + +<% loc('User') %>(<% loc('id') %>:<% $Object->id %>, <% loc('Name') %>: <% $Object->Name %>) + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/ObjectCheckBox b/rt/share/html/Admin/Tools/Shredder/Elements/ObjectCheckBox new file mode 100644 index 000000000..fa487f691 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/ObjectCheckBox @@ -0,0 +1,66 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 + + + +% if( $m->comp_exists( $path ) ) { +% $m->comp( $path, Object => $Object ); +% } else { +<% $Object->_AsString %> +% } +
    +<%ONCE> +require File::Spec; + +<%INIT> +my $path = ref $Object; +$path =~ s/:/-/g; +$path = File::Spec->catfile( 'Object', $path ); + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/PluginArguments b/rt/share/html/Admin/Tools/Shredder/Elements/PluginArguments new file mode 100644 index 000000000..59c6df359 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/PluginArguments @@ -0,0 +1,62 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Plugin => '' + +
    +<% loc('Fill arguments') %>:
    +% foreach my $a( $plugin_obj->SupportArgs ) { +<% loc($a) %>:" value="<% $ARGS{ "$Plugin:$a" } || '' %>" />
    +% } +
    +<%INIT> +use RT::Shredder::Plugin; +my $plugin_obj = new RT::Shredder::Plugin; +my ($status, $msg) = $plugin_obj->LoadByName( $Plugin ); +die $msg unless $status; + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp b/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp new file mode 100644 index 000000000..70336bd4d --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp @@ -0,0 +1,75 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Plugin => '' + +
    +<% $text |n%> +
    +<%ONCE> +use RT::Shredder::Plugin; +my $plugin_obj = new RT::Shredder::Plugin; +my %plugins = $plugin_obj->List; + +<%INIT> +my $file = $plugins{ $Plugin }; +unless( $file ) { + $RT::Logger->error( "Couldn't find plugin '$Plugin'" ); + return; +} + +use RT::Shredder::POD qw(); +my $text = ''; +open my $io_handle, ">:scalar", \$text or die "Can't open scalar for write: $!"; +RT::Shredder::POD::plugin_html( $file, $io_handle ); +if ( $Plugin eq 'Base' ) { + $file =~ s/\.pm$/\/Search.pm/; + RT::Shredder::POD::plugin_html( $file, $io_handle ); +} +close $io_handle; + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/SelectObjects b/rt/share/html/Admin/Tools/Shredder/Elements/SelectObjects new file mode 100644 index 000000000..52743ff80 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/SelectObjects @@ -0,0 +1,67 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +@Objects => () + +
    +% unless( @Objects ) { +<& /Elements/ListActions, actions => [loc("Objects list is empty")] &> +% } else { +
    + +<% loc("click to check/uncheck all objects at once") %> +
    +% foreach my $o( @Objects ) { +<& ObjectCheckBox, Object => $o &> +% } +
    +<& /Elements/Submit, Name => 'Wipeout', Label => loc('Wipeout') &> +% } +
    +<%INIT> + diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/SelectPlugin b/rt/share/html/Admin/Tools/Shredder/Elements/SelectPlugin new file mode 100644 index 000000000..f9ece67d2 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/Elements/SelectPlugin @@ -0,0 +1,73 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Plugin => '' + +<& PluginHelp, %ARGS, Plugin => 'Base' &> +
    +Select plugin: + +
    +
    +% foreach my $p( keys %plugins ) { +
    +<& PluginHelp, %ARGS, Plugin => $p &> +<& PluginArguments, %ARGS, Plugin => $p &> +
    +% } +
    +<%ONCE> +use RT::Shredder::Plugin; +my $plugin_obj = new RT::Shredder::Plugin; +my %plugins = $plugin_obj->List('Search'); + diff --git a/rt/share/html/Admin/Tools/Shredder/autohandler b/rt/share/html/Admin/Tools/Shredder/autohandler new file mode 100644 index 000000000..26094525a --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/autohandler @@ -0,0 +1,60 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +unless( $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System ) ) { + return $m->comp( 'Elements/Error/NoRights' ); +} + +use RT::Shredder (); +my $path = RT::Shredder->StoragePath; +unless( -d $path && -w _ ) { + return $m->comp( 'Elements/Error/NoStorage', Path => $path ); +} + +$m->call_next(%ARGS); + diff --git a/rt/share/html/Admin/Tools/Shredder/index.html b/rt/share/html/Admin/Tools/Shredder/index.html new file mode 100644 index 000000000..15c20dfd5 --- /dev/null +++ b/rt/share/html/Admin/Tools/Shredder/index.html @@ -0,0 +1,186 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Plugin => '' +$Search => '' +$Wipeout => '' +@WipeoutObject => () + +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/ToolTabs, + current_tab => 'Admin/Tools/Shredder', + current_subtab => 'Admin/Tools/Shredder', + Title => $title, +&> +
    +
    +<& /Elements/ListActions, actions => $messages{'Errors'} &> +<& /Elements/ListActions, actions => $messages{'Success'} &> +<& Elements/DumpFileLink, File => $dump_file &> +<& Elements/SelectPlugin, Plugin => $Plugin, %ARGS &> +
    +<& /Elements/Submit, Name => 'Search', Label => loc('Search') &> +
    +
    +
    +% if( $Search || $Wipeout ) { +<& Elements/SelectObjects, Objects => \@objs &> +% } +
    +<%INIT> + +require RT::Shredder; +my $title = loc('Shredder'); +my %messages = ( Errors => [], Success => [] ); +my ($plugin_obj, @objs); + +my $catch_non_fatals = sub { + require RT::Shredder::Exceptions; + if ( my $e = RT::Shredder::Exception::Info->caught ) { + push @{ $messages{Errors} }, "$e"; + $Search = ''; @objs = (); + return 1; + } + if ( UNIVERSAL::isa( $@, 'Class::Exception' ) ) { + $@->rethrow; + } else { + die $@; + } +}; + + +if( $Plugin ) { { # use additional block({}) to effectively exit block on errors + use RT::Shredder::Plugin; + $plugin_obj = new RT::Shredder::Plugin; + my( $status, $msg ) = $plugin_obj->LoadByName( $Plugin ); + unless( $status ) { + push @{ $messages{Errors} }, $msg; + $Search = ''; + last; + } + + my %args; + foreach my $k( keys %ARGS ) { + next unless $k =~ /^\Q$Plugin\E:(.*)$/; + $args{ $1 } = $ARGS{$k}; + } + ( $status, $msg ) = $plugin_obj->HasSupportForArgs( keys %args ); + unless( $status ) { + push @{ $messages{Errors} }, $msg; + $Search = ''; + last; + } + + ($status, $msg) = eval { $plugin_obj->TestArgs( %args ) }; + $catch_non_fatals->() && last if $@; + unless( $status ) { + push @{ $messages{Errors} }, $msg; + $Search = ''; + last; + } +} } + +my $dump_file = ''; + +if( $Plugin && $Wipeout ) { { # use additional block({}) to effectively exit block on errors + my $shredder = new RT::Shredder( force => 1 ); + my $backup_plugin = new RT::Shredder::Plugin; + my ($status, $msg) = $backup_plugin->LoadByName('SQLDump'); + unless( $status ) { + push @{ $messages{Errors} }, $msg; + $Search = ''; @objs = (); + last; + } + ($status, $msg) = $backup_plugin->TestArgs; + unless( $status ) { + push @{ $messages{Errors} }, $msg; + $Search = ''; @objs = (); + last; + } + + ($dump_file) = $backup_plugin->FileName; + push @{ $messages{'Success'} }, "SQL dump file is '$dump_file'"; + + $shredder->AddDumpPlugin( Object => $backup_plugin ); + + $shredder->PutObjects( Objects => \@WipeoutObject ); + ($status, $msg) = $plugin_obj->SetResolvers( Shredder => $shredder ); + unless( $status ) { + push @{ $messages{Errors} }, $msg; + $Search = ''; @objs = (); + last; + } + eval { $shredder->WipeoutAll }; + $catch_non_fatals->() && last if $@; + + push @{ $messages{Success} }, loc('objects were successfuly removed'); +} } + +if( $Plugin && ( $Search || $Wipeout ) ) { { # use additional block({}) to effectively exit block on errors + my $status; + ($status, @objs) = eval { $plugin_obj->Run }; + $catch_non_fatals->() && last if $@; + unless( $status ) { + push @{ $messages{Errors} }, $objs[0]; + $Search = ''; @objs = (); + last; + } + push @{ $messages{Success} }, loc('executed plugin successfuly'); + + my $shredder = new RT::Shredder; + foreach my $o( grep defined, splice @objs ) { + eval { push @objs, $shredder->CastObjectsToRecords( Objects => $o ) }; + $catch_non_fatals->() && last if $@; + } + unless( @objs ) { + push @{ $messages{Success} }, loc('plugin returned empty list'); + } else { + push @{ $messages{Success} }, loc('see object list below'); + } +} } + diff --git a/rt/share/html/Admin/Tools/index.html b/rt/share/html/Admin/Tools/index.html new file mode 100644 index 000000000..78b1ed853 --- /dev/null +++ b/rt/share/html/Admin/Tools/index.html @@ -0,0 +1,55 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $title = loc('System Tools'); + +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/ToolTabs, + current_tab => 'Admin/Tools/index.html', + current_subtab => 'Admin/Tools/Configuration.html', + Title => $title &> diff --git a/rt/share/html/Admin/Users/CustomFields.html b/rt/share/html/Admin/Users/CustomFields.html new file mode 100644 index 000000000..42d825450 --- /dev/null +++ b/rt/share/html/Admin/Users/CustomFields.html @@ -0,0 +1,71 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => $Object->id, + current_tab => "Admin/Users/CustomFields.html?$id=".$id, + current_subtab => "Admin/Users/CustomFields.html?id=".$id, + UserObj => $Object, + Title => $title + &> + + <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::User' &> +<%INIT> +my $Object = RT::User->new( $session{'CurrentUser'} ); + +$Object->Load($id) || Abort( loc( "Couldn't load object [_1]", $id ) ); +my $FriendlySubTypes = + RT::CustomField->new( $session{'CurrentUser'} ) + ->FriendlyLookupType( $Object->CustomFieldLookupType ); + +my $title = loc( 'Edit Custom Fields for [_1]', $Object->Name ); + + +<%ARGS> +$id => undef + diff --git a/rt/share/html/Admin/Users/GnuPG.html b/rt/share/html/Admin/Users/GnuPG.html new file mode 100644 index 000000000..dd0d05a8d --- /dev/null +++ b/rt/share/html/Admin/Users/GnuPG.html @@ -0,0 +1,112 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => 'Admin/Users/GnuPG.html?id='. $id, + Title => $title, +&> + +<& /Elements/ListActions, actions => \@results &> + +% if ( $email ) { +<& /Admin/Elements/ShowKeyInfo, EmailAddress => $email &> +% } else { +

    <% loc("User has empty email address") %>

    +% } + +
    + + +<& /Widgets/Form/Select, + Name => 'PrivateKey', + Description => loc('Private Key'), + Values => [ map $_->{'Key'}, @{ $keys_meta{'info'} } ], + CurrentValue => $UserObj->PrivateKey, + DefaultLabel => loc('No private key'), +&> + +<& /Elements/Submit, Name => 'Update', Label => loc('Save Changes') &> +
    + +<%ARGS> +$id => undef +$Update => undef + +<%INIT> +return unless RT->Config->Get('GnuPG')->{'Enable'}; + +require RT::Crypt::GnuPG; + +my @results; + +my $UserObj = RT::User->new( $session{'CurrentUser'} ); +$UserObj->Load( $id ); +unless ( $UserObj->id ) { + Abort( loc("Couldn't load user #[_1]", $id) ); +} +$id = $ARGS{'id'} = $UserObj->id; + +my $email = $UserObj->EmailAddress; +my %keys_meta = RT::Crypt::GnuPG::GetKeysForSigning( $email, 'force' ); + +$ARGS{'PrivateKey'} = $m->comp('/Widgets/Form/Select:Process', + Name => 'PrivateKey', + Arguments => \%ARGS, + Default => 1, +); + +if ( $Update ) { + my ($status, $msg) = $UserObj->SetPrivateKey( $ARGS{'PrivateKey'} ); + push @results, $msg; +} + +my $title = loc("User's GnuPG keys"); + + diff --git a/rt/share/html/Admin/Users/History.html b/rt/share/html/Admin/Users/History.html new file mode 100644 index 000000000..601751c42 --- /dev/null +++ b/rt/share/html/Admin/Users/History.html @@ -0,0 +1,68 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> + +<& /Ticket/Elements/ShowHistory, + Ticket => $UserObj, + ShowDisplayModes => 0, +&> + +<%INIT> +my $current_tab = 'Admin/Users/History.html?id='.$id; +my $UserObj = new RT::User($session{'CurrentUser'}); +$UserObj->Load($id) || Abort("Couldn't load user '$id'"); +my $title = loc("History of the user [_1]", $UserObj->Name); + +<%ARGS> +$id => '' + diff --git a/rt/share/html/Admin/Users/Memberships.html b/rt/share/html/Admin/Users/Memberships.html new file mode 100644 index 000000000..ea5dd258b --- /dev/null +++ b/rt/share/html/Admin/Users/Memberships.html @@ -0,0 +1,143 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> + +<& /Elements/ListActions, actions => \@results &> + +
    + + +

    <&|/l&>Groups the user is member of (check box to delete)

    + +<& /Elements/CollectionList, + OrderBy => 'Name', + Order => 'ASC', + Rows => 0, + %ARGS, + DisplayFormat => "__CheckBox.{Delete}__,$Format", + Format => $Format, + Collection => $is_member, + AllowSorting => 1, + PassArguments => [qw(Format Rows Page Order OrderBy id)], +&> + +

    <&|/l&>Groups the user is not member of (check box to add)

    + +<& /Elements/CollectionList, + OrderBy => 'Name', + Order => 'ASC', + Rows => 100, + %ARGS, + DisplayFormat => "__CheckBox.{Add}__,'__HasMemberRecursively.{$id}__/TITLE:Recursive',$Format", + Format => $Format, + Collection => $is_not_member, + AllowSorting => 1, + PassArguments => [qw(Format Rows Page Order OrderBy id)], +&> + +<& /Elements/Submit, Label => loc('Update'), Name => 'Update' &> + +
    + +<%INIT> +my $UserObj = RT::User->new($session{'CurrentUser'}); +$UserObj->Load( $id ) || Abort("Couldn't load user '$id'"); + +my $title = loc("Memberships of the user [_1]", $UserObj->Name); +my $current_tab = 'Admin/Users/Memberships.html?id='. $id; + +my @results; +if ( $Update ) { + foreach my $gid( @Add ) { + my $group = RT::Group->new( $session{'CurrentUser'} ); + $group->LoadUserDefinedGroup( $gid ); + unless ( $group->id ) { + push @results, loc( "Couldn't load group #[_1]", $gid ); + next; + } + my ($status, $msg) = $group->AddMember( $id ); + push @results, $msg; + } + foreach my $gid( @Delete ) { + my $group = RT::Group->new( $session{'CurrentUser'} ); + $group->LoadUserDefinedGroup( $gid ); + unless ( $group->id ) { + push @results, loc( "Couldn't load group #[_1]", $gid ); + next; + } + my ($status, $msg) = $group->DeleteMember( $id ); + push @results, $msg; + } +} + +my $is_member = RT::Groups->new( $session{'CurrentUser'} ); +$is_member->LimitToUserDefinedGroups; +$is_member->WithMember( PrincipalId => $UserObj->Id ); + +my $is_not_member = RT::Groups->new( $session{'CurrentUser'} ); +$is_not_member->LimitToUserDefinedGroups; +$is_not_member->WithoutMember( PrincipalId => $UserObj->Id ); + +$Format ||= q{'__id__/TITLE:#'} + .q{,'__Name__/TITLE:Name'} + .q{,'__Description__'}; + +<%ARGS> +$id => undef + +$Update => 0, +@Add => (), +@Delete => (), + +$Format => undef + diff --git a/rt/share/html/Admin/Users/Modify.html b/rt/share/html/Admin/Users/Modify.html new file mode 100755 index 000000000..aae38b173 --- /dev/null +++ b/rt/share/html/Admin/Users/Modify.html @@ -0,0 +1,437 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> + +<& /Elements/ListActions, actions => \@results &> + +
    +%if ($Create) { + +% } else { + +% } + + + + + + + + + +
    +<&| /Widgets/TitleBox, title => loc('Identity') &> + + + + + + + + + +
    +<&|/l&>Username: + + <&|/l&>(required) +
    +<&|/l&>Email: + + +
    +<&|/l&>Real Name: + + +
    +<&|/l&>Nickname: + + +
    +<&|/l&>Unix login: + + +
    +<&|/l&>Language: + +<& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &> +
    +<&|/l&>Extra info: + + +
    + +
    +<&| /Widgets/TitleBox, title => loc('Access control') &> + + /> +<&|/l&>Let this user access RT
    + + + + /> <&|/l&>Let this user be granted rights
    + +% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) { + + + + + + + + +
    +<&|/l&>New Password: + + +
    +<&|/l&>Retype Password: + + +
    +% } + +% $m->callback( %ARGS, CallbackName => 'LeftColumnBottom', UserObj => $UserObj ); +
    +<&| /Widgets/TitleBox, title => loc('Location') &> + + + + + + + + +
    +<&|/l&>Organization: + + +
    +<&|/l&>Address1: + + +
    +<&|/l&>Address2: + + +
    +<&|/l&>City: + + + +
    +<&|/l&>State: + + + +
    +<&|/l&>Zip: + + +
    +<&|/l&>Country: + + +
    + +
    +<&| /Widgets/TitleBox, title => loc('Phone numbers') &> + + + + + + +
    +<&|/l&>Residence: + +
    +
    +<&|/l&>Work: + +
    +
    +<&|/l&>Mobile: + +
    +
    +<&|/l&>Pager: + +
    +
    + +
    +<&| /Widgets/TitleBox, title => loc('Custom Fields') &> + +% my $CFs = $UserObj->CustomFields; +% while (my $CF = $CFs->Next) { + +% } +
    +<% loc($CF->Name) %>: + +% if ($UserObj->id) { +<& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $CF &> +% } else { +<& /Elements/EditCustomField, %ARGS, NamePrefix => 'Object-RT::User-new-CustomField-', CustomField => $CF &> +% } +
    + +% $m->callback( %ARGS, CallbackName => 'RightColumnBottom', UserObj => $UserObj ); +
    +<&| /Widgets/TitleBox, title => loc('Comments about this user') &> + + +%if (!$Create && $UserObj->Privileged) { +
    +<&| /Widgets/TitleBox, title => loc('Signature') &> + + +% } + +
    + +% if ( $Create ) { +<& /Elements/Submit, Label => loc('Create') &> +% } else { +<& /Elements/Submit, Label => loc('Save Changes') &> +% } +
    + +<%INIT> + +my $current_tab; +my $UserObj = new RT::User($session{'CurrentUser'}); +my ($title, $PrivilegedChecked, $EnabledChecked, $Disabled, $result, @results); + +my ($val, $msg); + +if ($Create) { + $current_tab = 'Admin/Users/Modify.html?Create=1'; + $title = loc("Create a new user"); +} +else { + + $current_tab = 'Admin/Users/Modify.html?id='.$id if $id; + + if ( defined $id && $id eq 'new') { + ( $val, $msg ) = $UserObj->Create( + Name => $Name, + EmailAddress => $ARGS{'EmailAddress'}, + Name => $ARGS{'Name'}, + Comments => $ARGS{'Comments'}, + Signature => $ARGS{'Signature'}, + EmailAddress => $ARGS{'EmailAddress'}, + FreeformContactInfo => $ARGS{'FreeformContactInfo'}, + Organization => $ARGS{'Organization'}, + RealName => $ARGS{'RealName'}, + NickName => $ARGS{'NickName'}, + Lang => $ARGS{'Lang'}, + EmailEncoding => $ARGS{'EmailEncoding'}, + WebEncoding => $ARGS{'WebEncoding'}, + ExternalContactInfoId => $ARGS{'ExternalContactInfoId'}, + ContactInfoSystem => $ARGS{'ContactInfoSystem'}, + Gecos => $ARGS{'Gecos'}, + ExternalAuthId => $ARGS{'ExternalAuthId'}, + AuthSystem => $ARGS{'AuthSystem'}, + HomePhone => $ARGS{'HomePhone'}, + WorkPhone => $ARGS{'WorkPhone'}, + MobilePhone => $ARGS{'MobilePhone'}, + PagerPhone => $ARGS{'PagerPhone'}, + Address1 => $ARGS{'Address1'}, + Address2 => $ARGS{'Address2'}, + City => $ARGS{'City'}, + State => $ARGS{'State'}, + Zip => $ARGS{'Zip'}, + Country => $ARGS{'Country'}, + Privileged => $ARGS{'Privileged'}, + Disabled => ($ARGS{'Enabled'} ? 0 : 1) + ); + + 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(); + } + + if ($val) { + $title = loc("Modify the user [_1]", $UserObj->Name); + } + + # If the create failed + else { + $title = loc("Create a new user"); + $Create = 1; + } +} + + + + +# If we have a user to modify, lets try. +if ($UserObj->Id && $id ne 'new') { + + my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo + Organization RealName NickName Lang EmailEncoding WebEncoding + ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId + AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1 + Address2 City State Zip Country + ); + + my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields, + Object => $UserObj, + ARGSRef => \%ARGS ); + push (@results,@fieldresults); + push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj ); + + + # {{{ Deal with special fields: Privileged, Enabled + if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) { + my ($code, $msg) = $UserObj->SetPrivileged($Privileged); + push @results, loc('Privileged status: [_1]', loc_fuzzy($msg)); + } + + #we're asking about enabled on the web page but really care about disabled. + $Disabled = $Enabled ? 0 : 1; + + if ( ($SetEnabled) and ( $Disabled != $UserObj->Disabled) ) { + my ($code, $msg) = $UserObj->SetDisabled($Disabled); + push @results, $msg; + } + + + # }}} +} + +if ( $UserObj->Id ) { + my $password_not_set; + # Deal with Password field + if ( !$Pass1 and !$Pass2 ) { + $password_not_set = 1; + } elsif ( $Pass1 ne $Pass2 ) { + $password_not_set = 1; + push @results, loc("Passwords do not match."); + } elsif ( $Pass1 eq $Pass2 and !$UserObj->IsPassword($Pass1) ) { + my ($code, $msg) = $UserObj->SetPassword($Pass1); + push @results, loc_fuzzy($msg); + $password_not_set = 1 unless $code; + } + if ($id eq 'new' and $password_not_set) { + push @results, loc("A password was not set, so user won't be able to login."); + } +} + + +# Do some setup for the ui +unless ( $UserObj->id && $UserObj->Disabled ) { + $EnabledChecked = 'checked="checked"'; +} + +if (!$Create && $UserObj->Privileged()) { + $PrivilegedChecked = 'checked="checked"'; +} + +# set the id, so the the menu will have the right info, this needs to +# be done here to avoid creating and then modifying a user +$id = $UserObj->Id; + + + + +<%ARGS> +$id => undef +$Name => undef +$Comments => undef +$Signature => undef +$EmailAddress => undef +$FreeformContactInfo => undef +$Organization => undef +$RealName => undef +$NickName => undef +$Privileged => undef +$SetPrivileged => undef +$Enabled => undef +$SetEnabled => undef +$Lang => undef +$EmailEncoding => undef +$WebEncoding => undef +$ExternalContactInfoId => undef +$ContactInfoSystem => undef +$Gecos => undef +$ExternalAuthId => undef +$AuthSystem => undef +$HomePhone => undef +$WorkPhone => undef +$MobilePhone => undef +$PagerPhone => undef +$Address1 => undef +$Address2 => undef +$City => undef +$State => undef +$Zip => undef +$Country => undef +$Pass1 => undef +$Pass2=> undef +$Create=> undef + diff --git a/rt/share/html/Admin/Users/MyRT.html b/rt/share/html/Admin/Users/MyRT.html new file mode 100644 index 000000000..20e612328 --- /dev/null +++ b/rt/share/html/Admin/Users/MyRT.html @@ -0,0 +1,134 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> + +
    + + + +
    + +
    + +% for my $pane (@panes) { +<&|/Widgets/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &> +<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &> +
    +% } + +<%init> +my @actions; +my $current_tab; +$current_tab = 'Admin/Users/MyRT.html?id='.$id if $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}) { + my ($ok, $msg) = $UserObj->SetPreferences('HomepageSettings', {}); + push @actions, $ok ? loc('Preferences saved for user [_1].', $UserObj->Name) : $msg; +} + +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->Config->Get('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; + +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 ) = @_; + my ($ok, $msg) = $UserObj->SetPreferences( 'HomepageSettings', $conf ); + push @actions, $ok ? loc('Preferences [_1] for user [_2].', $pane, $UserObj->Name) : $msg; + } +); + +$m->comp( '/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1 ) + for @panes; + + +<%ARGS> +$id => undef + diff --git a/rt/share/html/Admin/Users/index.html b/rt/share/html/Admin/Users/index.html new file mode 100755 index 000000000..e9a58183d --- /dev/null +++ b/rt/share/html/Admin/Users/index.html @@ -0,0 +1,135 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Select a user') &> +<& /Admin/Elements/UserTabs, current_tab => 'Admin/Users/', + current_subtab => 'Admin/Users/', + Title => loc('Select a user') &> + +

    <% $caption %>

    +

    <&|/l&>Select a user:

    +% unless ( $users->Count ) { +<&|/l&>No users matching search criteria found. +% } else { + +<& /Elements/CollectionList, + OrderBy => 'Name', + Order => 'ASC', + Rows => 100, + %ARGS, + Format => $Format, + Collection => $users, + AllowSorting => 1, + PassArguments => [qw(Format Rows Page Order OrderBy UserString UserOp UserField IdLike EmailLike FindDisabledUsers)], +&> + +% my $ids = join ',', map $_->id, @{ $users->ItemsArrayRef }; +% if ( $ids ) { + +% } + +

    +% } + +
    +% foreach my $field( qw(Format Rows Page Order OrderBy) ) { +% next unless defined $ARGS{ $field } && length $ARGS{ $field }; + +% } +<&|/l&>Find all users whose <& /Elements/SelectUsers, %ARGS &>
    + /> +<&|/l&>Include disabled users in search. +
    +
    +
    + +<%INIT> +my $caption; +my $users = RT::Users->new( $session{'CurrentUser'} ); +$users->{'find_disabled_rows'} = 1 if $FindDisabledUsers; + +if ( defined($UserString) && length $UserString ) { + $caption = loc("Users matching search criteria"); + if ( $UserField =~ /^CustomField-(\d+)/ ) { + $users->LimitCustomField( + CUSTOMFIELD => $1, + OPERATOR => $UserOp, + VALUE => $UserString, + ); + } + else { + $users->Limit( + FIELD => $UserField, + OPERATOR => $UserOp, + VALUE => $UserString, + ); + } +} +else { + $caption = loc("Privileged users"); + $users->LimitToPrivileged; +} + +$Format ||= q{'__id__/TITLE:#'} + .q{,'__Name__/TITLE:Name'} + .q{,__RealName__, __EmailAddress__}; + + +<%ARGS> +$Format => undef, + +$UserString => undef +$UserOp => '=' +$UserField => 'Name' +$IdLike => undef +$EmailLike => undef + +$FindDisabledUsers => 0 + diff --git a/rt/share/html/Admin/autohandler b/rt/share/html/Admin/autohandler new file mode 100644 index 000000000..230b0b51f --- /dev/null +++ b/rt/share/html/Admin/autohandler @@ -0,0 +1,55 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +return $m->call_next(%ARGS) if $session{'CurrentUser'}->UserObj->HasRight( + Right => 'ShowConfigTab', + Object => $RT::System, +); + +$m->clear_and_abort(403); + diff --git a/rt/share/html/Admin/index.html b/rt/share/html/Admin/index.html new file mode 100755 index 000000000..a24ecd956 --- /dev/null +++ b/rt/share/html/Admin/index.html @@ -0,0 +1,95 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 Administration') &> +<& //Admin/Elements/Tabs, Title => loc('RT Administration') &> + +<& /Elements/ListMenu, items => $tabs &> +<%init> + + + +my $tabs = { + A => { + title => loc('Users'), + path => '/Admin/Users/index.html', + description => loc('Manage users and passwords'), + }, + B => { + title => loc('Groups'), + path => '/Admin/Groups/index.html', + description => loc('Manage groups and group membership'), + }, + C => { + title => loc('Queues'), + path => '/Admin/Queues/index.html', + description => loc('Manage queues and queue-specific properties'), + }, + D => { + 'title' => loc('Custom Fields'), + description => loc('Manage custom fields and custom field values'), + path => '/Admin/CustomFields/index.html', + }, + E => { + 'title' => loc('Global'), + path => '/Admin/Global/index.html', + description => + loc('Manage properties and configuration which apply to all queues'), + }, + F => { + 'title' => loc('Tools'), + path => '/Admin/Tools/index.html', + description => loc('Use other RT administrative tools') + }, +}; + + $m->callback( %ARGS, tabs => $tabs ); + + + + + diff --git a/rt/share/html/Approvals/Display.html b/rt/share/html/Approvals/Display.html new file mode 100755 index 000000000..67567c76c --- /dev/null +++ b/rt/share/html/Approvals/Display.html @@ -0,0 +1,72 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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_tab => "Approvals/Display.html", + Title => $title &> +
    + +<&| /Widgets/TitleBox, title => $title &> +<& /Ticket/Elements/ShowHistory , Ticket => $Ticket, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &> +
    +<& Elements/Approve, ticket => $Ticket, ShowApproving => 0 &> + +<& /Elements/Submit&> +
    +<& Elements/ShowDependency, Ticket => $Ticket &> + +<%init> +my $Ticket = LoadTicket($id); + +my $title = loc("Approval #[_1]: [_2]", $Ticket->Id, $Ticket->Subject); + + +<%ARGS> +$id => undef + diff --git a/rt/share/html/Approvals/Elements/Approve b/rt/share/html/Approvals/Elements/Approve new file mode 100755 index 000000000..c705c33b3 --- /dev/null +++ b/rt/share/html/Approvals/Elements/Approve @@ -0,0 +1,94 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ($ShowApproving) { +% foreach my $approving ( $ticket->AllDependedOnBy( Type => 'ticket' ) ) { +
    + <&|/l, $approving->Id, $approving->Subject &>Originating ticket: #[_1] +
    +% if ($ShowCustomFields) { + <& /Ticket/Elements/ShowCustomFields, Ticket => $approving &> +% } +% if ($ShowHistory) { + <& /Ticket/Elements/ShowHistory, Ticket => $approving, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &> +% } +
    +
    +% } +% } +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    +<%ARGS> +$ShowApproving => 1 +$ShowCustomFields => 1 +$ShowHistory => 1 +$ticket => undef + diff --git a/rt/share/html/Approvals/Elements/PendingMyApproval b/rt/share/html/Approvals/Elements/PendingMyApproval new file mode 100755 index 000000000..e6b08f07d --- /dev/null +++ b/rt/share/html/Approvals/Elements/PendingMyApproval @@ -0,0 +1,111 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + +% 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 +<& Approve, ticket => $ticket &> +% } +% } + +<&| /Widgets/TitleBox, title => loc("Search for approvals") &> + /> <&|/l&>Show pending requests
    + /> <&|/l&>Show approved requests
    + /> <&|/l&>Show denied requests
    + /> <&|/l&>Show requests awaiting other approvals
    + +<&|/l,""&>Only show approvals for requests created before [_1]
    + +<&|/l, ""&>Only show approvals for requests created after [_1] + + +<%init> +my $tickets = RT::Tickets->new( $session{'CurrentUser'} ); +$tickets->LimitOwner( VALUE => $session{'CurrentUser'}->Id ); + +# also consider AdminCcs as potential approvers. +my $group_tickets = RT::Tickets->new( $session{'CurrentUser'} ); +$group_tickets->LimitWatcher( VALUE => $session{'CurrentUser'}->UserObj->EmailAddress, TYPE => 'AdminCc' ); + +my $created_before = RT::Date->new( $session{'CurrentUser'} ); +my $created_after = RT::Date->new( $session{'CurrentUser'} ); + +foreach ($tickets, $group_tickets) { + $_->Limit( FIELD => 'Type', VALUE => 'approval' ); + + if ( $ARGS{'ShowResolved'} ) { + $_->LimitStatus( VALUE => 'resolved' ); + } + if ( $ARGS{'ShowRejected'} ) { + $_->LimitStatus( VALUE => 'rejected' ); + } + if ( $ARGS{'ShowPending'} || ( !$ARGS{'ShowRejected'} && !$ARGS{'Resolved'} ) ) { + $_->LimitStatus( VALUE => 'open' ); + $_->LimitStatus( VALUE => 'new' ); + $_->LimitStatus( VALUE => 'stalled' ); + } + + if ( $ARGS{'CreatedBefore'} ) { + $created_before->Set( Format => 'unknown', Value => $ARGS{'CreatedBefore'} ); + $_->LimitCreated( OPERATOR => "<=", VALUE => $created_before->ISO ); + } + if ( $ARGS{'CreatedAfter'} ) { + $created_after->Set( Format => 'unknown', Value => $ARGS{'CreatedAfter'} ); + $_->LimitCreated( OPERATOR => ">=", VALUE => $created_after->ISO ); + } +} + + diff --git a/rt/share/html/Approvals/Elements/ShowDependency b/rt/share/html/Approvals/Elements/ShowDependency new file mode 100755 index 000000000..ee06a966f --- /dev/null +++ b/rt/share/html/Approvals/Elements/ShowDependency @@ -0,0 +1,109 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% my $approving = $Ticket->DependedOnBy(); +% if ($approving->Count) { +

    <&|/l&>Tickets which depend on this approval:

    + + + + + +
      +<%PERL> +my %show; +while (my $link = $approving->Next()) { + next unless ($link->BaseURI->IsLocal()); + my $text = ''; + my $head = ''; + my $type = $link->BaseObj->Type; + my $dep = $m->scomp('ShowDependency', Ticket => $link->BaseObj, _seen => $_seen); + + if ($type eq 'approval') { + $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('/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('/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('/Widgets/TitleBoxEnd'); + $text .= $m->scomp('/Widgets/TitleBoxEnd'); + $text .= $dep; + $text .= ''; + $show{$link->BaseObj->Id} = { + text => $text, + head => $head, + }; +} + +my $refer; +foreach my $id (sort keys %show) { + if ($_seen->{$id}++) { + $refer .= "" . $show{$id}{head} . ""; + next; + } + + $m->print($show{$id}{text}); +} +$m->print($refer); + + +
    + +% } +<%ARGS> +$Ticket +$_seen => {} + diff --git a/rt/share/html/Approvals/Elements/Tabs b/rt/share/html/Approvals/Elements/Tabs new file mode 100755 index 000000000..678e4ce38 --- /dev/null +++ b/rt/share/html/Approvals/Elements/Tabs @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Tabs, + tabs => $tabs, + current_toptab => 'Approvals/', + current_tab => $current_tab, + Title => $Title &> + +<%ARGS> +$tabs => undef +$current_tab => undef +$Title => undef + diff --git a/rt/share/html/Approvals/autohandler b/rt/share/html/Approvals/autohandler new file mode 100644 index 000000000..08adab927 --- /dev/null +++ b/rt/share/html/Approvals/autohandler @@ -0,0 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$m->call_next(%ARGS) if $session{'CurrentUser'}->UserObj->HasRight( + Right => 'ShowApprovalsTab', + Object => $RT::System, +); + diff --git a/rt/share/html/Approvals/index.html b/rt/share/html/Approvals/index.html new file mode 100755 index 000000000..068f9d83c --- /dev/null +++ b/rt/share/html/Approvals/index.html @@ -0,0 +1,90 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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("My approvals") &> +<& /Approvals/Elements/Tabs, Title => loc("My approvals") &> + +<& /Elements/ListActions, actions => \@actions &> +
    +<& Elements/PendingMyApproval, %ARGS &> +<& /Elements/Submit, Label => loc('Go!') &> +
    +<%init> + +my (@actions); +foreach my $arg ( keys %ARGS ) { + + next unless ( $arg =~ /Approval-(\d+)-Action/ ); + + my ( $notesval, $notesmsg ); + + my $ticket = LoadTicket($1); + + if ( $ARGS{ "Approval-" . $ticket->Id . "-Notes" } ) { + my $notes = MIME::Entity->build( + Data => [ $ARGS{ "Approval-" . $ticket->Id . "-Notes" } ] + ); + RT::I18N::SetMIMEEntityToUTF8($notes); # convert text parts into utf-8 + + my ( $notesval, $notesmsg ) = $ticket->Correspond( MIMEObj => $notes ); + if ($notesval) { + push ( @actions, loc("Approval #[_1]: Notes recorded",$ticket->Id )); + } else { + push ( @actions, loc("Approval #[_1]: Notes not recorded due to a system error",$ticket->Id )); + } + } + + my ($val, $msg); + if ( $ARGS{$arg} eq 'deny' ) { + ( $val, $msg ) = $ticket->SetStatus('rejected'); + } + elsif ( $ARGS{$arg} eq 'approve' ) { + ( $val, $msg ) = $ticket->SetStatus('resolved'); + } + push ( @actions, loc("Approval #[_1]: [_2]",$ticket->id, $msg )) if ($msg); +} + diff --git a/rt/share/html/Dashboards/Elements/DashboardsForObject b/rt/share/html/Dashboards/Elements/DashboardsForObject new file mode 100644 index 000000000..3e5d1e2f3 --- /dev/null +++ b/rt/share/html/Dashboards/Elements/DashboardsForObject @@ -0,0 +1,81 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 + +<%init> +# Returns a hash of dashboards associated on $Object + +use RT::Dashboard; +my %dashboards; +my $privacy = RT::Dashboard->_build_privacy($Object); + +while (my $attr = $Object->Attributes->Next) { + if ($attr->Name =~ /^Dashboard\b/) { + my $dashboard = RT::Dashboard->new($session{'CurrentUser'}); + my ($ok, $msg) = $dashboard->Load($privacy, $attr->id); + + if (!$ok) { + $RT::Logger->debug("Unable to load dashboard $ok (privacy $privacy): $msg"); + next; + } + + if ($Object->isa('RT::System')) { + push @{ $dashboards{system} }, $dashboard; + } + elsif ($Object->isa('RT::User')) { + push @{ $dashboards{personal} }, $dashboard; + } + elsif ($Object->isa('RT::Group')) { + push @{ $dashboards{group}{$Object->Name} }, $dashboard; + } + } +} +return \%dashboards; + + diff --git a/rt/share/html/Dashboards/Elements/DashboardsForObjects b/rt/share/html/Dashboards/Elements/DashboardsForObjects new file mode 100644 index 000000000..b4fdcf74e --- /dev/null +++ b/rt/share/html/Dashboards/Elements/DashboardsForObjects @@ -0,0 +1,81 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Objects => undef +$dashboards => {} +$flatten => 0 + +<%init> +# Returns a hash of dashboards associated with @Objects +if (!defined($Objects)) { + @$Objects = RT::Dashboard->new($session{CurrentUser})->_PrivacyObjects; +} + +for my $object (@$Objects) { + my $new_dashboards = $m->comp("/Dashboards/Elements/DashboardsForObject", Object => $object); + + push @{ $dashboards->{$_} }, @{ $new_dashboards->{$_} || [] } + for qw/personal system/; + + push @{ $dashboards->{group}{$_} }, @{ $new_dashboards->{group}{$_} } + for keys %{ $new_dashboards->{group} || {} }; +} + +if ($flatten) { + my @dashboards; + push @dashboards, @{ $dashboards->{personal} || [] }; + push @dashboards, map { @{ $_ || [] } } values %{ $dashboards->{group} }; + push @dashboards, @{ $dashboards->{system} || [] }; + + return \@dashboards; +} + +return $dashboards; + + + diff --git a/rt/share/html/Dashboards/Elements/Deleted b/rt/share/html/Dashboards/Elements/Deleted new file mode 100644 index 000000000..62d0b8db8 --- /dev/null +++ b/rt/share/html/Dashboards/Elements/Deleted @@ -0,0 +1,62 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +@searches + +% if (@searches) { +<&| /Widgets/TitleBox, title => loc('Deleted queries') &> +

    <% loc("The following queries have been deleted and each will be removed from the dashboard once its pane is updated.") %>

    + +
      +% for (@searches) { +
    • <% loc('[_1] (from pane [_2])', ($_->{description} || $_->{name}), $_->{pane}) %>
    • +% } +
    + +% } + diff --git a/rt/share/html/Dashboards/Elements/HiddenSearches b/rt/share/html/Dashboards/Elements/HiddenSearches new file mode 100644 index 000000000..aa3a67ebb --- /dev/null +++ b/rt/share/html/Dashboards/Elements/HiddenSearches @@ -0,0 +1,79 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +@searches +$Dashboard + +<%init> +return if @searches == 0; + +my @display; + +for my $search (@searches) { + if ($search->Name eq 'SavedSearch') { + push @display, $search->Description; + } + elsif ($search->Name =~ m/^Search - (.*)/) { + push @display, $1; + } + else { + push @display, $search->Name; + } +} + + +<&| /Widgets/TitleBox, title => loc('Possible hidden searches') &> +

    <% loc("The following queries may not be visible to all users who can see this dashboard.") %>

    + +
      +% for (@display) { +
    • <% $_ %>
    • +% } +
    + + diff --git a/rt/share/html/Dashboards/Elements/ListOfDashboards b/rt/share/html/Dashboards/Elements/ListOfDashboards new file mode 100644 index 000000000..b2cbd3ebe --- /dev/null +++ b/rt/share/html/Dashboards/Elements/ListOfDashboards @@ -0,0 +1,19 @@ +<%init> +# put the list of dashboards into the navigation +use RT::Dashboard; + +my @objs = RT::Dashboard->new($session{CurrentUser})->_PrivacyObjects(ShowSystem => 1); +my $dashboard_map = $m->comp("/Dashboards/Elements/DashboardsForObjects", Objects => \@objs); + +my @dashboards = ( + (sort { $a->Id <=> $b->Id } @{ $dashboard_map->{personal} || [] }), + (sort { $a->Id <=> $b->Id } @{ $dashboard_map->{system} || [] }), + + map { sort { $a->Id <=> $b->Id } @{ $dashboard_map->{group}{$_} } } + keys %{ $dashboard_map->{group} || {} }, +); + +$m->callback(%ARGS, dashboards => \@dashboards, CallbackName => 'ModifyDashboards'); + +return @dashboards; + diff --git a/rt/share/html/Dashboards/Elements/SelectPrivacy b/rt/share/html/Dashboards/Elements/SelectPrivacy new file mode 100644 index 000000000..ff2c27f94 --- /dev/null +++ b/rt/share/html/Dashboards/Elements/SelectPrivacy @@ -0,0 +1,64 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +@Objects => undef +$Name => undef +$Default => undef + + diff --git a/rt/share/html/Dashboards/Elements/ShowDashboards b/rt/share/html/Dashboards/Elements/ShowDashboards new file mode 100644 index 000000000..d7014b943 --- /dev/null +++ b/rt/share/html/Dashboards/Elements/ShowDashboards @@ -0,0 +1,112 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => $Title &> +<& SELF:table, %ARGS &> + +<%ARGS> +$Title => undef + + +<%METHOD table> +<%ARGS> +$Dashboards => undef +$Verbose => 1 + +<%INIT> +# map each subscription to a dashboard ID +my %subscription_for; + +for my $attr ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')) { + $subscription_for{$attr->SubValue('DashboardId')} = $attr; +} + + +% if (@$Dashboards == 0) { +% if ($Verbose) { +

    <% loc("No dashboards.") %>

    +% } +% } else { + + +% if ($Verbose) { + +% } + + + + +% my $i = 0; +% for my $dashboard (@$Dashboards) { +% my $url = sprintf '%s/Dashboards/%d/%s', +% RT->Config->Get('WebPath'), +% $dashboard->Id, +% $dashboard->Name; + + +% if ($Verbose) { + +% } + + + +% } + +
    <% loc("#") %><% loc("Name") %><% loc("Subscription") %>
    + + <% $dashboard->Id %> + + + + <% $dashboard->Name %> + + + <& /Dashboards/Elements/ShowSubscription, Dashboard => $dashboard, Subscription => $subscription_for{$dashboard->Id} &> +
    +% } + + diff --git a/rt/share/html/Dashboards/Elements/ShowPortlet/component b/rt/share/html/Dashboards/Elements/ShowPortlet/component new file mode 100644 index 000000000..d5e9ccd22 --- /dev/null +++ b/rt/share/html/Dashboards/Elements/ShowPortlet/component @@ -0,0 +1,54 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Dashboard +$Portlet +$Rows => 20 +$Preview => 0 + +% $m->comp($Portlet->{path}); diff --git a/rt/share/html/Dashboards/Elements/ShowPortlet/dashboard b/rt/share/html/Dashboards/Elements/ShowPortlet/dashboard new file mode 100644 index 000000000..ccefe7c04 --- /dev/null +++ b/rt/share/html/Dashboards/Elements/ShowPortlet/dashboard @@ -0,0 +1,89 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Dashboard +$Pane +$Portlet +$Rows => 20 +$Preview => 0 +$Depth => 0 + +<%init> +my $current_dashboard; + +use Scalar::Util 'blessed'; +if (blessed($Portlet) && $Portlet->isa('RT::Dashboard')) { + $current_dashboard = $Portlet; +} +else { + $current_dashboard = RT::Dashboard->new($session{CurrentUser}); + my ($ok, $msg) = $current_dashboard->LoadById($Portlet->{id}); + if (!$ok) { + $m->out($msg); + return; + } +} + +my @panes = @{ $current_dashboard->Panes->{$Pane} || [] }; + +Abort("Possible recursive dashboard detected.") if $Depth > 8; + + +<%perl> +for my $portlet (@panes) { + $m->comp($portlet->{portlet_type}, + Portlet => $portlet, + Rows => $Rows, + Preview => $Preview, + Dashboard => $current_dashboard, + Pane => $Pane, + Depth => $Depth + 1, + ); +} + + diff --git a/rt/share/html/Dashboards/Elements/ShowPortlet/search b/rt/share/html/Dashboards/Elements/ShowPortlet/search new file mode 100644 index 000000000..eb65cb81b --- /dev/null +++ b/rt/share/html/Dashboards/Elements/ShowPortlet/search @@ -0,0 +1,63 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Dashboard +$Portlet +$Rows => 20 +$Preview => 0 + +<%init> +my @for_showsearch = $Dashboard->ShowSearchName($Portlet); + + +<& /Elements/ShowSearch, + @for_showsearch, + Override => { Rows => $Rows }, + hideable => $Preview, + ShowCustomize => $Preview, +&> diff --git a/rt/share/html/Dashboards/Elements/ShowSubscription b/rt/share/html/Dashboards/Elements/ShowSubscription new file mode 100644 index 000000000..208e4c2c1 --- /dev/null +++ b/rt/share/html/Dashboards/Elements/ShowSubscription @@ -0,0 +1,75 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<% $frequency %> +<%ARGS> +$Dashboard => undef +$Subscription => undef + +<%INIT> +my $url = sprintf '%s/Dashboards/Subscription.html?DashboardId=%d', + RT->Config->Get('WebPath'), + $Dashboard->Id,; + +my $frequency = loc("None"); + +if (defined $Subscription) { + my $freq = $Subscription->SubValue('Frequency'); + my $hour = $Subscription->SubValue('Hour'); + + if ($freq eq 'weekly') { + my $day = $Subscription->SubValue('Dow'); + $frequency = loc("weekly (on [_1]) at [_2]", loc($day), $hour); + } + elsif ($freq eq 'monthly') { + $frequency = loc("monthly (day [_1]) at [_2]", $Subscription->SubValue('Dom'), $hour); + } + elsif ($freq eq 'daily') { + $frequency = loc("daily at [_1]", $hour); + } +} + diff --git a/rt/share/html/Dashboards/Elements/Tabs b/rt/share/html/Dashboards/Elements/Tabs new file mode 100755 index 000000000..d82b9d0b6 --- /dev/null +++ b/rt/share/html/Dashboards/Elements/Tabs @@ -0,0 +1,113 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => $subtabs, + current_tab => 'Dashboards/index.html', + current_subtab => $current_subtab, + actions => $actions, + Title => $Title &> + +<%INIT> +my $subtabs; +my $actions; + +if ( $DashboardObj and $DashboardObj->Id ) { + my $id = $DashboardObj->Id; + my $name = $DashboardObj->Name; + + my $modify = "Dashboards/Modify.html?id=$id"; + my $queries = "Dashboards/Queries.html?id=$id"; + my $render = "Dashboards/$id/$name"; + my $subscribe = "Dashboards/Subscription.html?DashboardId=$id"; + + $subtabs = $m->comp('/Elements/DashboardTabs', CurrentDashboard => $DashboardObj); + $current_subtab = $render; + + $actions = { + a_Basics => { + title => loc('Basics'), + path => $modify, + }, + + b_Queries => { + title => loc('Queries'), + path => $queries, + }, + + c_Subscription => { + title => loc('Subscription'), + path => $subscribe, + }, + }; + + delete $actions->{"c_Subscription"} + unless $DashboardObj->CurrentUserCanSubscribe; +} +else { + $subtabs->{"a_Select"} = { + title => loc('Select'), + path => "Dashboards/index.html", + }; + + my $dashboard = RT::Dashboard->new($session{'CurrentUser'}); + my @objects = $dashboard->_PrivacyObjects(Create => 1); + + if (@objects) { + $subtabs->{"b_Create"} = { + title => loc('New'), + path => "Dashboards/Modify.html?Create=1", + separator => 1, + }; + } +} + +<%ARGS> +$DashboardObj => undef +$current_subtab => undef +$Title => undef + diff --git a/rt/share/html/Dashboards/Modify.html b/rt/share/html/Dashboards/Modify.html new file mode 100755 index 000000000..35a804649 --- /dev/null +++ b/rt/share/html/Dashboards/Modify.html @@ -0,0 +1,168 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> +<& /Dashboards/Elements/Tabs, + current_subtab => $current_subtab, + Title => $title, + $Create ? () : (DashboardObj => $Dashboard), +&> +<& /Elements/ListActions, actions => \@results &> + +
    + +%unless ($Dashboard->Id) { + +% } else { + +% } + + + + + +
    +<&|/l&>Name: +
    +<&|/l&>Privacy: + +<& /Dashboards/Elements/SelectPrivacy, Name => "Privacy", Objects => \@privacies, Default => $Dashboard->Privacy &> +
    +% if ( $Create ) { +<& /Elements/Submit, Name => 'Save', Label => loc('Create') &> +% } else { +<& /Elements/Submit, Name => 'Save', Label => loc('Save Changes') &> +% } +% if ($Dashboard->Id && $can_delete) { +<& /Elements/Submit, Name => 'Delete', Label => loc('Delete') &> +% } +
    +<%INIT> + +my $current_subtab; +my ($title, @results); +my $tried_create = 0; + +# user went directly to Modify.html +$Create = 1 if !$id; + +use RT::Dashboard; + +my $Dashboard = RT::Dashboard->new($session{'CurrentUser'}); +my @privacies = $Dashboard->_PrivacyObjects(($Create ? 'Create' : 'Modify') => 1); + +Abort(loc("Permission denied")) if @privacies == 0; + +if ($Create) { + $current_subtab = 'Dashboards/Modify.html?Create=1'; + $title = loc("Create a new dashboard"); +} +else { + if ($id eq 'new') { + $tried_create = 1; + + my ($val, $msg) = $Dashboard->Save( + Name => $ARGS{'Name'}, + Privacy => $ARGS{'Privacy'}, + ); + + if (!$val) { + Abort(loc("Dashboard could not be created: [_1]", $msg)); + } + + push @results, $msg; + $id = $Dashboard->Id; + } + else { + my ($ok, $msg) = $Dashboard->LoadById($id); + $ok || Abort($msg); + } + + if ($id) { + $title = loc("Modify the dashboard [_1]", $Dashboard->Name); + $current_subtab = 'Dashboards/Modify.html?id=' . $id; + } + # If the create failed + else { + $Create = 1; + $current_subtab = 'Dashboards/Modify.html?Create=1'; + $title = loc("Create a new dashboard"); + } +} + +if (!$Create && !$tried_create && $id && $ARGS{'Save'}) { + my ($ok, $msg) = $Dashboard->Update(Privacy => $ARGS{'Privacy'}, + Name => $ARGS{'Name'}); + + if ($ok) { + push @results, loc("Dashboard updated"); + } + else { + push @results, loc("Dashboard could not be updated: [_1]", $msg); + } + +} + +my $can_delete = $Dashboard->CurrentUserCanDelete; + +if (!$Create && !$tried_create && $id && $ARGS{'Delete'}) { + my ($ok, $msg) = $Dashboard->Delete(); + $ok || Abort(loc("Couldn't delete dashboard [_1]: [_2]", $id, $msg)); + + # put the user back into a useful place with a message + RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Dashboards/index.html?Deleted=$id"); + +} + + +<%ARGS> +$Create => undef +$Name => undef +$id => '' unless defined $id +$Delete => undef + + diff --git a/rt/share/html/Dashboards/Queries.html b/rt/share/html/Dashboards/Queries.html new file mode 100644 index 000000000..1a1066be6 --- /dev/null +++ b/rt/share/html/Dashboards/Queries.html @@ -0,0 +1,280 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> +<& /Dashboards/Elements/Tabs, + current_subtab => $current_subtab, + Title => $title, + DashboardObj => $Dashboard &> + +<& /Widgets/SelectionBox:header, nojs => 1 &> + +<& /Elements/ListActions, actions => \@results &> + +<& Elements/Deleted, searches => \@deleted, Dashboard => $Dashboard &> + +<& Elements/HiddenSearches, searches => \@hidden_searches, Dashboard => $Dashboard &> + + +% for my $pane (@panes) { + +% } +
    +
    + + + +<&| /Widgets/TitleBox, title => $pane->{DisplayName} &> +% my ( $pane_name ) = $pane->{Name} =~ /Searches-(.+)/; + <& /Widgets/SelectionBox:show, self => $pane, nojs => 1, grep( { + $_->{pane} eq $pane_name} @deleted ) ? ( ShowUpdate => 1 ) : () &> + +
    +
    + +<%INIT> + +my $current_subtab = 'Dashboards/Queries.html?id=' . $id; +my @results; + +use RT::Dashboard; +my $Dashboard = new RT::Dashboard($session{'CurrentUser'}); +my ($ok, $msg) = $Dashboard->LoadById($id); +$ok || Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg)); +my $title = loc("Modify the queries of dashboard [_1]", $Dashboard->Name); + +my %desc_of; +my @items; +my %selected; +my %still_exists; + +# add portlets (homepage componenets) +my @components = @{ RT->Config->Get('HomepageComponents') }; + +for my $desc (@components) { + my $name = "component-$desc"; + push @items, [$name, $desc]; + $desc_of{$name} = $desc; + $still_exists{$name} = 1; +} + +# add dashboards +my $dashboards = $m->comp("/Dashboards/Elements/DashboardsForObjects", flatten => 1); +for my $dashboard (@{ $dashboards || [] }) { + # Users *can* set up mutually recursive dashboards, but don't make it THIS + # easy for them to shoot themselves in the foot. + next if $dashboard->Id == $Dashboard->Id; + + my $name = 'dashboard-' . $dashboard->Id . '-' . $dashboard->Privacy; + my $desc = "Dashboard: " . $dashboard->Name; + push @items, [$name, $desc]; + $desc_of{$name} = $desc; + $still_exists{$name} = 1; +} + +# add saved searches +my @objs = RT::System->new($session{'CurrentUser'}); + +push @objs, RT::SavedSearches->new( $session{CurrentUser} )->_PrivacyObjects + if $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch', + Object => $RT::System ); + +for my $object (@objs) { + for ($m->comp("/Search/Elements/SearchesForObject", Object => $object)) { + my ($desc, $search) = @$_; + my $SearchType = $search->Content->{'SearchType'} || 'Ticket'; + my $type = ($SearchType eq 'Ticket') ? 'Saved Search' : $SearchType; # loc + $desc = "$type: $desc"; + my $privacy = $Dashboard->_build_privacy($object); + my $name = 'search-' . $search->Id . '-' . $privacy; + push @items, [$name, $desc]; + $desc_of{$name} = $desc; + $still_exists{$name} = 1; + } +} + +# Get the list of queries already in use +my @deleted; +do { + my $panes = $Dashboard->Panes; + for my $pane (keys %$panes) { + for my $portlet (@{ $panes->{$pane} }) { + my $name; + my $type = $portlet->{portlet_type}; + + if ($type eq 'search' || $type eq 'dashboard') { + $name = join '-', $type, $portlet->{id}, $portlet->{privacy}; + } + elsif ($type eq 'component') { + $name = join '-', 'component', $portlet->{component}; + } + + if (!$still_exists{$name}) { + push @deleted, { + pane => $pane, + name => $name, + description => $portlet->{description}, + }; + next; + } + + push @{ $selected{$pane} }, $name; + $desc_of{$name} = $portlet->{description}; + } + } +}; + +$m->callback( + CallbackName => 'PopulatePossibilities', + Dashboard => $Dashboard, + items => \@items, + desc_of => \%desc_of, + still_exists => \%still_exists, + selected => \%selected, +); + +# Create selectionbox widgets for those queries + +my %pane_name = ( + 'body' => loc('Body'), + 'sidebar' => loc('Sidebar'), +); + +$m->callback( + CallbackName => 'Panes', + Dashboard => $Dashboard, + panes => \%pane_name, +); + +my @panes; +for my $pane (keys %pane_name) { + my $sel = $m->comp( + '/Widgets/SelectionBox:new', + Action => 'Queries.html', + Name => "Searches-$pane", + DisplayName => $pane_name{$pane}, + Available => \@items, + Selected => $selected{$pane}, + AutoSave => 1, + OnSubmit => sub { + my $self = shift; + + $m->callback( + CallbackName => 'Submit', + Dashboard => $Dashboard, + Selected => $self->{Current}, + pane => $pane, + ); + + my @portlets; + for (@{ $self->{Current} }) { + my $item = $_; + my $desc = $desc_of{$item}; + my $portlet_type = $1 if $item =~ s/^(\w+)-//; + + if ($portlet_type eq 'search' || $portlet_type eq 'dashboard') { + my ($id, $privacy) = split '-', $item, 2; + push @portlets, { + portlet_type => $portlet_type, + privacy => $privacy, + id => $id, + description => $desc, + pane => $pane, + }; + } + elsif ($portlet_type eq 'component') { + # Absolute paths stay absolute, relative paths go into + # /Elements. This way, extensions that add portlets work. + my $path = $item; + $path = "/Elements/$path" if substr($path, 0, 1) ne '/'; + + push @portlets, { + portlet_type => $portlet_type, + component => $item, + path => $path, + description => $item, + pane => $pane, + }; + } + } + + # we want to keep all the other panes the same + my $panes = $Dashboard->Panes; + $panes->{$pane} = \@portlets; + + # remove "deleted" warnings about this pane + @deleted = grep { $_->{pane} ne $pane } @deleted; + + $m->callback( + CallbackName => 'BeforeUpdate', + Dashboard => $Dashboard, + panes => $panes, + ); + + my ($ok, $msg) = $Dashboard->Update(Panes => $panes); + + if ($ok) { + push @results, loc("Dashboard updated"); + } + else { + push @results, loc("Dashboard could not be updated: [_1]", $msg); + } + }, + ); + + push @panes, $sel; +} + +$m->comp('/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1) + for @panes; + +my @hidden_searches = $Dashboard->PossibleHiddenSearches; + +<%ARGS> +$id => '' unless defined $id + + diff --git a/rt/share/html/Dashboards/Render.html b/rt/share/html/Dashboards/Render.html new file mode 100644 index 000000000..1893b533f --- /dev/null +++ b/rt/share/html/Dashboards/Render.html @@ -0,0 +1,143 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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, + JavaScript => $Preview, + ShowBar => $Preview, + Refresh => $Refresh, +&> + +% if ($Preview) { +<& /Dashboards/Elements/Tabs, + current_subtab => $current_subtab, + Title => $title, + DashboardObj => $DashboardObj &> +% } + +% $m->callback(CallbackName => 'BeforeTable', Dashboard => $DashboardObj, show_cb => $show_cb); + + + + +% $m->callback(CallbackName => 'BeforePanes', Dashboard => $DashboardObj, show_cb => $show_cb); + + + + + + + + + +% $m->callback(CallbackName => 'AfterPanes', Dashboard => $DashboardObj, show_cb => $show_cb); + +
    +% $show_cb->('body'); + +% $show_cb->('sidebar'); +
    + +% $m->callback(CallbackName => 'AfterTable', Dashboard => $DashboardObj, show_cb => $show_cb); + + + + + + + +<%INIT> + +my $current_subtab = 'Dashboards/Render.html?id=' . $id; + +use RT::Dashboard; +my $DashboardObj = RT::Dashboard->new($session{'CurrentUser'}); +my ($ok, $msg) = $DashboardObj->LoadById($id); +Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg)) if !$ok; + +my $SubscriptionObj = RT::Attribute->new($session{'CurrentUser'}); +my $rows; + +# try to load the subscription to this id to get a better idea of number of rows +for my $sub ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')) { + next unless $sub->SubValue('DashboardId') == $id; + $SubscriptionObj = $sub; + $rows = $SubscriptionObj->SubValue('Rows'); + last; +} + +# otherwise honor their search preferences.. otherwise 20 rows +if (!$rows) { + my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {}; + $rows = defined($prefs->{'RowsPerPage'}) ? $prefs->{'RowsPerPage'} : 20; +} + +my $title = loc 'Dashboard [_1]', $DashboardObj->Name; + +my $show_cb = sub { + my $pane = shift; + $m->comp('Elements/ShowPortlet/dashboard', + Portlet => $DashboardObj, + Rows => $rows, + Preview => $Preview, + Dashboard => $DashboardObj, + Pane => $pane, + Depth => 0, + ); +}; + +my $Refresh = $Preview + ? $session{'home_refresh_interval'} + || RT->Config->Get('HomePageRefreshInterval', $session{'CurrentUser'}) + : 0; + + +<%ARGS> +$id => undef +$Preview => 1 + + diff --git a/rt/share/html/Dashboards/Subscription.html b/rt/share/html/Dashboards/Subscription.html new file mode 100644 index 000000000..3de58acdd --- /dev/null +++ b/rt/share/html/Dashboards/Subscription.html @@ -0,0 +1,292 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> +<& /Dashboards/Elements/Tabs, + current_subtab => $current_subtab, + Title => $title, + DashboardObj => $DashboardObj &> + +<& /Elements/ListActions, actions => \@results &> + +
    + + + + + + +
    +<&| /Widgets/TitleBox, title => loc('Dashboard') &> + + + + + + +
    +<&|/l&>Dashboard: + +<% $DashboardObj->Name %> +
    +<&|/l&>Queries: + +% my @portlets = grep { defined } $DashboardObj->Portlets; +% if (!@portlets) { +(<&|/l&>none) +% } else { +
      +% for my $portlet (@portlets) { +
    1. + <% loc($portlet->{description}, $fields{'Rows'}) %> +
    2. +% } +
    +% } +
    + + +<&| /Widgets/TitleBox, title => loc('Subscription') &> + + + + + + + +
    +<&|/l&>Frequency: + + +> + <&|/l&>daily +
    + +> + <&|/l&>Monday through Friday +
    + +> +<&|/l&>weekly, <&|/l&>on + +<&|/l&>every + +<&|/l&>weeks +
    + +> +<&|/l&>monthly , <&|/l&>on day + +
    + +> + <&|/l&>never + + +
    +<&|/l&>Hour: + + +(<%$timezone%>) +
    +<&|/l&>Rows: + + +
    +<&|/l&>Recipient: + + +
    <% loc("Leave blank to send to your current email address ([_1])", $session{'CurrentUser'}->UserObj->EmailAddress) %>
    +
    + +
    + +% if ($SubscriptionObj->Id) { + <& /Elements/Submit, Name => "Save", Label => loc('Save Changes') &> +% } else { + <& /Elements/Submit, Name => "Save", Label => loc('Subscribe') &> +% } +
    + +<%INIT> + +my $current_subtab = 'Dashboards/Subscription.html?DashboardId=' . $DashboardId; + +my ($title, @results); +my ($val, $msg); +my $Loaded = 0; +my $timezone = $session{'CurrentUser'}->UserObj->Timezone || RT->Config->Get('Timezone'); + +use RT::Dashboard; +my $DashboardObj = RT::Dashboard->new($session{'CurrentUser'}); + +my $SubscriptionObj = RT::Attribute->new($session{'CurrentUser'}); + +# first let's see if we already have a subscription to this DashboardId +for my $sub ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')) { + next unless $sub->SubValue('DashboardId') == $DashboardId; + $SubscriptionObj = $sub; + last; +} + +$DashboardId = $SubscriptionObj->Id + ? $SubscriptionObj->SubValue('DashboardId') + : $ARGS{'DashboardId'}; + +($val, $msg) = $DashboardObj->LoadById($DashboardId); +$val || Abort(loc("Couldn't load dashboard [_1]: [_2].", $DashboardId, $msg)); + +my %fields = ( + DashboardId => $DashboardId, + Frequency => 'daily', + Hour => '06:00', + Dow => 'Monday', + Dom => 1, + Rows => 20, + Recipient => '', + Fow => 1, + Counter => 0, +); + +# update any fields with the values from the subscription object +if ($SubscriptionObj->Id) { + for my $field (keys %fields) { + $fields{$field} = $SubscriptionObj->SubValue($field); + } +} + +# finally, update any fields with arguments passed in by the user +for my $field (keys %fields) { + next if $field eq 'DashboardId'; # but this one is immutable + $fields{$field} = $ARGS{$field} + if defined($ARGS{$field}); +} +# this'll be defined on submit +if (defined $ARGS{Save}) { + # update + if ($SubscriptionObj->Id) { + $DashboardId = delete $fields{'DashboardId'}; # immutable + ($val, $msg) = $SubscriptionObj->SetSubValues(%fields); + $fields{'DashboardId'} = $DashboardId; + + # not so good to spew base64-encoded data at the user :) + if ($msg =~ /^Content changed from/) { + $msg = "Subscription updated."; + } + + push @results, $msg; + } + # create + else { + Abort(loc("Unable to subscribe to dashboard [_1]: Permission denied", $DashboardId)) + unless $DashboardObj->CurrentUserCanSubscribe; + + my ($val, $msg) = $SubscriptionObj->Create( + Name => 'Subscription', + Description => 'Subscription to dashboard ' . $DashboardId, + ContentType => 'storable', + Object => $session{'CurrentUser'}->UserObj, + Content => \%fields, + ); + if ($val) { + push @results, loc("Subscribed to dashboard [_1]", $DashboardObj->Name); + push @results, loc("Warning: you have no email address set, so you will not receive this dashboard until you have it set") + unless $session{'CurrentUser'}->EmailAddress || $fields{Recipient}; + } + else { + push @results, loc('Subscription could not be created: [_1]', $msg); + } + } +} + +if ($SubscriptionObj->Id) { + $title = loc("Modify the subscription to dashboard [_1]", $DashboardObj->Name); +} +else { + $title = loc("Subscribe to dashboard [_1]", $DashboardObj->Name); +} + + +<%ARGS> +$DashboardId => undef +$Frequency => undef +$Hour => undef +$Dow => undef +$Dom => undef +$Rows => undef +$Recipient => undef + + diff --git a/rt/share/html/Dashboards/dhandler b/rt/share/html/Dashboards/dhandler new file mode 100644 index 000000000..056476bf9 --- /dev/null +++ b/rt/share/html/Dashboards/dhandler @@ -0,0 +1,56 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +if ($m->dhandler_arg =~ /^(\d+)/) { + $m->comp('/Dashboards/Render.html', id => $1, %ARGS); +} +else { + $m->decline; +} + + diff --git a/rt/share/html/Dashboards/index.html b/rt/share/html/Dashboards/index.html new file mode 100644 index 000000000..8f71ab060 --- /dev/null +++ b/rt/share/html/Dashboards/index.html @@ -0,0 +1,107 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 &> +<& /Dashboards/Elements/Tabs, + current_subtab => 'Dashboards/index.html', + Title => $title &> + +<& /Elements/ListActions, actions => \@actions &> + +<& /Dashboards/Elements/ShowDashboards, + Title => loc('Personal Dashboards'), + Dashboards => \@personal_dashboards, +&> + +<& /Dashboards/Elements/ShowDashboards, + Title => loc('System Dashboards'), + Dashboards => \@system_dashboards, +&> + +% for (@grouped_dashboards) { +% my $group = $_->{name}; +% my $dashboards = $_->{dashboards}; + + <& /Dashboards/Elements/ShowDashboards, + Title => loc('[_1] DashBoards', $group), + Dashboards => $dashboards, + &> +% } + +<%INIT> +my $title = loc("Dashboards"); +use RT::Dashboard; + +my $dashboards = $m->comp("/Dashboards/Elements/DashboardsForObjects"); + +my @actions; +if (defined $Deleted) { + push @actions, loc("Deleted dashboard [_1]", $Deleted); +} + +my @personal_dashboards = sort { $a->Id <=> $b->Id } @{ $dashboards->{personal} || [] }; +my @system_dashboards = sort { $a->Id <=> $b->Id } @{ $dashboards->{system} || [] }; + +my @groups = sort keys %{ $dashboards->{group} || {} }; +my @grouped_dashboards = map { + { + name => $_, + dashboards => [ sort { $a->Id <=> $b->Id } @{ $dashboards->{group}{$_} || [] } ], + } +} @groups; + +$m->callback( + PersonalDashboards => \@personal_dashboards, + SystemDashboards => \@system_dashboards, + GroupedDashboards => \@grouped_dashboards, + CallbackName => 'MassageDashboards', +); + +<%ARGS> +$Deleted => undef + + diff --git a/rt/share/html/Download/CustomFieldValue/dhandler b/rt/share/html/Download/CustomFieldValue/dhandler new file mode 100644 index 000000000..218de33c8 --- /dev/null +++ b/rt/share/html/Download/CustomFieldValue/dhandler @@ -0,0 +1,77 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<%perl> +my $id; +my $arg = $m->dhandler_arg; # get rest of path +if ($arg =~ /^(\d+)\//) { + $id = $1; +} +else { + Abort("Corrupted customfieldvalue URL."); +} +my $OCFV = RT::ObjectCustomFieldValue->new($session{'CurrentUser'}); +$OCFV->Load($id) || Abort("OCFV '$id' could not be loaded"); + +unless ($OCFV->id) { + Abort("Bad OCFV id. Couldn't find OCFV '$id'\n"); +} + +my $content_type = $OCFV->ContentType || 'text/plain'; + +unless (RT->Config->Get('TrustHTMLAttachments')) { + $content_type = 'text/plain' if ($content_type =~ /^text\/html/i); +} + +$r->content_type( $content_type ); +$m->clear_buffer(); +$m->out($OCFV->LargeContent); +$m->abort; + +<%attr> +AutoFlush => 0 + diff --git a/rt/share/html/Download/Tabular/dhandler b/rt/share/html/Download/Tabular/dhandler new file mode 100644 index 000000000..e12bb24d9 --- /dev/null +++ b/rt/share/html/Download/Tabular/dhandler @@ -0,0 +1,76 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<%perl> +my ($class, $filename, @ids); +my $arg = $m->dhandler_arg; # get rest of path +if ($arg =~ /^(\w+)\/([,\d]+)(?:\/([^\/]+))?/) { + $class = "RT::$1"; + $filename = $3 || "$1s.tsv"; + @ids = sort split(/,+/, $2); +} +else { + Abort("Corrupted tabular URL."); +} + +my @cols = $class->BasicColumns or return; + +#$r->content_type( 'application/octet-stream' ); +$r->content_type( 'text/plain' ); +$r->headers_out->{'Content-Disposition'} = "attachment; filename=$filename"; +$m->clear_buffer(); +$m->out(join("\t", "Id", map $_->[1], @cols), "\n"); +foreach my $id (@ids) { + my $obj = $class->new; + $obj->Load($id) or next; + $m->out(join("\t", map $obj->$_, "Id", map $_->[0], @cols), "\n"); +} +$m->abort; + +<%attr> +AutoFlush => 0 + diff --git a/rt/share/html/Elements/BevelBoxRaisedEnd b/rt/share/html/Elements/BevelBoxRaisedEnd new file mode 100755 index 000000000..575a47ab7 --- /dev/null +++ b/rt/share/html/Elements/BevelBoxRaisedEnd @@ -0,0 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + diff --git a/rt/share/html/Elements/BevelBoxRaisedStart b/rt/share/html/Elements/BevelBoxRaisedStart new file mode 100755 index 000000000..980c4cf95 --- /dev/null +++ b/rt/share/html/Elements/BevelBoxRaisedStart @@ -0,0 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + +<%PERL> + +my $generic_query_args = $GenericQueryArgs || {map { $_ => $ARGS{$_} } @PassArguments}; +# backward compatibility workaround +$generic_query_args->{'Format'} = $FormatString if grep $_ eq 'Format', @PassArguments; + +my $item = 0; +foreach my $col ( @Format ) { + my $title = $col->{'title'} || ''; + if ( $title eq 'NEWLINE' ) { + while ( $item < $maxitems ) { + $m->out(qq{\n}); + $item++; + } + + $item = 0; + $m->out(qq{\n}); + next; + } elsif ( $title eq 'NBSP' ) { + $item++; + $m->out(qq{\n}); + next; + } + + my $span = $col->{'span'}; + $item += ($span || 1); + + $m->out(''); +} + + diff --git a/rt/share/html/Elements/CollectionAsTable/ParseFormat b/rt/share/html/Elements/CollectionAsTable/ParseFormat new file mode 100644 index 000000000..d58246fff --- /dev/null +++ b/rt/share/html/Elements/CollectionAsTable/ParseFormat @@ -0,0 +1,108 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Format + + +<%init> +use Regexp::Common qw/delimited/; +my @Columns; + +while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) { + my $col = $1; + + if ($col =~ /^$RE{quoted}$/o) { + substr($col,0,1) = ""; + substr($col,-1,1) = ""; + } + + my $colref = { }; + + $m->callback(CallbackName => 'PreColumn', Column => $colref, col => \$col); + + while ( $col =~ s{/(STYLE|CLASS|TITLE|ALIGN|SPAN|ATTRIBUTE):([^/]*)}{}i ) { + $colref->{ lc $1 } = $2; + } + $colref->{'last_attribute'} = $colref->{'attribute'}; + + unless ( length $col ) { + $colref->{'output'} = []; + $colref->{'last_attribute'} = $colref->{'attribute'} = '' + unless defined $colref->{'attribute'}; + } + elsif ( $col =~ /^__(NEWLINE|NBSP)__$/ || $col =~ /^(NEWLINE|NBSP)$/ ) { + $colref->{'title'} = $1; + } + elsif ( $col =~ /__(.*?)__/io ) { + my @subcols; + while ( $col =~ s/^(.*?)__(.*?)__//o ) { + push ( @subcols, $1 ) if $1; + push ( @subcols, "__$2__" ); + $colref->{'last_attribute'} = $2; + } + push @subcols, $col; + $colref->{'output'} = \@subcols; + $colref->{'attribute'} = $colref->{'last_attribute'} + unless defined $colref->{'attribute'}; + } + else { + $colref->{'output'} = [ "__" . $col . "__" ]; + $colref->{'last_attribute'} = $col; + $colref->{'attribute'} = $col + unless defined $colref->{'attribute'}; + } + + $m->callback(CallbackName => 'PostColumn', Column => $colref, col => \$col); + + push @Columns, $colref; +} + +$m->callback(CallbackName => 'PostProcess', Columns => \@Columns, Format => $Format); + +return(@Columns); + diff --git a/rt/share/html/Elements/CollectionAsTable/Row b/rt/share/html/Elements/CollectionAsTable/Row new file mode 100644 index 000000000..fa7474b6c --- /dev/null +++ b/rt/share/html/Elements/CollectionAsTable/Row @@ -0,0 +1,143 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$i => undef +@Format => undef +$record => undef +$maxitems => undef +$Depth => undef +$Warning => undef +$ColumnMap => {} +$Class => 'RT__Ticket' + +<%init> +$m->out( '' + . "\n" ); +use HTML::Entities; +my $item; +foreach my $column (@Format) { + if ( defined $column->{title} && $column->{title} eq 'NEWLINE' ) { + while ( $item < $maxitems ) { + $m->out(qq{\n}); + $item++; + } + $item = 0; + $m->out( '' . "\n" ); + $m->out( '' + . "\n" ); + next; + } + + my $class = $column->{class} ? encode_entities( $column->{class}, q{'"&<>} ) : 'collection-as-table'; + $m->out(qq{' . "\n" ); +} +$m->out(''); + diff --git a/rt/share/html/Elements/CollectionList b/rt/share/html/Elements/CollectionList new file mode 100644 index 000000000..6f21420f5 --- /dev/null +++ b/rt/share/html/Elements/CollectionList @@ -0,0 +1,175 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +if (!$Collection && $Class eq 'RT::Tickets') { + $Collection = RT::Tickets->new( $session{'CurrentUser'} ); + $Collection->FromSQL($Query); +} + +my $TotalFound = $Collection->CountAll(); +return '' if !$TotalFound && !$ShowEmpty; + +if ( @OrderBy ) { + if ( $OrderBy[0] =~ /\|/ ) { + @OrderBy = split /\|/, $OrderBy[0]; + @Order = split /\|/,$Order[0]; + } + $Collection->OrderByCols( + map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } } + ( 0 .. $#OrderBy ) + ); +} + +$Collection->RowsPerPage( $Rows ) if $Rows; +$Page = 1 unless $Page && $Page > 0; # workaround problems with $Page = '' or undef +$Collection->GotoPage( $Page - 1 ); # SB uses page 0 as the first page + +# DisplayFormat lets us use a "temporary" format for display, while +# still using our original format for next/prev page links. +# bulk update uses this feature to add checkboxes + +$DisplayFormat ||= $Format; + +# Scrub the html of the format string to remove any potential nasties. +$Format = $m->comp('/Elements/ScrubHTML', Content => $Format); +$DisplayFormat = $m->comp('/Elements/ScrubHTML', Content => $DisplayFormat); + +my @Format = $m->comp('/Elements/CollectionAsTable/ParseFormat', Format => $DisplayFormat); + +# Find the maximum number of items in any row, so we can pad the table. +my ($maxitems, $item) = (0, 0); +foreach my $col (@Format) { + $item++; + if ( $col->{title} && ($col->{title} eq 'NEWLINE') ) { + $item = 0; + } + else { + $maxitems = $item if $item > $maxitems; + } +} + +$Class ||= ref $Collection; +$Class =~ s/s$//; +$Class =~ s/:/_/g; + +$m->out('
    diff --git a/rt/share/html/Elements/Callback b/rt/share/html/Elements/Callback new file mode 100755 index 000000000..ec647097f --- /dev/null +++ b/rt/share/html/Elements/Callback @@ -0,0 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$ARGS{'CallbackPage'} = delete $ARGS{'Page'} || $m->callers(1)->path; +$ARGS{'CallbackName'} = delete $ARGS{'_CallbackName'}; +$RT::Logger->debug("$ARGS{'CallbackPage'} calls old style callback, use \$m->callback"); +return $m->callback( %ARGS ); + diff --git a/rt/share/html/Elements/Checkbox b/rt/share/html/Elements/Checkbox new file mode 100755 index 000000000..72ab677b6 --- /dev/null +++ b/rt/share/html/Elements/Checkbox @@ -0,0 +1,63 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => undef +$Default => undef +$True => undef +$False => undef +$IsChecked => undef + + +<%INIT> +$IsChecked = + ($Default && $Default =~ /checked/i) + ? ' checked="checked" ' : ""; +1; + diff --git a/rt/share/html/Elements/CollectionAsTable/Header b/rt/share/html/Elements/CollectionAsTable/Header new file mode 100644 index 000000000..550ce9f3f --- /dev/null +++ b/rt/share/html/Elements/CollectionAsTable/Header @@ -0,0 +1,142 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Class => 'RT__Ticket' + +@Format => undef +$FormatString => undef +@OrderBy => () +@Order => () +$Query => undef +$Rows => undef +$Page => undef +$GenericQueryArgs => undef +$maxitems => undef + +$AllowSorting => undef +$BaseURL => undef +@PassArguments => qw(Query Format Rows Page Order OrderBy) + +
     
     out(' colspan="' . $m->interp->apply_escapes($span => 'h') . '"') + if $span; + $m->out('>'); + + # if title is not defined then use defined attribute or last + # one we saw in the format + unless ( defined $col->{'title'} ) { + my $attr = $col->{'attribute'} || $col->{'last_attribute'}; + my $tmp = $m->comp( '/Elements/ColumnMap', + Class => $Class, + Name => $attr, + Attr => 'title', + ); + $title = ProcessColumnMapValue( $tmp, Arguments => [ $attr ] ); + } else { + $title = $m->comp('/Elements/ScrubHTML', Content => $title); + } + + if ( $AllowSorting and $col->{'attribute'} + and my $attr = $m->comp( + "/Elements/ColumnMap", + Class => $Class, + Name => $col->{'attribute'}, + Attr => 'attribute' + ) + ) + { + $attr = ProcessColumnMapValue( $attr, Arguments => [ $col->{'attribute'} ], Escape => 0 ); + + my $new_order = 'ASC'; + $new_order = $Order[0] eq 'ASC'? 'DESC': 'ASC' + if $OrderBy[0] && $OrderBy[0] eq $attr; + + $m->out( + ''. loc($title) .'' + ); + } + else { + $m->out( loc($title) ); + } + $m->out('
     
    { $attr } ) { + $attrs{ $attr } = $column->{ $attr }; + next; + } + + # if it's not defined then use column map + my $col = $column->{'attribute'} || $column->{'last_attribute'}; + unless ( exists $ColumnMap->{$col}{$attr} ) { + next unless $col; + + $ColumnMap->{$col}{$attr} = $m->comp( + "/Elements/ColumnMap", + Class => $Class, + Name => $col, + Attr => $attr, + ); + } + $attrs{ $attr } = ProcessColumnMapValue( + $ColumnMap->{$col}{$attr}, + Arguments => [$record, $i], + Escape => 0, + ); + } + + $attrs{colspan} = $column->{span}; + $item += ($attrs{'colspan'} || 1); + + my @out; + foreach my $subcol ( @{ $column->{output} } ) { + my ($col) = ($subcol =~ /^__(.*?)__$/); + unless ( $col ) { + push @out, $subcol; + next; + } + + unless ( exists $ColumnMap->{$col}{'value'} ) { + $ColumnMap->{$col}{'value'} = $m->comp( + "/Elements/ColumnMap", + Class => $Class, + Name => $col, + Attr => 'value' + ); + } + + push @out, ProcessColumnMapValue( + $ColumnMap->{$col}{'value'}, + Arguments => [$record, $i], + ); + } + s/\n/
    /gs for @out; + + $m->out( $_ .'="'. $m->interp->apply_escapes( $attrs{$_} => 'h' ) .'"' ) + foreach grep $attrs{$_}, qw(align style colspan); + + $m->out('>'); + $m->out(@out) if @out; + $m->out( '
    '); + +if ( $ShowHeader ) { + $m->comp('/Elements/CollectionAsTable/Header', + %ARGS, + Class => $Class, + Format => \@Format, + FormatString => $Format, + Order => \@Order, + OrderBy => \@OrderBy, + Rows => $Rows, + Page => $Page, + AllowSorting => $AllowSorting, + BaseURL => $BaseURL, + GenericQueryArgs => $GenericQueryArgs, + maxitems => $maxitems, + ); +} + +my ($i, $column_map) = (0, {}); +while ( my $record = $Collection->Next ) { + # Every ten rows, flush the buffer and put something on the page. + $m->flush_buffer unless ++$i % 10; + $m->comp('/Elements/CollectionAsTable/Row', + i => $i, + Format => \@Format, + record => $record, + maxitems => $maxitems, + ColumnMap => $column_map, + Class => $Class, + ); +} + +$m->out('
    '); +if ( $Rows && $ShowNavigation && $TotalFound > $Rows ) { + my $oddRows = ($TotalFound && $TotalFound % $Rows == 0 )? 0 : 1; + my $pages = int( $TotalFound / $Rows ) + $oddRows; + $pages = 1 if $pages < 1; + + + my %query_args = map { $_ => $ARGS{$_} } @PassArguments; + $m->comp( + '/Elements/CollectionListPaging', + BaseURL => $BaseURL, + Rows => $Rows, + TotalFound => $TotalFound, + CurrentPage => $Page, + Pages => $pages, + URLParams => \%query_args + ); + +} + + +<%ARGS> +$Class => '' +$Collection => undef +$Format => undef +$DisplayFormat => undef +@Order => () +@OrderBy => () +$GenericQueryArgs => undef +$Rows => undef +$Page => 1 +$Title => loc('Ticket Search') +$BaseURL => RT->Config->Get('WebPath') . $m->request_comp->path .'?' +@PassArguments => qw( Query Format Rows Page Order OrderBy) + +$AllowSorting => 0 +$ShowNavigation => 1 +$ShowHeader => 1 +$ShowEmpty => 0 +$Query => 0 + diff --git a/rt/share/html/Elements/CollectionListPaging b/rt/share/html/Elements/CollectionListPaging new file mode 100644 index 000000000..8fc0632b8 --- /dev/null +++ b/rt/share/html/Elements/CollectionListPaging @@ -0,0 +1,108 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$BaseURL => undef +$Rows => undef +$TotalFound => undef +$CurrentPage => undef +$Pages => undef +$URLParams => undef + + +<%INIT> +$m->out(qq{
    }); +if ($Pages == 1) { + $m->out(loc('Page 1 of 1')); +} +else{ +$m->out(loc('Page') . ' '); +my $prev = $m->comp( + '/Elements/QueryString', + %$URLParams, + Page => ( $CurrentPage - 1 ) + ); +my $next = $m->comp( + '/Elements/QueryString', + %$URLParams, + Page => ( $CurrentPage + 1 ) + ); +my %show; +$show{1} = 1; +$show{$_} = 1 for (($CurrentPage - 2)..($CurrentPage + 2)); +$show{$Pages} = 1; +my $dots; + +for my $number ( 1 .. $Pages ) { + if ( $show{$number} ) { + $dots = undef; + my $qs = + $m->comp( '/Elements/QueryString', %$URLParams, Page => $number ); + $m->out(qq{}); + if ( $number == $CurrentPage ) { + $m->out(qq{$number }); + } + else { + $m->out(qq{$number }); + } + } + elsif ( not $dots ) { + $dots = 1; + $m->out(qq{...}); + } + $m->out(qq{}); +} + +if ($CurrentPage > 1) { + $m->out(qq{}.loc('Previous') . qq{}); +} +if (($CurrentPage * $Rows) < $TotalFound) { + $m->out(qq{}.loc('Next').qq{}); +} +} +$m->out(qq{
    }); + diff --git a/rt/share/html/Elements/ColumnMap b/rt/share/html/Elements/ColumnMap new file mode 100644 index 000000000..71517e063 --- /dev/null +++ b/rt/share/html/Elements/ColumnMap @@ -0,0 +1,151 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Class => 'RT__Ticket' +$Name +$Attr => undef + +<%ONCE> + +# This is scary and should totally be refactored -- jesse +my $COLUMN_MAP = { + id => { + attribute => 'id', + title => 'id', # loc + align => 'right', + value => sub { return $_[0]->id } + }, + + Created => { + attribute => 'Created', + title => 'Created', # loc + value => sub { return $_[0]->CreatedObj->AsString } + }, + CreatedRelative => { + attribute => 'Created', + title => 'Created', # loc + value => sub { return $_[0]->CreatedObj->AgeAsString } + }, + CreatedBy => { + attribute => 'CreatedBy', + title => 'Created By', # loc + value => sub { return $_[0]->CreatorObj->Name } + }, + LastUpdated => { + attribute => 'LastUpdated', + title => 'Last Updated', # loc + value => sub { return $_[0]->LastUpdatedObj->AsString } + }, + LastUpdatedRelative => { + attribute => 'LastUpdated', + title => 'Last Updated', # loc + value => sub { return $_[0]->LastUpdatedObj->AgeAsString } + }, + LastUpdatedBy => { + attribute => 'LastUpdatedBy', + title => 'Last Updated By', # loc + value => sub { return $_[0]->LastUpdatedByObj->Name } + }, + + + CheckBox => { + title => sub { + my $name = $_[1] || 'SelectedTickets'; + my $checked = $m->request_args->{ $name .'All' }? 'checked="checked"': ''; + + return \qq{}; + }, + value => sub { + my $id = $_[0]->id; + + my $name = $_[2] || 'SelectedTickets'; + return \qq{} + if $m->request_args->{ $name . 'All'}; + + my $arg = $m->request_args->{ $name }; + my $checked = ''; + if ( $arg && ref $arg ) { + $checked = 'checked="checked"' if grep $_ == $id, @$arg; + } + elsif ( $arg ) { + $checked = 'checked="checked"' if $arg == $id; + } + return \qq{} + }, + }, + RadioButton => { + title => \' ', + value => sub { + my $id = $_[0]->id; + + my $name = $_[2] || 'SelectedTicket'; + my $arg = $m->request_args->{ $name }; + my $checked = ''; + $checked = 'checked="checked"' if $arg && $arg == $id; + return \qq{}; + }, + }, + (map { + my $value = RT->Config->Get($_); + $_ => { value => sub { return \$value } }; + + } qw(WebPath WebBaseURL WebURL)), +}; + + +<%INIT> +$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'Once', CallbackOnce => 1 ); +$m->callback( COLUMN_MAP => $COLUMN_MAP ); + +# first deal with class specific things +my $class_map = $m->comp("/Elements/$Class/ColumnMap", Attr => $Attr, Name => $Name ); +return $class_map if defined $class_map; +return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr ); + + diff --git a/rt/share/html/Elements/CreateTicket b/rt/share/html/Elements/CreateTicket new file mode 100755 index 000000000..9c8f3aadf --- /dev/null +++ b/rt/share/html/Elements/CreateTicket @@ -0,0 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +
    +<&|/l, $m->scomp('/Elements/SelectNewTicketQueue', OnChange => 'document.CreateTicketInQueue.submit()')&> [_1] +
    diff --git a/rt/share/html/Elements/DashboardTabs b/rt/share/html/Elements/DashboardTabs new file mode 100644 index 000000000..f9493d5fe --- /dev/null +++ b/rt/share/html/Elements/DashboardTabs @@ -0,0 +1,52 @@ +<%args> +$CurrentDashboard => undef + +<%init> +my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards"); +my $limit = 7; + +$m->callback( + Dashboards => \@dashboards, + Limit => \$limit, + CallbackName => 'MassageDashboards', +); + +my $more = 0; +if (@dashboards > $limit) { + $more = 1; + splice @dashboards, $limit; +} + +# always include the current dashboard, even if it's not in the initial list +push @dashboards, $CurrentDashboard + if $CurrentDashboard + && 0 == grep { $_->Id == $CurrentDashboard->Id } @dashboards; + +my $position = 0; + +my $tabs = { + map { + ++$position; + my $key = sprintf 'D-%03d', $position; + $key => { + title => $_->Name, + path => 'Dashboards/' . $_->Id . '/' . $_->Name, + } + } + @dashboards +}; + +$tabs->{"A"} = { + title => loc('Home'), + path => 'index.html', +}; + +if ($more) { + $tabs->{"D-more"} = { + title => loc('More'), + path => 'Dashboards/index.html', + } +} + +return $tabs; + diff --git a/rt/share/html/Elements/Dashboards b/rt/share/html/Elements/Dashboards new file mode 100644 index 000000000..3653aa5b8 --- /dev/null +++ b/rt/share/html/Elements/Dashboards @@ -0,0 +1,66 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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("Dashboards"), + title_href => RT->Config->Get('WebPath').'/Dashboards/index.html', + bodyclass => "", + titleright => loc("Edit"), + titleright_href => RT->Config->Get('WebPath').'/Dashboards/', +&> + +<& /Dashboards/Elements/ShowDashboards:table, + Dashboards => \@dashboards, + Verbose => 0, +&> + +
    +<%INIT> +my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards"); + + diff --git a/rt/share/html/Elements/EditCustomField b/rt/share/html/Elements/EditCustomField new file mode 100644 index 000000000..d1bb0c295 --- /dev/null +++ b/rt/share/html/Elements/EditCustomField @@ -0,0 +1,116 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $Type = $CustomField->Type; +unless ( $Type ) { + # if we can't see the type, all hell will break loose. + $RT::Logger->error( "Custom field #". $CustomField->id ." has empty type" ); + return; +} + +my $Values; +if ( $Object && $Object->id ) { + $NamePrefix ||= join '-', + 'Object', ref($Object), $Object->Id, 'CustomField', ''; + + $Values = $Object->CustomFieldValues( $CustomField->id ); + $Values->Columns( + qw( id CustomField ObjectType ObjectId Disabled Content + ContentType ContentEncoding SortOrder Creator Created + LastUpdatedBy LastUpdated ) + ); + # Don't take care of $Values if there isn't values inside + undef ( $Values ) unless ( $Values->Count ); +} + +# Always fill $Default with submited values if it's empty +if ( ( !defined $Default || !length $Default ) && $DefaultsFromTopArguments ) { + my %TOP = $m->request_args; + $Default = $TOP{ $NamePrefix .$CustomField->Id . '-Values' } + || $TOP{ $NamePrefix .$CustomField->Id . '-Value' }; +} + +my $MaxValues = $CustomField->MaxValues; +if ($MaxValues == 1 && $Values) { + # what exactly is this doing? Without the "unless" it breaks RTFM + # transaction extraction into articles. + $Default = ($Values->First ? $Values->First->Content : '') unless $Default; + $Values->GotoFirstItem; +} +# 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".''."\n"); + +my $EditComponent = "EditCustomField$Type"; +$m->callback( %ARGS, CallbackName => 'EditComponentName', Name => \$EditComponent, CustomField => $CustomField, Object => $Object ); +$EditComponent = "EditCustomField$Type" unless $m->comp_exists($EditComponent); + +return $m->comp( + $EditComponent, + %ARGS, + Rows => $Rows, + Cols => $Cols, + Default => $Default, + Object => $Object, + Values => $Values, + MaxValues => $MaxValues, + Multiple => ($MaxValues != 1), + NamePrefix => $NamePrefix, + CustomField => $CustomField, +); + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Rows => 5 +$Cols => 15 +$Default => undef +$DefaultsFromTopArguments => 1, + diff --git a/rt/share/html/Elements/EditCustomFieldAutocomplete b/rt/share/html/Elements/EditCustomFieldAutocomplete new file mode 100644 index 000000000..ba7907b19 --- /dev/null +++ b/rt/share/html/Elements/EditCustomFieldAutocomplete @@ -0,0 +1,88 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ( $Multiple ) { +
    + +<%INIT> +my $name = $NamePrefix . $CustomField->Id; +if ( $Default && !$Multiple ) { + $Default =~ s/\s*\r*\n\s*/ /g; +} +if ( $Multiple and $Values ) { + $Default = ''; + while (my $value = $Values->Next ) { + $Default .= $value->Content ."\n"; + } +} + +<%ARGS> +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$Multiple => undef +$Rows => undef +$Cols => undef + diff --git a/rt/share/html/Elements/EditCustomFieldBinary b/rt/share/html/Elements/EditCustomFieldBinary new file mode 100644 index 000000000..89a669f9f --- /dev/null +++ b/rt/share/html/Elements/EditCustomFieldBinary @@ -0,0 +1,62 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ) { +%# XXX - let user download the file(s) here? +<% $value->Content %>
    +% } +% if (!$MaxValues || !$Values || $Values->Count < $MaxValues) { + +% } +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$MaxValues => undef + diff --git a/rt/share/html/Elements/EditCustomFieldCombobox b/rt/share/html/Elements/EditCustomFieldCombobox new file mode 100644 index 000000000..e6b76ff10 --- /dev/null +++ b/rt/share/html/Elements/EditCustomFieldCombobox @@ -0,0 +1,69 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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) { +<% $value->Content %> +
    +% } +% (!$Multiple or !$MaxValues or !$Values or $Values->Count < $MaxValues) or return; +<& /Widgets/ComboBox, + Name => $NamePrefix . $CustomField->Id . "-Value", + Default => $Default, + Rows => $Rows, + Class => "CF-".$CustomField->id."-Edit", + Values => [map {$_->Name} @{$CustomField->Values->ItemsArrayRef}], +&> +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$Multiple => 0 +$Rows => undef +$MaxValues => undef + diff --git a/rt/share/html/Elements/EditCustomFieldFreeform b/rt/share/html/Elements/EditCustomFieldFreeform new file mode 100644 index 000000000..856a61f31 --- /dev/null +++ b/rt/share/html/Elements/EditCustomFieldFreeform @@ -0,0 +1,71 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% my $name = $NamePrefix . $CustomField->Id . '-Value'; +% if ($Multiple) { + +% } else { + +% } +<%INIT> +if ( $Multiple and $Values ) { + $Default = join "\n", map $_->Content, @{ $Values->ItemsArrayRef }; +} +unless ( $Multiple ) { + $Default =~ s/\s*\n+\s*/ /g if $Default; +} + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$Multiple => undef +$Cols +$Rows + diff --git a/rt/share/html/Elements/EditCustomFieldImage b/rt/share/html/Elements/EditCustomFieldImage new file mode 100644 index 000000000..b15cc5d2c --- /dev/null +++ b/rt/share/html/Elements/EditCustomFieldImage @@ -0,0 +1,62 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ) { +<& ShowCustomFieldImage, Object => $value &> +
    +% } +% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { + +% } +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$MaxValues => undef + diff --git a/rt/share/html/Elements/EditCustomFieldSelect b/rt/share/html/Elements/EditCustomFieldSelect new file mode 100644 index 000000000..8fe79f9f9 --- /dev/null +++ b/rt/share/html/Elements/EditCustomFieldSelect @@ -0,0 +1,161 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +%# 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 and not $CustomField->BasedOnObj->id) { + +%# XXX - Hide this select from w3m? +
    +% } elsif ($CustomField->BasedOnObj->id) { + + +% } +% if (@category) { +%# this hidden select is to supply a full list of values, +%# see filter_cascade() in js/cascaded.js + +% } + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$Multiple => 0 +$Rows => undef + + +<%METHOD options> +% @Default = grep defined && length, @Default; +% # $Values->HasEntry is too slow here +% if ( !@Default && $Values ) { +% @Default = map $_->Content, @{$Values->ItemsArrayRef}; +% } +% $_ = lc $_ foreach @Default; +% my $selected; +% my $CFVs = $CustomField->Values; +% my @levels; +% while ( my $value = $CFVs->Next ) { +% my $name = $value->Name; +% my $category = $value->Category || ''; +% my $level = (split /:/, $category, 2)[0] || ''; +% while (@levels) { +% if ($levels[-1] eq $level) { +% $level = ''; +% last; +% } elsif (index($level, $levels[-1]) != 0) { +% $m->out(''); +% pop @levels; +% } else { +% last; +% } +% } +% if ( length $level ) { +% push @$CategoryRef, [0+@levels, $level]; + +% push @levels, $level; +% } + +% } +% for (@levels) { + +% } +<%ARGS> +$CustomField => undef +@Default => () +$Values => undef +$SelectedRef => undef +$CategoryRef => undef + + diff --git a/rt/share/html/Elements/EditCustomFieldText b/rt/share/html/Elements/EditCustomFieldText new file mode 100644 index 000000000..7d69ffcea --- /dev/null +++ b/rt/share/html/Elements/EditCustomFieldText @@ -0,0 +1,67 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ) { +
    +% } +% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { + +% } +<%INIT> +# XXX - MultiValue textarea is for now outlawed. +$MaxValues = 1; + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => '' +$Default => undef +$Values => undef +$MaxValues => undef +$Cols +$Rows + diff --git a/rt/share/html/Elements/EditCustomFieldWikitext b/rt/share/html/Elements/EditCustomFieldWikitext new file mode 100644 index 000000000..f11b48d74 --- /dev/null +++ b/rt/share/html/Elements/EditCustomFieldWikitext @@ -0,0 +1,67 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ) { +
    +% } +% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { + +% } +<%INIT> +# XXX - MultiValue textarea is for now outlawed. +$MaxValues = 1; + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$MaxValues => undef +$Cols +$Rows + diff --git a/rt/share/html/Elements/EditLinks b/rt/share/html/Elements/EditLinks new file mode 100755 index 000000000..637762e1b --- /dev/null +++ b/rt/share/html/Elements/EditLinks @@ -0,0 +1,178 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + + + +
    +

    <&|/l&>Current Links

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <&|/l&>Depends on: +% while (my $link = $Object->DependsOn->Next) { + + <& ShowLink, URI => $link->TargetURI &>
    +% } +
    <&|/l&>Depended on by: +% while (my $link = $Object->DependedOnBy->Next) { + + <& ShowLink, URI => $link->BaseURI &>
    +% } +
    <&|/l&>Parents: +% while (my $link = $Object->MemberOf->Next) { + + <& ShowLink, URI => $link->TargetURI &>
    +% } +
    <&|/l&>Children: +% while (my $link = $Object->Members->Next) { + + <& ShowLink, URI => $link->BaseURI &>
    +% } +
    <&|/l&>Refers to: +% while (my $link = $Object->RefersTo->Next) { + + <& ShowLink, URI => $link->TargetURI &>
    +%} +
    <&|/l&>Referred to by: +% while (my $link = $Object->ReferredToBy->Next) { +% # Skip reminders +% next if (UNIVERSAL::isa($link->BaseObj, 'RT::Ticket') && $link->BaseObj->Type eq 'reminder'); + + <& ShowLink, URI => $link->BaseURI &>
    +% } +
    <&|/l&>(Check box to delete)
    + +
    +

    <&|/l&>New Links

    +% if (ref($Object) eq 'RT::Ticket') { +<&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces. +% $m->callback( CallbackName => 'ExtraLinkInstructions' ); +
    +% } elsif (ref($Object) eq 'RT::Queue') { +<&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces. +
    +% } else { +<&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.
    +% } + +% if ($Merge) { + + + + +% } + + + + + + + + + + + + + + + + + + + + + + + + +% $m->callback( CallbackName => 'NewLink' ); +
    <&|/l&>Merge into: <&|/l&>(only one ticket)
    <&|/l&>Depends on:
    <&|/l&>Depended on by:
    <&|/l&>Parents:
    <&|/l&>Children:
    <&|/l&>Refers to:
    <&|/l&>Referred to by:
    +
    + +<%INIT> +my $id; +if ($Object && $Object->Id) { + $id = $Object->Id; +} else { + $id = 'new'; +} + + +<%ARGS> +$Object => undef +$Merge => 0 + diff --git a/rt/share/html/Elements/EditTimeValue b/rt/share/html/Elements/EditTimeValue new file mode 100644 index 000000000..863f8bfec --- /dev/null +++ b/rt/share/html/Elements/EditTimeValue @@ -0,0 +1,65 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/SelectTimeUnits, Name => $UnitName &> +<%ARGS> +$Default => '' +$Name => '' +$ValueName => '' +$UnitName => '' +$InputUnits => 'minutes' + +<%INIT> +$ValueName ||= $Name; +$UnitName ||= ($Name||$ValueName) . '-TimeUnits'; + +if ($InputUnits eq 'minutes' && RT->Config->Get('DefaultTimeUnitsToHours')) { + $Default = sprintf '%.3g', $Default / 60 + unless $Default eq ''; +} + diff --git a/rt/share/html/Elements/EmailInput b/rt/share/html/Elements/EmailInput new file mode 100644 index 000000000..5c7f27772 --- /dev/null +++ b/rt/share/html/Elements/EmailInput @@ -0,0 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +$Size => 40 +$Default => '' + diff --git a/rt/share/html/Elements/Error b/rt/share/html/Elements/Error new file mode 100755 index 000000000..604d29be4 --- /dev/null +++ b/rt/share/html/Elements/Error @@ -0,0 +1,90 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% $m->callback( %ARGS, error => $error ); + +% unless ($SuppressHeader) { +<& /Elements/Header, Code => $Code, Why => $Why, Title => $Title &> +<& /Elements/Tabs, Title => $Title &> +% } + +
    +<%$Why%> +
    +<%$Details%> +
    + +<%cleanup> +$m->comp('/Elements/Footer'); +$m->abort(); + + +<%args> +$Code => undef +$Details => '' +$Title => loc("RT Error") +$Why => loc("the calling component did not specify why"), +$SuppressHeader => 0, + + +<%INIT> +my $error = "WebRT: $Why"; +$error .= " ($Details)" if defined $Details && length $Details; + +# TODO: Log::Dispatch isn't UTF-8 safe. Autrijus needs to talk to dave rolsky about getting this fixed +use Encode (); +Encode::_utf8_off($error); + +$RT::Logger->error($error); + +if ( defined $session{'SessionType'} && $session{'SessionType'} eq 'REST' ) { + $r->content_type('text/plain'); + $m->out( "Error: " . $Why . "\n" ); + $m->out( $Details . "\n" ) if defined $Details && length $Details; + $m->abort(); +} + diff --git a/rt/share/html/Elements/Footer b/rt/share/html/Elements/Footer new file mode 100755 index 000000000..2fcdee949 --- /dev/null +++ b/rt/share/html/Elements/Footer @@ -0,0 +1,84 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +%# End of div#body from /Elements/PageLayout + +% $m->callback( %ARGS ); + +% if ($Debug >= 2 ) { +% require Data::Dumper; +% my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]); +
    +<%$d->Dump() %>
    +
    +% } + + + + +<%ARGS> +$Debug => 0 +$Menu => 1 + diff --git a/rt/share/html/Elements/GnuPG/KeyIssues b/rt/share/html/Elements/GnuPG/KeyIssues new file mode 100644 index 000000000..48a7fd21e --- /dev/null +++ b/rt/share/html/Elements/GnuPG/KeyIssues @@ -0,0 +1,92 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ( @$Issues || @$SignAddresses ) { +<&| /Widgets/TitleBox, title => loc('GnuPG issues') &> + +% if ( @$SignAddresses ) { +<% loc("The system is unable to sign outgoing email messages. This usually indicates that the passphrase was mis-set, or that GPG Agent is down. Please alert your system administrator immediately. The problem addresses are:") %> +
      +% for my $address (@$SignAddresses) { +
    • <% $address %>
    • +% } +
    +% } + +% if (@$Issues == 1) { +<% loc("You are going to encrypt outgoing email messages, but there is a problem with a recipient's public key. You have to fix the problem with the key, disable sending a message to that recipient, or disable encryption.") %> +% } elsif (@$Issues > 1) { +<% loc("You are going to encrypt outgoing email messages, but there are problems with recipients' public keys. You have to fix the problems with the keys, disable sending a message to the recipients with key problems, or disable encryption.") %> +% } + +
      +% foreach my $issue ( @$Issues ) { +
    • +% if ( $issue->{'User'} ) { +User <&/Elements/ShowUser, User => $issue->{'User'} &> has a problem. +% } else { +There is a problem with key(s) for address <% $issue->{'EmailAddress'} %>, but there is no user in the DB for this address. +% } +<% $issue->{'Message'} %> +
      +Select a key you want to use for encryption: +<& /Elements/GnuPG/SelectKeyForEncryption, + Name => 'UseKey-'. $issue->{'EmailAddress'}, + EmailAddress => $issue->{'EmailAddress'}, + Default => ( $issue->{'User'}? $issue->{'User'}->PreferredKey : undef ), +&> +
    • +% } +
    + +% } + +<%ARGS> +$Issues => [] +$SignAddresses => [] + + diff --git a/rt/share/html/Elements/GnuPG/SelectKeyForEncryption b/rt/share/html/Elements/GnuPG/SelectKeyForEncryption new file mode 100644 index 000000000..c28c5ad3f --- /dev/null +++ b/rt/share/html/Elements/GnuPG/SelectKeyForEncryption @@ -0,0 +1,81 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 (!@keys) { +<% loc("No usable keys.") %> +% } else { + +% } + +<%INIT> +require RT::Crypt::GnuPG; +my $d; + +my %res = RT::Crypt::GnuPG::GetKeysForEncryption($EmailAddress); +# move the preferred key to the top of the list +my @keys = map { + $_->{'Fingerprint'} eq ( $Default || '' ) + ? do { $d = $_; () } + : $_ + } + @{ $res{'info'} }; + +@keys = sort { $b->{'TrustLevel'} <=> $a->{'TrustLevel'} } @keys; + +unshift @keys, $d if defined $d; + + +<%ARGS> +$Name => 'PreferredKey' +$EmailAddress => undef +$Default => undef + + diff --git a/rt/share/html/Elements/GnuPG/SelectKeyForSigning b/rt/share/html/Elements/GnuPG/SelectKeyForSigning new file mode 100644 index 000000000..13b40df26 --- /dev/null +++ b/rt/share/html/Elements/GnuPG/SelectKeyForSigning @@ -0,0 +1,64 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ( $user_key ) { + +% } else { +<% loc("Queue's key") %> +% } +<%ARGS> +$Name => 'SignUsing', +$User => undef, + +<%INIT> +return unless RT->Config->Get('GnuPG')->{'Enable'}; + +my $user_key = $User->PrivateKey; + diff --git a/rt/share/html/Elements/GnuPG/SignEncryptWidget b/rt/share/html/Elements/GnuPG/SignEncryptWidget new file mode 100644 index 000000000..9303fb52a --- /dev/null +++ b/rt/share/html/Elements/GnuPG/SignEncryptWidget @@ -0,0 +1,184 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + + + +
    <% loc('Sign')%><& /Widgets/Form/Boolean:InputOnly, Name => 'Sign', CurrentValue => $self->{'Sign'} &> +using <& SelectKeyForSigning, User => $session{'CurrentUser'}->UserObj &> +<% loc('Encrypt')%><& /Widgets/Form/Boolean:InputOnly, Name => 'Encrypt', CurrentValue => $self->{'Encrypt'} &>
    +<%ARGS> +$self => undef, + +<%INIT> +return unless $self; + + +<%METHOD new> +<%ARGS> +$Arguments => {} + +<%INIT> +return undef unless RT->Config->Get('GnuPG')->{'Enable'}; + +require RT::Crypt::GnuPG; +return { %$Arguments }; + + + +<%METHOD ShowIssues> +<%ARGS> +$self => undef, + +<%INIT> +return unless $self; + +return $m->comp( '/Elements/GnuPG/KeyIssues', + Issues => $self->{'GnuPGRecipientsKeyIssues'} || [], + SignAddresses => $self->{'GnuPGCanNotSignAs'} || [], +); + + + + +<%METHOD Process> +<%ARGS> +$self => undef +$QueueObj => undef +$TicketObj => undef + +<%INIT> +return unless $self; + +$QueueObj ||= $TicketObj->QueueObj if $TicketObj; + +foreach ( qw(Sign Encrypt) ) { + $self->{ $_ } = $m->comp( '/Widgets/Form/Boolean:Process', + Name => $_, + DefaultValue => $QueueObj->$_, + Arguments => $self, + ); +} + + + +<%METHOD Check> +<%ARGS> +$self => undef +$Operation => 'Update' +$TicketObj => undef +$QueueObj => undef + +<%INIT> +return 1 unless $self; + +my $checks_failure = 0; + +if ( $self->{'Sign'} ) { + $QueueObj ||= $TicketObj->QueueObj + if $TicketObj; + + my $address = $self->{'SignUsing'}; + $address ||= ($self->{'UpdateType'} && $self->{'UpdateType'} eq "private") + ? ( $QueueObj->CommentAddress || RT->Config->Get('CommentAddress') ) + : ( $QueueObj->CorrespondAddress || RT->Config->Get('CorrespondAddress') ); + + unless ( RT::Crypt::GnuPG::DrySign( $address ) ) { + push @{ $self->{'GnuPGCanNotSignAs'} ||= [] }, $address; + $checks_failure = 1; + } else { + RT::Crypt::GnuPG::UseKeyForSigning( $self->{'SignUsing'} ) + if $self->{'SignUsing'}; + } +} + +if ( $self->{'Encrypt'} ) { + + my @recipients; + + if ( $Operation eq 'Update' ) { + # skip any email addresses that we won't be sending mail to + my %squelch = $m->comp( + '/Ticket/Elements/PreviewScrips:SquelchRecipients', + %$self, + TicketObj => $TicketObj + ); + + @recipients = $m->comp( + '/Ticket/Elements/PreviewScrips:GetRecipients', + %$self, TicketObj => $TicketObj + ); + } + elsif ( $Operation eq 'Create' ) { + @recipients = $m->comp( + '/Ticket/Elements/PreviewScrips:GetRecipientsOnCreate', + %$self, + ); + } + else { + $RT::Logger->crit('Incorrect operation: '. $Operation ); + } + + my %seen; + @recipients = grep !$seen{ lc $_ }++, @recipients; + + RT::Crypt::GnuPG::UseKeyForEncryption( + map { (/^UseKey-(.*)$/)[0] => $self->{ $_ } } + grep $self->{ $_ } && /^UseKey-/, + keys %$self + ); + + my ($status, @issues) = RT::Crypt::GnuPG::CheckRecipients( @recipients ); + push @{ $self->{'GnuPGRecipientsKeyIssues'} ||= [] }, @issues; + $checks_failure = 1 unless $status; +} + +return $checks_failure ? 0 : 1; + + diff --git a/rt/share/html/Elements/GotoTicket b/rt/share/html/Elements/GotoTicket new file mode 100755 index 000000000..517bee77c --- /dev/null +++ b/rt/share/html/Elements/GotoTicket @@ -0,0 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +
    +  +
    diff --git a/rt/share/html/Elements/Header b/rt/share/html/Elements/Header new file mode 100755 index 000000000..953efcb22 --- /dev/null +++ b/rt/share/html/Elements/Header @@ -0,0 +1,118 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + +<%$Title%> + + +% if ($Refresh && $Refresh =~ /^(\d+)/ && $1 > 0) { + +% } + + + + + +% for (keys %{$LinkRel || {}}) { + +% } + +% if ( $RSSAutoDiscovery ) { + +% } + +% if ($JavaScript) { +<& HeaderJavascript, focus => $Focus, onload => $onload &> +% } + +% my $stylesheet_plugin = "/NoAuth/css/". RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} )."/InHeader"; +% if ($m->comp_exists($stylesheet_plugin) ) { +<& $stylesheet_plugin &> +% } +% $m->callback( %ARGS, CallbackName => 'Head' ); + + + > + +% if ($ShowBar) { +<& /Elements/Logo, %ARGS &> + +
    + <& /Elements/PersonalQuickbar, %ARGS &> +% } + +<%INIT> +$r->headers_out->{'Pragma'} = 'no-cache'; +$r->headers_out->{'Cache-control'} = 'no-cache'; + +my $id = $m->request_comp->path; +$id =~ s|^/||g; +$id =~ s|/|-|g; +$id =~ s|\.html$||g; +$id =~ s|index$||g + if $id ne 'index'; +$id =~ s|-$||g; + + +<%ARGS> +#$Focus => 'focus' +$Focus => '' +$Title => 'RT' +$Code => undef +$Refresh => 0 +$Why => undef +$ShowBar => 1 +$URL => undef +$RSSAutoDiscovery => undef +$onload => undef +$LinkRel => undef +$JavaScript => 1 + diff --git a/rt/share/html/Elements/HeaderJavascript b/rt/share/html/Elements/HeaderJavascript new file mode 100644 index 000000000..6ee88a13b --- /dev/null +++ b/rt/share/html/Elements/HeaderJavascript @@ -0,0 +1,122 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$focus => undef +$onload => undef + + + + + + +% if ( RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'}) ) { + +% } + diff --git a/rt/share/html/Elements/ListActions b/rt/share/html/Elements/ListActions new file mode 100755 index 000000000..86773aeb7 --- /dev/null +++ b/rt/share/html/Elements/ListActions @@ -0,0 +1,94 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Results') &> +
      +% foreach my $action (@actions) { +
    • <%$action%>
    • +% } +
    + +
    +<%init> + +# backward compatibility, don't use array in new code, but use keyed hash +if ( ref( $session{'Actions'} ) eq 'ARRAY' ) { + unshift @actions, @{ delete $session{'Actions'} }; +} + +if ( ref( $session{'Actions'}{''} ) eq 'ARRAY' ) { + unshift @actions, @{ delete $session{'Actions'}{''} }; +} + +my $actions_pointer = $m->request_args->{'results'}; + +if ($actions_pointer && ref( $session{'Actions'}->{$actions_pointer} ) eq 'ARRAY' ) { + unshift @actions, @{ delete $session{'Actions'}->{$actions_pointer} }; +} + +# XXX: run callbacks per row really crazy idea +@actions = + grep $_, + grep { + my $skip; + $m->callback( + %ARGS, + row => \$_, + skip => \$skip, + CallbackName => 'ModifyRow', + ); + !$skip; + } + grep $_, @actions; + +return unless @actions; + + +<%ARGS> +@actions => undef + diff --git a/rt/share/html/Elements/ListMenu b/rt/share/html/Elements/ListMenu new file mode 100644 index 000000000..63d4a1e86 --- /dev/null +++ b/rt/share/html/Elements/ListMenu @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$items + + diff --git a/rt/share/html/Elements/Login b/rt/share/html/Elements/Login new file mode 100755 index 000000000..8dfbe51d1 --- /dev/null +++ b/rt/share/html/Elements/Login @@ -0,0 +1,139 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { + $r->content_type("text/plain"); + $m->error_format("text"); + $m->out("RT/$RT::VERSION 401 Credentials required\n"); + $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->Config->Get('WebPath') + ; + + +% $m->callback( %ARGS, CallbackName => 'Header' ); +<& /Elements/Header, Title => loc('Login'), Focus => 'user' &> + + +%# End of div#quickbar from /Elements/Header +
    + + +<& /Elements/Footer, Menu => 0 &> +<%ARGS> +$user => "" +$pass => undef +$goto => undef +$Error => undef + diff --git a/rt/share/html/Elements/Logo b/rt/share/html/Elements/Logo new file mode 100644 index 000000000..359738b5e --- /dev/null +++ b/rt/share/html/Elements/Logo @@ -0,0 +1,66 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +if ( exists $ARGS{'show_name'} ) { + $RT::Logger->warning('show_name argument was renamed, use ShowName'); + $ShowName = delete $ARGS{'show_name'}; +} + +<%ARGS> +$ShowName => 1 +$Name => undef + diff --git a/rt/share/html/Elements/Logout b/rt/share/html/Elements/Logout new file mode 100644 index 000000000..34ed1a317 --- /dev/null +++ b/rt/share/html/Elements/Logout @@ -0,0 +1,65 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + | <&|/l&>Logout +<%ARGS> +$URL => undef + +<%INIT> +my $show = 0; +if ( $session{'CurrentUser'}->Name + && ( !RT->Config->Get('WebExternalAuth') + || RT->Config->Get('WebFallbackToInternalAuth') + ) +) { + $show = 1; +} + +$m->callback( %ARGS, URL => \$URL, show => \$show ); + +return unless $show; + diff --git a/rt/share/html/Elements/MakeClicky b/rt/share/html/Elements/MakeClicky new file mode 100644 index 000000000..f0aaf0696 --- /dev/null +++ b/rt/share/html/Elements/MakeClicky @@ -0,0 +1,207 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<%ONCE> +use Regexp::Common qw(URI); + +my %actions = ( + default => sub { + my %args = @_; + return $args{value}; + }, + url => sub { + my %args = @_; + my $result = qq{[}. loc('Open URL') .qq{]}; + return $args{value} . qq{ $result}; + }, + url_overwrite => sub { + my %args = @_; + my $result = qq{}; + #XXX: use spaces here. ­ are not well supported :( + $args{'value'} =~ s/(\S{30})/$1 /g; + $result .= qq{$args{'value'}}; + return qq{$result}; + }, +); + +my @types = ( + { + name => "httpurl", + regex => qr/$RE{URI}{HTTP}{-keep}{-scheme => 'https?'}/, + action => "url", + }, + { + name => "httpurl_overwrite", + regex => qr/$RE{URI}{HTTP}{-keep}{-scheme => 'https?'}/, + action => "url_overwrite", + }, +); + +my $handle = sub { + my %args = @_; + for my $rec( @types ) { + return $rec->{action}->( + %args, + all_matches => [ $args{value}, $1, $2, $3, $4, $5, $6, $7, $8, $9 ], + ) if $args{value} =~ $rec->{regex}; + } +}; + +my $escaper = sub { + my $content = shift; + RT::Interface::Web::EscapeUTF8( \$content ); + return $content; +}; + +# Hook to add more Clicky types +# XXX Have to have Page argument, as Mason gets caller wrong in Callback? +# This happens as we are in <%ONCE> block +$m->callback( + CallbackPage => "/Elements/MakeClicky", + types => \@types, + actions => \%actions, + handle => \$handle, +); + + +# Filter +my %active; +$active{$_}++ for RT->Config->Get('Active_MakeClicky'); +@types = grep $active{$_->{name}}, @types; + +# Build up the whole match +my $regexp = join "|", map $_->{regex}, @types; + +# Make sure we have a default +$actions{default} ||= sub {}; + +# Anchor the regexes and look up the actions +foreach my $type ( @types ) { + $type->{regex} = qr/^$type->{regex}$/; + $type->{action} = $actions{$type->{action}} || $actions{default}; +} + + +<%ARGS> +$content => undef +$html => undef + +<%INIT> +return unless defined $$content; +unless ( $regexp ) { + RT::Interface::Web::EscapeUTF8( $content ) unless $html; + return; +} + +my $pos = 0; +while ( $$content =~ /($regexp)/gsio ) { + my $match = $1; + next if $` =~ /href=(?:"|")$/; + my $skipped_len = pos($$content) - $pos - length($match); + if ( $skipped_len > 0 ) { + my $plain; + if ( $html ) { + $plain = substr( $$content, $pos, $skipped_len ); + } + else { + $plain = $escaper->( substr( $$content, $pos, $skipped_len ) ) + } + substr( $$content, $pos, $skipped_len ) = $plain; + $pos += length($plain); + } + my $plain = $handle->( + %ARGS, + value => $match, + all_matches => [ $1, $2, $3, $4, $5, $6, $7, $8, $9 ], + ); + substr( $$content, $pos, length($match) ) = $plain; + pos($$content) = ( $pos += length($plain) ); + +} +substr( $$content, $pos ) = $escaper->( substr( $$content, $pos ) ) unless +($pos == length $$content) || $html; + +pos($$content) = 0; + + +<%doc> + +MakeClicky detects various formats of data in headers and email +messages, and extends them with supporting links. By default, RT +provides two formats: + + * 'httpurl': detects http:// and https:// URLs and adds '[Open URL]' + link after the URL. + + * 'httpurl_overwrite': also detects URLs as 'httpurl' format, but + replace URL with link and *adds spaces* into text if it's longer + then 30 chars. This allow browser to wrap long URLs and avoid + horizontal scrolling. + +To extend this with your own types of data, use the callback. +It will be provided with: + + * 'types': An array reference of hash references. Modify this array + reference to add your own types; the first matching type will be + used. Each hashref should contain: + - 'name': The name of the data format; this is used in the + configuration file to enable the format. + - 'regex': A regular expression to match against + - 'action': The name of the action to run (see "actions", below) + + * 'actions': A hash reference of 'actions'. Modify this hash + reference to change or add action types. Values are subroutine + references which will get called when needed. They should return + the modified string. Note that subroutine must escape HTML. + + * 'handler': A reference to a subroutine reference; modify it if you + have to. This can be used to add pre- or post-processing around + all actions. + +Read more about writing new actions in docs/extending_clickable_links.pod + + diff --git a/rt/share/html/Elements/Menu b/rt/share/html/Elements/Menu new file mode 100755 index 000000000..83644da11 --- /dev/null +++ b/rt/share/html/Elements/Menu @@ -0,0 +1,139 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<% $menu_class ? qq[ class="$menu_class"] : ''|n %>> +>
    +<%perl> + my $sep = 0; + my $postsep = 0; + my $accesskey = 1; + + $count = 0; + $class = {}; + +my @tabs = sort keys %$toptabs; + foreach $tab (@tabs) { + $count++; + + my $current = $current_toptab || ''; + my $path = $toptabs->{$tab}->{'path'} || ""; + + $path =~ s#/index.html$##gi; + $current =~ s#/index.html$##gi; + + $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0; + + my @aclass; + push @aclass, 'selected' + if $path eq $current; + + push @aclass, 'odd' + if $level % 2; + + $class->{a} = join ' ', @aclass; + + my @li; + push @li, 'first' + if $count == 1; + + push @li, 'pre-separator' + if $sep; + + push @li, 'post-separator' + if $postsep; + + push @li, 'last' if ( $tab eq $tabs[-1]); + $class->{li} = join ' ', @li; + + my $url = ($toptabs->{$tab}->{'path'}||'') =~ /^(?:https?|mailto):/i + ? $toptabs->{$tab}->{'path'} || '' + : RT->Config->Get('WebPath') . "/" . $toptabs->{$tab}->{'path'}; + + + {'li'} ? qq[ class="$class->{li}"] : ''|n %> > + <% $count > 1 && !$postsep && qq[· ]|n%> + {a} && qq[ class="$class->{a}"] |n %> + <% !$level && " accesskey='".$accesskey++."'" |n %>> + <% $toptabs->{$tab}->{'title'}%> + +%# Second-level items +% if ($toptabs->{$tab}->{'subtabs'} +% and keys %{$toptabs->{$tab}->{'subtabs'}}) +% { + <& /Elements/Menu, level => $level+1, + current_toptab => $toptabs->{$tab}->{'current_subtab'}, + toptabs => $toptabs->{$tab}->{'subtabs'}, + last_level => $toptabs->{$tab}->{last_system_menu_level} &> +% } +
  • +% if ($sep) { +
  • ···
  • +% } +% +% $postsep = $sep; +% } + +
+ +<%INIT> +my ($tab, $class, $count); + +my @ul; +push @ul, 'last-menu-level' + if $last_level; +push @ul, 'odd' + if $level % 2; +my $menu_class = join ' ', @ul; + + +<%ARGS> +$toptabs => {} +$current_toptab => '' +$level => 0 +$last_level => 0 + diff --git a/rt/share/html/Elements/MessageBox b/rt/share/html/Elements/MessageBox new file mode 100755 index 000000000..4985b23e3 --- /dev/null +++ b/rt/share/html/Elements/MessageBox @@ -0,0 +1,82 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + +% $m->callback( %ARGS, CallbackName => 'AfterTextArea' ); +<%INIT> + +my $message = ''; + +if ( $QuoteTransaction ) { + my $transaction = RT::Transaction->new( $session{'CurrentUser'} ); + $transaction->Load( $QuoteTransaction ); + $message = $transaction->Content( Quote => 1 ); +} + +my $signature = ''; +if ( $IncludeSignature and my $text = $session{'CurrentUser'}->UserObj->Signature ) { + $signature = "-- \n". $text; +} + +# wrap="something" seems to really break IE + richtext +my $wrap_type = ''; +if ( not RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'}) ) { + $wrap_type = qq(wrap="$Wrap"); +} + + +<%ARGS> +$QuoteTransaction => undef +$Name => 'Content' +$Default => '' +$Width => RT->Config->Get('MessageBoxWidth', $session{'CurrentUser'} ) || 72 +$Height => RT->Config->Get('MessageBoxHeight', $session{'CurrentUser'} ) || 15 +$Wrap => RT->Config->Get('MessageBoxWrap') || 'HARD' +$IncludeSignature => RT->Config->Get('MessageBoxIncludeSignature'); + diff --git a/rt/share/html/Elements/MyAdminQueues b/rt/share/html/Elements/MyAdminQueues new file mode 100644 index 000000000..e7d2b2ac7 --- /dev/null +++ b/rt/share/html/Elements/MyAdminQueues @@ -0,0 +1,54 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/share/html/Elements/MyRT b/rt/share/html/Elements/MyRT new file mode 100644 index 000000000..7b719fd42 --- /dev/null +++ b/rt/share/html/Elements/MyRT @@ -0,0 +1,106 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% $m->callback( ARGSRef => \%ARGS, CallbackName => 'BeforeTable' ); + + + + + +% if ( $summary ) { + +% } + +
+% $show_cb->($_) foreach @$body; + +% $show_cb->($_) foreach @$summary; +
+% $m->callback( ARGSRef => \%ARGS, CallbackName => 'AfterTable' ); +<%INIT> + +# XXX: we don't use this, but should. +my %allowed_components = map {$_ => 1} @{RT->Config->Get('HomepageComponents')}; + +my $user = $session{'CurrentUser'}->UserObj; +$Portlets ||= $session{'my_rt_portlets'}; +unless ( $Portlets ) { + my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings'); + $Portlets = $session{'my_rt_portlets'} = $user->Preferences( + HomepageSettings => $default_portlets? $default_portlets->Content: {}, + ); +} + +my ($body, $summary) = @{$Portlets}{qw(body summary)}; +unless( $body && @$body ) { + $body = $summary || []; + $summary = undef; +} +$summary = undef unless $summary && @$summary; + +my $Rows = $user->Preferences( 'SummaryRows', ( RT->Config->Get('DefaultSummaryRows') || 10 ) ); + +my $show_cb = sub { + my $entry = shift; + my $type = $entry->{type}; + my $name = $entry->{'name'}; + if ( $type eq 'component' ) { + # XXX: security check etc. + $m->comp( $name, %{ $entry->{arguments} || {} } ); + } elsif ( $type eq 'system' ) { + $m->comp( '/Elements/ShowSearch', Name => $name, Override => { Rows => $Rows } ); + } elsif ( $type eq 'saved' ) { + $m->comp( '/Elements/ShowSearch', SavedSearch => $name, Override => { Rows => $Rows }, IgnoreMissing => 1 ); + } else { + $RT::Logger->error("unknown portlet type '$type'"); + } +}; + + +<%ARGS> +$Portlets => undef + diff --git a/rt/share/html/Elements/MyReminders b/rt/share/html/Elements/MyReminders new file mode 100755 index 000000000..25fdf5d48 --- /dev/null +++ b/rt/share/html/Elements/MyReminders @@ -0,0 +1,74 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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") &> + +% my $i =0; +% while (my $reminder = $reminders->Next) { +% $i++; +% if ($reminder->RefersTo->First) { +% my $ticket= $reminder->RefersTo->First->TargetObj; + + +% }} +
<%$reminder->Subject%>
+
+#<%$ticket->id%>: <%$ticket->Subject%>
+<%$reminder->OwnerObj->Name %> <%$reminder->DueObj->Unix >0 ? '• '.$reminder->DueObj->AgeAsString : '' |n %> +
+
+ + +<%init> +return unless RT->Config->Get('EnableReminders'); +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")'); +$reminders->OrderBy(FIELD => 'Due', ORDER => 'ASC'); + diff --git a/rt/share/html/Elements/MyRequests b/rt/share/html/Elements/MyRequests new file mode 100755 index 000000000..c08560db8 --- /dev/null +++ b/rt/share/html/Elements/MyRequests @@ -0,0 +1,49 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +<& /Elements/ShowSearch, Name => 'My Requests' &> diff --git a/rt/share/html/Elements/MySupportQueues b/rt/share/html/Elements/MySupportQueues new file mode 100644 index 000000000..e59c62384 --- /dev/null +++ b/rt/share/html/Elements/MySupportQueues @@ -0,0 +1,60 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => \@conditions, +&> + +<%INIT> +my @conditions = (); +foreach ( RT::Queue->ActiveStatusArray ) { + push @conditions, { cond => "Status = '$_'", name => loc($_) }; +} + diff --git a/rt/share/html/Elements/MyTickets b/rt/share/html/Elements/MyTickets new file mode 100755 index 000000000..354a9642e --- /dev/null +++ b/rt/share/html/Elements/MyTickets @@ -0,0 +1,49 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +<& /Elements/ShowSearch, Name => 'My Tickets' &> diff --git a/rt/share/html/Elements/PageLayout b/rt/share/html/Elements/PageLayout new file mode 100755 index 000000000..981e58a3c --- /dev/null +++ b/rt/share/html/Elements/PageLayout @@ -0,0 +1,251 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +
+% foreach my $action (reverse sort keys %{$topactions}) { +<% $topactions->{"$action"}->{'html'} |n %> +% } +
+ +%# End of div#quickbar from /Elements/Header + + +% if ( $show_menu ) { + +% } + + +
+% $m->callback( %ARGS, CallbackName => 'BeforeBody' ); +% $m->flush_buffer(); # we've got the page laid out, let's flush the buffer; + +<%INIT> +if ( defined $current_toptab ) { + foreach my $tab ( values %{$toptabs} ) { + next unless $tab->{'path'} eq $current_toptab; + @{ $tab }{ qw(subtabs current_subtab) } = ($tabs, $current_tab); + } +} + +my ($menu_depth, $almost_last, $page_tabs); + +if (RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} ) ne '3.4-compat') { + ($menu_depth, $almost_last) = @{ $m->comp('.menu_recurse', data => $toptabs, current => $current_toptab ) }; + + if (defined $almost_last->{subtabs} and %{$almost_last->{subtabs}}) { + $page_tabs = { + current_toptab => $almost_last->{current_subtab}, + %{$almost_last->{subtabs}}, + }; + + delete $almost_last->{subtabs}; + delete $almost_last->{current_subtab}; + } +} + + +%# There's probably a better way to do this that involves three times as +%# much work and redoing the whole menu/tab system... which would seem a +%# bit out of scope. +%# +%# This function recurses through the menu and returns the second to +%# last menu, that is, the menu holding the last reference to +%# and submenu. It also returns the number of menu levels minus +%# the last submenu. +<%def .menu_recurse> + <%args> + $data => { } + $current => '' + $pdata => { } + $ppdata => { } + $level => 0 + + <%init> + if ($current) { + for my $key (keys %$data) { + next if !defined $data->{$key}->{'path'} + || $data->{$key}->{'path'} ne $current; + next unless ref( $data->{$key} ) eq 'HASH' + && ref( $data->{$key}->{'subtabs'} ) eq 'HASH' + && keys %{ $data->{$key}->{'subtabs'} }; + return $m->comp('.menu_recurse', + data => $data->{$key}->{'subtabs'}, + current => $data->{$key}->{'current_subtab'} || '', + pdata => $data->{$key}, + ppdata => $pdata, + level => $level + 1, + ); + } + } + $ppdata->{last_system_menu_level}++; + return [$level, $pdata]; + + + +<%ARGS> +$current_toptab => undef +$current_tab => undef +$toptabs => undef +$topactions => undef +$tabs => undef +$actions => undef +$subactions => undef +$title => $m->callers(-1)->path +$show_menu => 1 + diff --git a/rt/share/html/Elements/PersonalQuickbar b/rt/share/html/Elements/PersonalQuickbar new file mode 100644 index 000000000..5d6497ce1 --- /dev/null +++ b/rt/share/html/Elements/PersonalQuickbar @@ -0,0 +1,16 @@ +<%ARGS> +$Prefs => '/Prefs/Other.html' + +
+ <&|/l&>Skip Menu | +% if ($session{'CurrentUser'}->Name) { + <&|/l, "".$session{'CurrentUser'}->Name."" &>Logged in as [_1] +% if ( $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System ) ) { + | <&|/l&>Preferences +% } +% } else { + <&|/l&>Not logged in. +% } +% $m->callback( %ARGS ); +<& Logout, %ARGS &> +
diff --git a/rt/share/html/Elements/QueryString b/rt/share/html/Elements/QueryString new file mode 100644 index 000000000..e55454cd9 --- /dev/null +++ b/rt/share/html/Elements/QueryString @@ -0,0 +1,64 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 @params; +for my $key (sort keys %ARGS) { + my $value = $ARGS{$key}; + next unless defined $value; + $key = $m->interp->apply_escapes( $key, 'u' ); + 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'); + } +} + +return join '&', sort(@params); + diff --git a/rt/share/html/Elements/QueueSummary b/rt/share/html/Elements/QueueSummary new file mode 100644 index 000000000..bbfd65e56 --- /dev/null +++ b/rt/share/html/Elements/QueueSummary @@ -0,0 +1,108 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + +% for my $condition (@$conditions) { + +% } + +% my $i; +% for my $queue (@queues) { +% $i++; +% my $name = $queue->{Name}; +% $name =~ s/'/\\'/g; +% my $queue_cond = "Queue = '$name' AND "; +% my $all_q = $queue_cond . "(".join( " OR ", map $_->{cond}, @$conditions).")"; + + +% for my $condition (@$conditions) { +% $Tickets->FromSQL( "Queue = $queue->{id} AND ". $condition->{cond} ); + +% } + +% } +
<&|/l&>Queue<% $condition->{name} %>
<% $queue->{Name} %><% $Tickets->Count %>
+<%INIT> +# Ensure sane default +unless ( @$conditions ) { + foreach (RT::Queue->ActiveStatusArray()) { + push @$conditions, { cond => "Status = '$_'", name => loc($_) }; + } +} + + +my @queues; + +if ($cache && exists $session{$cache}) { + @queues = @{$session{$cache}}; +} +else { + my $Queues = RT::Queues->new($session{'CurrentUser'}); + $Queues->UnLimit(); + @queues = grep $queue_filter->($_), @{$Queues->ItemsArrayRef}; + + $m->callback( CallbackName => 'Filter', Queues => \@queues ); + + @queues = map { { + id => $_->Id, + Name => $_->Name, + Description => $_->Description, + } } grep $_, @queues; + + $session{$cache} = \@queues if $cache; +} + + +my $Tickets = RT::Tickets->new($session{'CurrentUser'}); + +<%ARGS> +$cache => undef +$queue_filter => undef +$conditions => [] + diff --git a/rt/share/html/Elements/QuickCreate b/rt/share/html/Elements/QuickCreate new file mode 100644 index 000000000..45e2e2f97 --- /dev/null +++ b/rt/share/html/Elements/QuickCreate @@ -0,0 +1,77 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Quick ticket creation') &> +
+ + + + + + + + + + + + + + + +
<&|/l&>Subject:
<&|/l&>Queue:<& /Elements/SelectNewTicketQueue, Name => 'Queue' &> +<&|/l&>Owner: + +
<&|/l&>Requestors:<& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => $ARGS{Requestors} || $session{CurrentUser}->EmailAddress &>
<&|/l&>Content:
+<& /Elements/Submit, Label => loc('Create') &> +
+ +
+ diff --git a/rt/share/html/Elements/Quicksearch b/rt/share/html/Elements/Quicksearch new file mode 100755 index 000000000..402a2f23f --- /dev/null +++ b/rt/share/html/Elements/Quicksearch @@ -0,0 +1,65 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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("Quick search"), bodyclass => "", + titleright => loc("Edit"), titleright_href => RT->Config->Get('WebPath').'/Prefs/Quicksearch.html' &> +<& /Elements/QueueSummary, + cache => 'quick_search_queues', + queue_filter => sub { $_->CurrentUserHasRight('ShowTicket') && !exists $unwanted->{$_->Name} }, + conditions => \@conditions, +&> + +
+<%INIT> +my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QuickSearch', {}); + +my @conditions = (); +foreach ( RT::Queue->ActiveStatusArray ) { + push @conditions, { cond => "Status = '$_'", name => loc($_) }; +} + diff --git a/rt/share/html/Elements/RT__Group/ColumnMap b/rt/share/html/Elements/RT__Group/ColumnMap new file mode 100644 index 000000000..f7dd0f89d --- /dev/null +++ b/rt/share/html/Elements/RT__Group/ColumnMap @@ -0,0 +1,92 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +$Attr => undef + +<%ONCE> +my $COLUMN_MAP = { + id => { + title => '#', # loc + attribute => 'id', + align => 'right', + value => sub { return $_[0]->id }, + }, + HasMember => { + title => 'Member', # loc + value => sub { + my $group = $_[0]; + my $uid = $_[2] || return ''; + return $group->HasMember( $uid )? $_[0]->loc('yes'): $_[0]->loc('no'); + }, + }, + HasMemberRecursively => { + title => 'Recursive member', # loc + value => sub { + my $group = $_[0]; + my $uid = $_[2] || return ''; + return $group->HasMemberRecursively( $uid )? $_[0]->loc('yes'): $_[0]->loc('no'); + }, + }, + Name => { + title => 'Name', # loc + attribute => 'Name', + value => sub { return $_[0]->Name() }, + }, + Description => { + title => 'Description', # loc + attribute => 'Description', + value => sub { return $_[0]->Description() }, + }, +}; + + +<%INIT> +$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 ); +return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr ); + diff --git a/rt/share/html/Elements/RT__Queue/ColumnMap b/rt/share/html/Elements/RT__Queue/ColumnMap new file mode 100644 index 000000000..5c56004d1 --- /dev/null +++ b/rt/share/html/Elements/RT__Queue/ColumnMap @@ -0,0 +1,115 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => undef +$Attr => undef + +<%ONCE> +my $COLUMN_MAP = { + id => { + title => '#', # loc + attribute => 'id', + align => 'right', + value => sub { return $_[0]->id }, + }, + Disabled => { + title => \' ', + attribute => 'Disabled', + value => sub { return $_[0]->Disabled? $_[0]->loc('Disabled'): $_[0]->loc('Enabled') }, + }, + Priority => { + title => 'Priority', # loc + value => sub { return $_[0]->InitialPriority .'-'. $_[0]->FinalPriority }, + }, + Address => { + title => 'Address', # loc + value => sub { return ($_[0]->CorrespondAddress||'-') .'/'. ($_[0]->CommentAddress||'-') }, + }, + Name => { + title => 'Name', # loc + attribute => 'Name', + value => sub { return $_[0]->Name() }, + }, + Description => { + title => 'Description', # loc + attribute => 'Description', + value => sub { return $_[0]->Description() }, + }, + CorrespondAddress => { + title => 'CorrespondAddress', # loc + attribute => 'CorrespondAddress', + value => sub { return $_[0]->CorrespondAddress() }, + }, + CommentAddress => { + title => 'CommentAddress', # loc + attribute => 'CommentAddress', + value => sub { return $_[0]->CommentAddress() }, + }, + InitialPriority => { + title => 'InitialPriority', # loc + attribute => 'InitialPriority', + value => sub { return $_[0]->InitialPriority() }, + }, + FinalPriority => { + title => 'FinalPriority', # loc + attribute => 'FinalPriority', + value => sub { return $_[0]->FinalPriority() }, + }, + DefaultDueIn => { + title => 'DefaultDueIn', # loc + attribute => 'DefaultDueIn', + value => sub { return $_[0]->DefaultDueIn() }, + }, +}; + + +<%INIT> +$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 ); +return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr ); + + diff --git a/rt/share/html/Elements/RT__Scrip/ColumnMap b/rt/share/html/Elements/RT__Scrip/ColumnMap new file mode 100644 index 000000000..88b4c4bea --- /dev/null +++ b/rt/share/html/Elements/RT__Scrip/ColumnMap @@ -0,0 +1,103 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +$Attr => undef + +<%ONCE> +my $COLUMN_MAP = { + id => { + title => '#', # loc + attribute => 'id', + align => 'right', + value => sub { return $_[0]->id }, + }, + Queue => { + title => 'Queue', # loc + value => sub { + return $_[0]->QueueObj->Name if $_[0]->Queue; + return $_[0]->loc('Global'); + }, + }, + Condition => { + title => 'Condition', # loc + value => sub { return $_[0]->loc( $_[0]->ScripConditionObj->Name ) }, + }, + Action => { + title => 'Action', # loc + value => sub { return $_[0]->loc( $_[0]->ScripActionObj->Name ) }, + }, + Template => { + title => 'Template', # loc + value => sub { return $_[0]->loc( $_[0]->TemplateObj->Name ) }, + }, + AutoDescription => { + title => 'Condition, Action and Template', # loc + value => sub { return $_[0]->loc( "[_1] [_2] with template [_3]", + $_[0]->loc($_[0]->ConditionObj->Name), + $_[0]->loc($_[0]->ActionObj->Name), + $_[0]->loc($_[0]->TemplateObj->Name), + ) }, + }, + Description => { + title => 'Description', # loc + attribute => 'Description', + value => sub { return $_[0]->Description() }, + }, + Stage => { + title => 'Stage', # loc + attribute => 'Stage', + value => sub { return $_[0]->Stage() }, + }, +}; + + +<%INIT> +$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 ); +return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr ); + diff --git a/rt/share/html/Elements/RT__Template/ColumnMap b/rt/share/html/Elements/RT__Template/ColumnMap new file mode 100644 index 000000000..851cc9dec --- /dev/null +++ b/rt/share/html/Elements/RT__Template/ColumnMap @@ -0,0 +1,76 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +$Attr => undef + +<%ONCE> +my $COLUMN_MAP = { + id => { + title => '#', # loc + attribute => 'id', + align => 'right', + value => sub { return $_[0]->id }, + }, + Name => { + title => 'Name', # loc + attribute => 'Name', + value => sub { return $_[0]->Name() }, + }, + Description => { + title => 'Description', # loc + attribute => 'Description', + value => sub { return $_[0]->Description() }, + }, +}; + + +<%INIT> +$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 ); +return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr ); + diff --git a/rt/share/html/Elements/RT__Ticket/ColumnMap b/rt/share/html/Elements/RT__Ticket/ColumnMap new file mode 100644 index 000000000..7df471009 --- /dev/null +++ b/rt/share/html/Elements/RT__Ticket/ColumnMap @@ -0,0 +1,355 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => undef +$Attr => undef + + + +<%ONCE> +my $COLUMN_MAP; + +my $LinkCallback = sub { + my $method = shift; + + my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode}; + my $type = $RT::Ticket::LINKTYPEMAP{$method}{Type}; + my $other_mode = ($mode eq "Target" ? "Base" : "Target"); + my $mode_uri = $mode.'URI'; + my $local_type = 'Local'.$mode; + + return sub { + map { + \'', + ( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ), + \'
', + } @{ $_[0]->Links($other_mode,$type)->ItemsArrayRef } + } +}; + +$COLUMN_MAP = { + Queue => { + attribute => 'Queue', + title => 'Queue id', # loc + value => sub { return $_[0]->Queue } + }, + QueueName => { + attribute => 'Queue', + title => 'Queue', # loc + value => sub { return $_[0]->QueueObj->Name } + }, + OwnerName => { + title => 'Owner', # loc + attribute => 'Owner', + value => sub { return $_[0]->OwnerObj->Name } + }, + Status => { + title => 'Status', # loc + attribute => 'Status', + value => sub { return loc($_[0]->Status) } + }, + Subject => { + title => 'Subject', # loc + attribute => 'Subject', + value => sub { return $_[0]->Subject || "(" . loc('No subject') . ")" } + }, + ExtendedStatus => { + title => 'Status', # loc + attribute => 'Status', + value => sub { + my $Ticket = shift; + + if ( my $count = $Ticket->HasUnresolvedDependencies ) { + if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' ) + or $Ticket->HasUnresolvedDependencies( Type => 'code' ) ) + { + return \'', loc('(pending approval)'), \''; + } + else { + my $Query = "DependedOnBy = " . $Ticket->id; + $Query .= " AND (" . join(" OR ", map { "Status = '$_'" } RT::Queue->ActiveStatusArray) . ")"; + + my $SearchURL = RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => $Query); + + return \'', loc('(pending [quant,_1,other ticket])',$count), \''; + } + } + else { + return loc( $Ticket->Status ); + } + + } + }, + Priority => { + title => 'Priority', # loc + attribute => 'Priority', + value => sub { return $_[0]->Priority } + }, + InitialPriority => { + title => 'InitialPriority', # loc + attribute => 'InitialPriority', + name => 'Initial Priority', + value => sub { return $_[0]->InitialPriority } + }, + FinalPriority => { + title => 'FinalPriority', # loc + attribute => 'FinalPriority', + name => 'Final Priority', + value => sub { return $_[0]->FinalPriority } + }, + EffectiveId => { + title => 'EffectiveId', # loc + attribute => 'EffectiveId', + value => sub { return $_[0]->EffectiveId } + }, + Type => { + title => 'Type', # loc + attribute => 'Type', + value => sub { return $_[0]->Type } + }, + TimeWorked => { + attribute => 'TimeWorked', + title => 'Time Worked', # loc + value => sub { return $_[0]->TimeWorked } + }, + TimeLeft => { + attribute => 'TimeLeft', + title => 'Time Left', # loc + value => sub { return $_[0]->TimeLeftAsString } + }, + TimeEstimated => { + attribute => 'TimeEstimated', + title => 'Time Estimated', # loc + value => sub { return $_[0]->TimeEstimated } + }, + Requestors => { + title => 'Requestors', # loc + attribute => 'Requestor.EmailAddress', + value => sub { return $_[0]->Requestors->MemberEmailAddressesAsString } + }, + Cc => { + title => 'Cc', # loc + attribute => 'Cc.EmailAddress', + value => sub { return $_[0]->Cc->MemberEmailAddressesAsString } + }, + AdminCc => { + title => 'AdminCc', # loc + attribute => 'AdminCc.EmailAddress', + value => sub { return $_[0]->AdminCc->MemberEmailAddressesAsString } + }, + StartsRelative => { + title => 'Starts', # loc + attribute => 'Starts', + value => sub { return $_[0]->StartsObj->AgeAsString } + }, + StartedRelative => { + title => 'Started', # loc + attribute => 'Started', + value => sub { return $_[0]->StartedObj->AgeAsString } + }, + ToldRelative => { + title => 'Told', # loc + attribute => 'Told', + value => sub { return $_[0]->ToldObj->AgeAsString } + }, + DueRelative => { + title => 'Due', # loc + attribute => 'Due', + value => sub { + my $date = $_[0]->DueObj; + # Highlight the date if it was due in the past, and it's still active + if ( $date && $date->Unix > 0 && $date->Diff < 0 && $_[0]->QueueObj->IsActiveStatus($_[0]->Status)) { + return (\'' , $date->AgeAsString , \''); + } else { + return $date->AgeAsString; + } + } + }, + ResolvedRelative => { + title => 'Resolved', # loc + attribute => 'Resolved', + value => sub { return $_[0]->ResolvedObj->AgeAsString } + }, + Starts => { + title => 'Starts', # loc + attribute => 'Starts', + value => sub { return $_[0]->StartsObj->AsString } + }, + Started => { + title => 'Started', # loc + attribute => 'Started', + value => sub { return $_[0]->StartedObj->AsString } + }, + Told => { + title => 'Told', # loc + attribute => 'Told', + value => sub { return $_[0]->ToldObj->AsString } + }, + Due => { + title => 'Due', # loc + attribute => 'Due', + value => sub { return $_[0]->DueObj->AsString } + }, + Resolved => { + title => 'Resolved', # loc + attribute => 'Resolved', + value => sub { return $_[0]->ResolvedObj->AsString } + }, + UpdateStatus => { + title => 'New messages', # loc + value => sub { + my $txn = $_[0]->SeenUpTo or return $_[0]->loc('No'); + return \(''), + $_[0]->loc('New'), \''; + }, + }, + KeyRequestors => { + title => 'Requestors', # loc + attribute => 'Requestor.EmailAddress', + value => sub { + my $t = shift; + my @requestors = $t->Requestors->MemberEmailAddresses; + for my $email (@requestors) + { + my %key = RT::Crypt::GnuPG::GetKeyInfo($email); + if (!defined $key{'info'}) { + $email .= loc(" (no pubkey!)"); + } + elsif ($key{'info'}{'TrustLevel'} == 0) { + $email .= loc(" (untrusted!)"); + } + } + return join ', ', @requestors; + } + }, + KeyOwnerName => { + title => 'Owner', # loc + attribute => 'Owner', + value => sub { + my $t = shift; + my $name = $t->OwnerObj->Name; + my %key = RT::Crypt::GnuPG::GetKeyInfo($t->OwnerObj->EmailAddress); + if (!defined $key{'info'}) { + $name .= ' '. loc("(no pubkey!)"); + } + elsif ($key{'info'}{'TrustLevel'} == 0) { + $name .= ' '. loc("(untrusted!)"); + } + + return $name; + } + }, + + # Everything from LINKTYPEMAP + (map { + $_ => { value => $LinkCallback->( $_ ) } + } keys %RT::Ticket::LINKTYPEMAP), + + '_CLASS' => { + value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' } + }, + '_CHECKBOX' => { + attribute => 'checkbox', + title => 'Update', # loc + align => 'right', + value => sub { return \('') } + }, + + CustomField => { + attribute => sub { return shift @_ }, + title => sub { return pop @_ }, + value => sub { + # Display custom field contents, separated by newlines. + # For Image custom fields we also show a thumbnail here. + + my $values = $_[0]->CustomFieldValues( $_[-1] ); + my @values = map { + ( + ($_->CustomFieldObj->Type eq 'Image') + ? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ )) + : $_->Content + ), + \'
', + } @{ $values->ItemsArrayRef }; + pop @values; # Remove that last
+ return @values; + }, + }, + Bookmark => { + title => ' ', + value => sub { + my $bookmark = $m->scomp( '/Ticket/Elements/Bookmark', id => $_[0]->id ); + # the CollectionAsTable/Row template replaces newlines with
+ $bookmark =~ s/\n//g; + + return \$bookmark; + }, + }, +}; + +$COLUMN_MAP->{'CF'} = $COLUMN_MAP->{'CustomField'}; + +# if no GPG support, then KeyOwnerName and KeyRequestors fall back to the regular +# versions +if (RT->Config->Get('GnuPG')->{'Enable'}) { + require RT::Crypt::GnuPG; +} +else { + $COLUMN_MAP->{KeyOwnerName} = $COLUMN_MAP->{OwnerName}; + $COLUMN_MAP->{KeyRequestors} = $COLUMN_MAP->{Requestors}; +} + +<%init> +$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'Once', CallbackOnce => 1 ); +# backward compatibility +$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap' ); +return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr ); + diff --git a/rt/share/html/Elements/RT__User/ColumnMap b/rt/share/html/Elements/RT__User/ColumnMap new file mode 100644 index 000000000..bb93b978f --- /dev/null +++ b/rt/share/html/Elements/RT__User/ColumnMap @@ -0,0 +1,141 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +$Attr => undef + +<%ONCE> +my $COLUMN_MAP = { + id => { + title => '#', # loc + attribute => 'id', + align => 'right', + value => sub { return $_[0]->id }, + }, + Name => { + title => 'Name', # loc + attribute => 'Name', + value => sub { return $_[0]->Name() }, + }, + RealName => { + title => 'RealName', # loc + attribute => 'RealName', + value => sub { return $_[0]->RealName() }, + }, + NickName => { + title => 'NickName', # loc + attribute => 'NickName', + value => sub { return $_[0]->NickName() }, + }, + EmailAddress => { + title => 'EmailAddress', # loc + attribute => 'EmailAddress', + value => sub { return $_[0]->EmailAddress() }, + }, + Organization => { + title => 'Organization', # loc + attribute => 'Organization', + value => sub { return $_[0]->Organization() }, + }, + HomePhone => { + title => 'HomePhone', # loc + attribute => 'HomePhone', + value => sub { return $_[0]->HomePhone() }, + }, + WorkPhone => { + title => 'WorkPhone', # loc + attribute => 'WorkPhone', + value => sub { return $_[0]->WorkPhone() }, + }, + MobilePhone => { + title => 'MobilePhone', # loc + attribute => 'MobilePhone', + value => sub { return $_[0]->MobilePhone() }, + }, + PagerPhone => { + title => 'PagerPhone', # loc + attribute => 'PagerPhone', + value => sub { return $_[0]->PagerPhone() }, + }, + Address1 => { + title => 'Address1', # loc + attribute => 'Address1', + value => sub { return $_[0]->Address1() }, + }, + Address2 => { + title => 'Address2', # loc + attribute => 'Address2', + value => sub { return $_[0]->Address2() }, + }, + City => { + title => 'City', # loc + attribute => 'City', + value => sub { return $_[0]->City() }, + }, + State => { + title => 'State', # loc + attribute => 'State', + value => sub { return $_[0]->State() }, + }, + Zip => { + title => 'Zip', # loc + attribute => 'Zip', + value => sub { return $_[0]->Zip() }, + }, + Country => { + title => 'Country', # loc + attribute => 'Country', + value => sub { return $_[0]->Country() }, + }, +}; + + +<%INIT> +$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 ); +return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr ); + diff --git a/rt/share/html/Elements/Refresh b/rt/share/html/Elements/Refresh new file mode 100755 index 000000000..7e36c6855 --- /dev/null +++ b/rt/share/html/Elements/Refresh @@ -0,0 +1,69 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 @refreshevery = qw(120 300 600 1200 3600 7200); + +<%ARGS> +$Name => undef +$Default => 0 + diff --git a/rt/share/html/Elements/RefreshHomepage b/rt/share/html/Elements/RefreshHomepage new file mode 100644 index 000000000..bf91a9522 --- /dev/null +++ b/rt/share/html/Elements/RefreshHomepage @@ -0,0 +1,54 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Refresh')&> +
+<& /Elements/Refresh, Name => 'HomeRefreshInterval', + Default => $session{'home_refresh_interval'}||RT->Config->Get('HomePageRefreshInterval', $session{'CurrentUser'}) &> +<& /Elements/Submit, Label => loc('Go!') &> + +
diff --git a/rt/share/html/Elements/ScrubHTML b/rt/share/html/Elements/ScrubHTML new file mode 100644 index 000000000..7744a8532 --- /dev/null +++ b/rt/share/html/Elements/ScrubHTML @@ -0,0 +1,77 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<%ONCE> +my $scrubber = new HTML::Scrubber; +$scrubber->default( + 0, + { + '*' => 0, + id => 1, + class => 1, + # Match http, ftp and relative urls + # XXX: we also scrub format strings with this module then allow simple config options + href => qr{^(?:http:|ftp:|https:|/|__Web(?:Path|BaseURL|URL)__)}i, + face => 1, + size => 1, + target => 1, + style => qr{^(?:(?:color:\s*rgb\(\d+,\s*\d+,\s*\d+\))| + (?:text-align:\s*))}ix, + } +); +$scrubber->deny(qw[*]); +$scrubber->allow( + qw[A B U P BR I HR BR SMALL EM FONT SPAN STRONG SUB SUP STRIKE H1 H2 H3 H4 H5 H6 DIV UL OL LI DL DT DD PRE] +); +$scrubber->comment(0); + +<%init> +return $scrubber->scrub($Content); + +<%args> +$Content => undef + diff --git a/rt/share/html/Elements/Section b/rt/share/html/Elements/Section new file mode 100755 index 000000000..b67115d85 --- /dev/null +++ b/rt/share/html/Elements/Section @@ -0,0 +1,51 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +

<%$title%>

+<%ARGS> +$title => undef + diff --git a/rt/share/html/Elements/SelectAttachmentField b/rt/share/html/Elements/SelectAttachmentField new file mode 100755 index 000000000..459b6926e --- /dev/null +++ b/rt/share/html/Elements/SelectAttachmentField @@ -0,0 +1,56 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => 'AttachmentField' + diff --git a/rt/share/html/Elements/SelectBoolean b/rt/share/html/Elements/SelectBoolean new file mode 100755 index 000000000..e535ae547 --- /dev/null +++ b/rt/share/html/Elements/SelectBoolean @@ -0,0 +1,71 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => undef +$True => loc("is") +$Default => 'true' +$TrueVal => 1 +$FalseVal => 0 +$False => loc("isn't") + + +<%INIT> +my $TrueDefault = ''; +my $FalseDefault = ''; +if ($Default && $Default !~ /true/i) { + $FalseDefault = 'selected="selected"'; +} +else { + $TrueDefault = 'selected="selected"'; +} + diff --git a/rt/share/html/Elements/SelectCustomFieldOperator b/rt/share/html/Elements/SelectCustomFieldOperator new file mode 100755 index 000000000..f7fdaadf5 --- /dev/null +++ b/rt/share/html/Elements/SelectCustomFieldOperator @@ -0,0 +1,64 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => undef +@Options => ( loc('matches'), loc("doesn't match"), loc('is'), loc("isn't"), loc('less than'), loc('greater than')) +@Values => ('LIKE', 'NOT LIKE', '=', '!=', '<', '>') +$Default => '' + diff --git a/rt/share/html/Elements/SelectCustomFieldValue b/rt/share/html/Elements/SelectCustomFieldValue new file mode 100755 index 000000000..579f6962a --- /dev/null +++ b/rt/share/html/Elements/SelectCustomFieldValue @@ -0,0 +1,65 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% $m->callback( Name => $Name, CustomField => $CustomField ); +% if ($CustomField->Type =~ /Select/i) { +% my $values = $CustomField->Values; + +% } +% else { + +% } +<%args> +$Name => undef +$CustomField =>undef + diff --git a/rt/share/html/Elements/SelectDate b/rt/share/html/Elements/SelectDate new file mode 100755 index 000000000..32a173db4 --- /dev/null +++ b/rt/share/html/Elements/SelectDate @@ -0,0 +1,77 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +unless ((defined $Default) or + ($current <= 0)) { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime($current); + $Default = sprintf("%04d-%02d-%02d %02d:%02d", + $year+1900,$mon+1,$mday, + $hour,$min); +} +$Value = $Value || $Default; + +unless ($Name) { + $Name = $menu_prefix. "_Date"; +} + + +<%args> + +$ShowTime => 1 +$menu_prefix=>'' +$current=>time +$Default => '' +$Value => '' +$Name => undef +$Size => 16 + diff --git a/rt/share/html/Elements/SelectDateRelation b/rt/share/html/Elements/SelectDateRelation new file mode 100755 index 000000000..61ab350f3 --- /dev/null +++ b/rt/share/html/Elements/SelectDateRelation @@ -0,0 +1,60 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => undef +$Default => undef +$Before => loc('before') +$On => loc('on') +$After => loc('after') + diff --git a/rt/share/html/Elements/SelectDateType b/rt/share/html/Elements/SelectDateType new file mode 100755 index 000000000..a8631134d --- /dev/null +++ b/rt/share/html/Elements/SelectDateType @@ -0,0 +1,60 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => 'DateType' + diff --git a/rt/share/html/Elements/SelectEqualityOperator b/rt/share/html/Elements/SelectEqualityOperator new file mode 100755 index 000000000..2d52df7f0 --- /dev/null +++ b/rt/share/html/Elements/SelectEqualityOperator @@ -0,0 +1,64 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => undef +@Options => (loc('less than'), loc('equal to'), loc('greater than'), loc('not equal to')) +@Values => qw(< = > !=) +$Default =>'' + diff --git a/rt/share/html/Elements/SelectGroups b/rt/share/html/Elements/SelectGroups new file mode 100755 index 000000000..766a389c4 --- /dev/null +++ b/rt/share/html/Elements/SelectGroups @@ -0,0 +1,68 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/SelectMatch, Name => 'GroupOp', Default => $GroupOp &> + +<%INIT> +my $CFs = RT::CustomFields->new($session{'CurrentUser'}); +$CFs->LimitToChildType('RT::Group'); +$CFs->OrderBy( FIELD => 'Name' ); + +<%ARGS> +$GroupField => '' +$GroupOp => '' +$GroupString => '' + diff --git a/rt/share/html/Elements/SelectLang b/rt/share/html/Elements/SelectLang new file mode 100755 index 000000000..914a6f59c --- /dev/null +++ b/rt/share/html/Elements/SelectLang @@ -0,0 +1,80 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$ShowNullOption => 1 +$ShowAllQueues => 1 +$Name => undef +$Verbose => undef +$Default => 0 +$Lite => 0 + + +<%ONCE> +use I18N::LangTags::List; +my (@lang, %lang_to_desc); +foreach my $lang (map { s/:://; s/_/-/g; $_ } grep { /^\w+::$/ } keys %RT::I18N::) { + next if $lang =~ /i-default|en-us/; + my $desc = I18N::LangTags::List::name($lang); + next unless ($desc); + $desc =~ s/(.*) (.*)/$2 ($1)/ unless ( $desc =~ /.* \(.*\)/ ); + $lang_to_desc{$lang} = $desc; +} +@lang = sort { $lang_to_desc{$a} cmp $lang_to_desc{$b} } keys %lang_to_desc; + diff --git a/rt/share/html/Elements/SelectLinkType b/rt/share/html/Elements/SelectLinkType new file mode 100755 index 000000000..e4babe3c9 --- /dev/null +++ b/rt/share/html/Elements/SelectLinkType @@ -0,0 +1,57 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => "LinkType" +$Default => '' + diff --git a/rt/share/html/Elements/SelectMatch b/rt/share/html/Elements/SelectMatch new file mode 100755 index 000000000..78a87caae --- /dev/null +++ b/rt/share/html/Elements/SelectMatch @@ -0,0 +1,82 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => undef +$Like => loc('matches') +$NotLike => loc("doesn't match") +$True => loc('is') +$False => loc("isn't") +$Default => undef + +<%INIT> + +my $TrueDefault = ''; +my $FalseDefault=''; +my $LikeDefault=''; +my $NotLikeDefault =''; + +if ($Default && $Default =~ /false|!=/i) { + $FalseDefault = qq[ selected="selected"]; +} +elsif ($Default && $Default =~ /true|=/i) { + $TrueDefault = qq[ selected="selected"]; +} +elsif ($Default && $Default =~ /notlike|NOT LIKE/i) { + $NotLikeDefault = qq[ selected="selected"]; +} +else { + $LikeDefault = qq[ selected="selected"]; +} + diff --git a/rt/share/html/Elements/SelectNewTicketQueue b/rt/share/html/Elements/SelectNewTicketQueue new file mode 100755 index 000000000..d7d406ea7 --- /dev/null +++ b/rt/share/html/Elements/SelectNewTicketQueue @@ -0,0 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + diff --git a/rt/share/html/Elements/SelectOwner b/rt/share/html/Elements/SelectOwner new file mode 100755 index 000000000..6bdb24064 --- /dev/null +++ b/rt/share/html/Elements/SelectOwner @@ -0,0 +1,133 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 @objects; +if ($TicketObj) { + @objects = ($TicketObj); +} elsif ($QueueObj) { + @objects = ($QueueObj); +} elsif ($cfqueues) { + @objects = keys %{$cfqueues}; +} else { +# Let's check rights on an empty queue object. that will do a search +# for any queue. + my $queue = RT::Queue->new( $session{'CurrentUser'} ); + push( @objects, $queue ); +} + +my %user_uniq_hash; + +$m->callback( + %ARGS, + objects => \@objects, + CallbackName => 'UpdateObjectList' +); + +my $isSU = $session{CurrentUser} + ->HasRight( Right => 'SuperUser', Object => $RT::System ); +foreach my $object (@objects) { + my $Users = RT::Users->new( $session{CurrentUser} ); + $Users->WhoHaveRight( + Right => 'OwnTicket', + Object => $object, + IncludeSystemRights => 1, + IncludeSuperusers => $isSU + ); + while ( my $User = $Users->Next() ) { + next + if ( $User->id == $RT::Nobody->id ) + ; # skip nobody here, so we can make them first later + $user_uniq_hash{ $User->Id() } = $User; + } +} +if ($Default && $Default != $RT::Nobody->id && !$user_uniq_hash{$Default}) { + $user_uniq_hash{$Default} = RT::User->new($session{CurrentUser}); + $user_uniq_hash{$Default}->Load($Default); +} + +my @users = sort { uc( $a->Name ) cmp uc( $b->Name ) } values %user_uniq_hash; +unshift( @users, $RT::Nobody ); + +$m->callback( + %ARGS, + objects => \@objects, + CallbackName => 'UpdateObjectList' +); + + + + +<%ARGS> +$QueueObj => undef +$Name => undef +$Default => 0 +$User => undef +$TicketObj => undef +$DefaultValue => 1 +$DefaultLabel => "-" +$ValueAttribute => 'id' +$cfqueues => undef + diff --git a/rt/share/html/Elements/SelectPriority b/rt/share/html/Elements/SelectPriority new file mode 100644 index 000000000..c8af7cca8 --- /dev/null +++ b/rt/share/html/Elements/SelectPriority @@ -0,0 +1,8 @@ + +<%ARGS> +$Name => 'Priority' +$Default => '' + +<%INIT> +$Default = '' unless defined $Default; + diff --git a/rt/share/html/Elements/SelectQueue b/rt/share/html/Elements/SelectQueue new file mode 100755 index 000000000..20a5b7d9d --- /dev/null +++ b/rt/share/html/Elements/SelectQueue @@ -0,0 +1,106 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ($Lite) { +% my $d = new RT::Queue($session{'CurrentUser'}); +% $d->Load($Default); + +% } +% else { + +% } +<%args> +$CheckQueueRight => 'CreateTicket' +$ShowNullOption => 1 +$ShowAllQueues => 1 +$Name => undef +$Verbose => undef +$NamedValues => 0 +$Default => 0 +$Lite => 0 +$OnChange => undef +$Class => 'select-queue' + +<%init> +my $cache_key = "SelectQueue---" + . $session{'CurrentUser'}->Id + . "---$CheckQueueRight---$ShowAllQueues"; + +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, + }; + } + } +} + diff --git a/rt/share/html/Elements/SelectResultsPerPage b/rt/share/html/Elements/SelectResultsPerPage new file mode 100755 index 000000000..ec1f27f3c --- /dev/null +++ b/rt/share/html/Elements/SelectResultsPerPage @@ -0,0 +1,68 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +%# TODO: Better default handling + + + +<%INIT> +my @values = qw(0 10 25 50 100); +my @labels = (loc('Unlimited'), qw(10 25 50 100)); +$Default = 50 unless defined $Default; + +<%ARGS> + +$Name => undef +$Default => 50 + + diff --git a/rt/share/html/Elements/SelectSortOrder b/rt/share/html/Elements/SelectSortOrder new file mode 100755 index 000000000..ded5a99c9 --- /dev/null +++ b/rt/share/html/Elements/SelectSortOrder @@ -0,0 +1,65 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 @orders = qw (ASC DESC); +my @order_names = (loc('Ascending'), loc('Descending')); + + + +<%ARGS> +$Name => 'SortOrder' +$Default => 'ASC' + diff --git a/rt/share/html/Elements/SelectStatus b/rt/share/html/Elements/SelectStatus new file mode 100755 index 000000000..7f328e5b4 --- /dev/null +++ b/rt/share/html/Elements/SelectStatus @@ -0,0 +1,67 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + +<%ONCE> +my $queue = new RT::Queue($session{'CurrentUser'}); +my @status = $queue->StatusArray(); + +<%ARGS> +$Name => undef +$Default => '' +$SkipDeleted => 0 +$DefaultValue => 1 +$DefaultLabel => "-" + diff --git a/rt/share/html/Elements/SelectTicketSortBy b/rt/share/html/Elements/SelectTicketSortBy new file mode 100755 index 000000000..d6964ec5b --- /dev/null +++ b/rt/share/html/Elements/SelectTicketSortBy @@ -0,0 +1,62 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $tickets = new RT::Tickets($session{'CurrentUser'}); +my @sortfields = $tickets->SortFields(); + + +<%ARGS> +$Name => 'SortTicketsBy' +$Default => 'id' + diff --git a/rt/share/html/Elements/SelectTicketTypes b/rt/share/html/Elements/SelectTicketTypes new file mode 100755 index 000000000..792130988 --- /dev/null +++ b/rt/share/html/Elements/SelectTicketTypes @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 => 'TickType' +$Default => undef +@Types => qw(Approval Ticket) + diff --git a/rt/share/html/Elements/SelectTimeUnits b/rt/share/html/Elements/SelectTimeUnits new file mode 100755 index 000000000..5438d3d6c --- /dev/null +++ b/rt/share/html/Elements/SelectTimeUnits @@ -0,0 +1,62 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$Name .= '-TimeUnits' unless $Name =~ /-TimeUnits$/io; +my $HoursDefault = RT->Config->Get('DefaultTimeUnitsToHours'); + +<%ARGS> +$Name => '' + diff --git a/rt/share/html/Elements/SelectTimezone b/rt/share/html/Elements/SelectTimezone new file mode 100644 index 000000000..09399e1ce --- /dev/null +++ b/rt/share/html/Elements/SelectTimezone @@ -0,0 +1,84 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<%ONCE> +my $HAS_DATETIME_TZ = eval { require DateTime::TimeZone }; +my $HAS_DATETIME = eval { require DateTime }; + +my (@names, %label); +if ( $HAS_DATETIME_TZ ) { + @names = DateTime::TimeZone->all_names; +} + +if ( $HAS_DATETIME ) { + my $dt = DateTime->now; + for ( @names ) { + $dt->set_time_zone( $_ ); + $label{$_} = $_ . ' ' . $dt->strftime('%z'); + } +} + + +% unless ( $HAS_DATETIME_TZ && @names ) { + +% } else { + +% } +<%ARGS> +$ShowNullOption => 1 +$Name => undef +$Default => 0 + + diff --git a/rt/share/html/Elements/SelectUsers b/rt/share/html/Elements/SelectUsers new file mode 100755 index 000000000..b4a3aa0db --- /dev/null +++ b/rt/share/html/Elements/SelectUsers @@ -0,0 +1,68 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/SelectMatch, Name => 'UserOp', Default => $UserOp &> + +<%INIT> +my $CFs = RT::CustomFields->new($session{'CurrentUser'}); +$CFs->LimitToChildType('RT::User'); +$CFs->OrderBy( FIELD => 'Name' ); + +<%ARGS> +$UserField => '' +$UserOp => '' +$UserString => '' + diff --git a/rt/share/html/Elements/SelectWatcherType b/rt/share/html/Elements/SelectWatcherType new file mode 100755 index 000000000..b5636af49 --- /dev/null +++ b/rt/share/html/Elements/SelectWatcherType @@ -0,0 +1,71 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 @types; +if ($Scope =~ 'queue') { + @types = qw(Cc AdminCc); +} +else { + @types = qw(Requestor Cc AdminCc); +} + +<%ARGS> +$AllowNull => 1 +$Default=>undef +$Scope => 'ticket' +$Name => 'WatcherType' + diff --git a/rt/share/html/Elements/SetupSessionCookie b/rt/share/html/Elements/SetupSessionCookie new file mode 100755 index 000000000..3afe68376 --- /dev/null +++ b/rt/share/html/Elements/SetupSessionCookie @@ -0,0 +1,57 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +return if $m->is_subrequest; # avoid reentrancy, as suggested by masonbook + +RT::Interface::Web::LoadSessionFromCookie(); + +return (); + +<%ARGS> +$SessionCookie => undef + diff --git a/rt/share/html/Elements/ShowCustomFieldBinary b/rt/share/html/Elements/ShowCustomFieldBinary new file mode 100644 index 000000000..9c73e8026 --- /dev/null +++ b/rt/share/html/Elements/ShowCustomFieldBinary @@ -0,0 +1,51 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<% $Object->Content %> +<%ARGS> +$Object => undef + diff --git a/rt/share/html/Elements/ShowCustomFieldImage b/rt/share/html/Elements/ShowCustomFieldImage new file mode 100644 index 000000000..2f470cdbd --- /dev/null +++ b/rt/share/html/Elements/ShowCustomFieldImage @@ -0,0 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% my $url = RT->Config->Get('WebPath') . "/Download/CustomFieldValue/".$Object->Id.'/'.$Object->Content; +<% $Object->Content %> + +<%ARGS> +$Object + diff --git a/rt/share/html/Elements/ShowCustomFieldText b/rt/share/html/Elements/ShowCustomFieldText new file mode 100644 index 000000000..beaa2a5a1 --- /dev/null +++ b/rt/share/html/Elements/ShowCustomFieldText @@ -0,0 +1,56 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 $content = $Object->LargeContent || $Object->Content; + $content = $m->comp('/Elements/ScrubHTML', Content => $content); + $content =~ s|\n|
|g; + +<%$content|n%> +<%ARGS> +$Object + diff --git a/rt/share/html/Elements/ShowCustomFieldWikitext b/rt/share/html/Elements/ShowCustomFieldWikitext new file mode 100644 index 000000000..49376aeb3 --- /dev/null +++ b/rt/share/html/Elements/ShowCustomFieldWikitext @@ -0,0 +1,58 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +% my $content = $Object->LargeContent || $Object->Content; +% $content = $m->comp('/Elements/ScrubHTML', Content => $content); +% my $base = $Object->Object->WikiBase; +% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1, implicit_links => RT->Config->Get('WikiImplicitLinks'), prefix => $base} ); +<%$wiki_content|n%> +<%init> +use Text::WikiFormat; + +<%ARGS> +$Object + diff --git a/rt/share/html/Elements/ShowCustomFields b/rt/share/html/Elements/ShowCustomFields new file mode 100644 index 000000000..ddb8b72e3 --- /dev/null +++ b/rt/share/html/Elements/ShowCustomFields @@ -0,0 +1,123 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ($Table) { + +% } +% while ( my $CustomField = $CustomFields->Next ) { +% my $Values = $Object->CustomFieldValues( $CustomField->Id ); +% my $count = $Values->Count; + + + + +% } +% if ($Table) { +
<% $CustomField->Name %>: +% unless ( $count ) { +<&|/l&>(no value) +% } elsif ( $count == 1 ) { +% $print_value->( $CustomField, $Values->First ); +% } else { +
    +% while ( my $Value = $Values->Next ) { +
  • +% $print_value->( $CustomField, $Value ); +
  • +% } +
+% } +
+% } +<%INIT> +$m->callback( + CallbackName => 'MassageCustomFields', + Object => $Object, + CustomFields => $CustomFields, +); + +my $print_value = sub { + my ($cf, $value) = @_; + my $linked = $cf->LinkValueTo; + if ( $linked ) { + $m->out(''); + } + my $comp = "ShowCustomField". $cf->Type; + $m->callback( + CallbackName => 'ShowComponentName', + Name => \$comp, + CustomField => $cf, + Object => $Object, + ); + if ( $m->comp_exists( $comp ) ) { + $m->comp( $comp, Object => $value ); + } else { + $m->out( $m->interp->apply_escapes( $value->Content, 'h' ) ); + } + $m->out('') 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( '
' ); + $m->print( loc("See also:") ); + $m->out( '' ); + $m->print( $value->IncludeContentForValue ); + $m->out( qq{
\n} ); + $m->out( qq{\n} ); + } +}; + + +<%ARGS> +$Object => undef +$CustomFields => $Object->CustomFields +$Table => 1 + diff --git a/rt/share/html/Elements/ShowLink b/rt/share/html/Elements/ShowLink new file mode 100644 index 000000000..6bd9021b7 --- /dev/null +++ b/rt/share/html/Elements/ShowLink @@ -0,0 +1,69 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ($URI->IsLocal) { +% my $member = $URI->Object; +% if (UNIVERSAL::isa($member, "RT::Ticket")) { +% my $inactive = $member->QueueObj->IsInactiveStatus($member->Status); + + +<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<% loc($member->Status) %>] + + +% } elsif ( UNIVERSAL::can($member, 'Name')) { +<%$URI->Resolver->AsString%>: <%$member->Name%> +% } else { +<%$URI->Resolver->AsString%> +% } +% } else { +<%$URI->Resolver->AsString%> +% } + +<%ARGS> +$URI => undef + diff --git a/rt/share/html/Elements/ShowLinks b/rt/share/html/Elements/ShowLinks new file mode 100755 index 000000000..569bad39c --- /dev/null +++ b/rt/share/html/Elements/ShowLinks @@ -0,0 +1,160 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} + + + + + + + + + + + + + + + + + + + + + + + + + + + +% # Allow people to add more rows to the table +% $m->callback( %ARGS ); + +
<&|/l&>Depends on: (<% loc('Create') %>) + +<%PERL> +my ( @active, @inactive, @not_tickets ); +for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) { + my $target = $link->TargetObj; + if ( $target && $target->isa('RT::Ticket') ) { + if ( $target->QueueObj->IsInactiveStatus( $target->Status ) ) { + push( @inactive, $link->TargetURI ); + } + else { + push( @active, $link->TargetURI ); + } + } + else { + push( @not_tickets, $link->TargetURI ); + } +} + + + +
    +% for my $Link (@not_tickets, @active, @inactive) { +
  • <& ShowLink, URI => $Link &>
  • +% } +
+
<&|/l&>Depended on by: (<% loc('Create') %>) +
    +% while (my $Link = $Ticket->DependedOnBy->Next) { +
  • <& ShowLink, URI => $Link->BaseURI &>
  • +% } +
+
<&|/l&>Parents: (<% loc('Create') %>)<& /Ticket/Elements/ShowParents, Ticket => $Ticket &>
<&|/l&>Children: (<% loc('Create') %>)<& /Ticket/Elements/ShowMembers, Ticket => $Ticket &>
<&|/l&>Refers to: (<% loc('Create') %>) +
    +% while (my $Link = $Ticket->RefersTo->Next) { +
  • <& ShowLink, URI => $Link->TargetURI &>
  • +% } +
+
<&|/l&>Referred to by: (<% loc('Create') %>) +
    +% while (my $Link = $Ticket->ReferredToBy->Next) { +% next if (UNIVERSAL::isa($Link->BaseObj, 'RT::Ticket') && $Link->BaseObj->Type eq 'reminder'); +
  • <& ShowLink, URI => $Link->BaseURI &>
  • +% } +
+
+ +<%INIT> + +my $clone = {}; +my $path + = RT->Config->Get('WebPath') + . '/Ticket/Create.html?Queue=' + . $Ticket->Queue + . '&CloneTicket=' + . $Ticket->id; + + +for my $relation ( + qw(RefersTo ReferredToBy)) { + my $mode = $RT::Ticket::LINKTYPEMAP{$relation}->{Mode}; + my $type = $RT::Ticket::LINKTYPEMAP{$relation}->{Type}; + my $other = "Local" . $mode; + my $field = $mode eq 'Base' ? 'new-' . $type : $type . '-new'; + $clone->{$field} + = $path . "&$field=" + . join( '%20', + ( map { $_->$other() } @{ $Ticket->$relation->ItemsArrayRef } ), + $Ticket->id ); +} + +for my $relation ( qw(MemberOf Members DependsOn DependedOnBy)) { + my $mode = $RT::Ticket::LINKTYPEMAP{$relation}->{Mode}; + my $type = $RT::Ticket::LINKTYPEMAP{$relation}->{Type}; + my $field = $mode eq 'Base' ? 'new-' . $type : $type . '-new'; + $clone->{$field} = $path . "&$field=". $Ticket->id ; +} + + + +<%ARGS> +$Ticket => undef + diff --git a/rt/share/html/Elements/ShowMemberships b/rt/share/html/Elements/ShowMemberships new file mode 100644 index 000000000..84f7155f8 --- /dev/null +++ b/rt/share/html/Elements/ShowMemberships @@ -0,0 +1,88 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ( my $GroupMember = $GroupMembers->Next ) { +% my $Group = RT::Group->new($session{'CurrentUser'}); +% $Group->Load($GroupMember->GroupId) or next; +% if ($Group->Domain eq 'UserDefined') { +
  • <% $Group->Name %>
  • +% } elsif ($Group->Domain eq 'SystemInternal') { +
  • <% loc($Group->Type) %>
  • +% } +% } +
+<%INIT> +my $GroupMembers = RT::GroupMembers->new($session{'CurrentUser'}); +$GroupMembers->Limit( FIELD => 'MemberId', VALUE => $UserObj->Id ); +my $alias = $GroupMembers->Join( + TYPE => 'left', + ALIAS1 => 'main', + FIELD1 => 'GroupId', + TABLE2 => 'Groups', + FIELD2 => 'id' +); +$GroupMembers->Limit( + ALIAS => $alias, + FIELD => 'Domain', + OPERATOR => '=', + VALUE => 'SystemInternal', +); +$GroupMembers->Limit( + ALIAS => $alias, + FIELD => 'Domain', + OPERATOR => '=', + VALUE => 'UserDefined', +); +$GroupMembers->OrderByCols( + { ALIAS => $alias, FIELD => 'Domain' }, + { ALIAS => $alias, FIELD => 'Name' }, +); + +<%ARGS> +$UserObj + diff --git a/rt/share/html/Elements/ShowSearch b/rt/share/html/Elements/ShowSearch new file mode 100644 index 000000000..a7fc54566 --- /dev/null +++ b/rt/share/html/Elements/ShowSearch @@ -0,0 +1,151 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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, + hideable => $hideable &> +<& $query_display_component, hideable => $hideable, %$ProcessedSearchArg, ShowNavigation => 0, Class => 'RT::Tickets' &> + +<%init> +my $search; +my $user = $session{'CurrentUser'}->UserObj; +my $SearchArg; +my $customize; +my $query_display_component = '/Elements/CollectionList'; +my $query_link_url = RT->Config->Get('WebPath').'/Search/Results.html'; + +if ($SavedSearch) { + my ( $container_object, $search_id ) = _parse_saved_search($SavedSearch); + unless ( $container_object ) { + $m->out(loc("Either you have no rights to view saved search [_1] or identifier is incorrect", $SavedSearch)); + return; + } + $search = $container_object->Attributes->WithId($search_id); + unless ( $search->Id && ref( $SearchArg = $search->Content ) eq 'HASH' ) { + $m->out(loc("Saved Search [_1] not found", $SavedSearch)) unless $IgnoreMissing; + 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 = RT->Config->Get('WebURL') . "/Search/$SearchArg->{SearchType}.html"; + } elsif ($ShowCustomize) { + $customize = RT->Config->Get('WebPath') . '/Search/Build.html?' + . $m->comp( '/Elements/QueryString', + SavedSearchLoad => $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 ); + if ($ShowCustomize) { + $customize = RT->Config->Get('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->callback( + %ARGS, + CallbackName => 'ModifySearch', + OriginalSearch => $SearchArg, + Search => $ProcessedSearchArg, +); + +foreach ( $SearchArg, $ProcessedSearchArg ) { + $_->{'Format'} ||= ''; + + $_->{'Format'} =~ s/__(Web(?:Path|Base|BaseURL))__/scalar RT->Config->Get($1)/ge; + # extract-message-catalog would "$1", so we avoid quotes for loc calls + $_->{'Format'} =~ s/__loc\(["']?(\w+)["']?\)__/my $f = "$1"; loc($f)/ge; + if ( $_->{'Query'} =~ /__Bookmarked__/ ) { + $_->{'Rows'} = 999; + } + elsif ( $_->{'Query'} =~ /__Bookmarks__/ ) { + $_->{'Rows'} = 999; + + # DEPRECATED: will be here for a while up to 3.10/4.0 + my $bookmarks = $session{'CurrentUser'}->UserObj->FirstAttribute('Bookmarks'); + $bookmarks = $bookmarks->Content if $bookmarks; + $bookmarks ||= {}; + my $query = join(" OR ", map " id = '$_' ", grep $bookmarks->{ $_ }, keys %$bookmarks ) || 'id=0'; + $_->{'Query'} =~ s/__Bookmarks__/( $query )/g; + } +} + +my $QueryString = '?' . $m->comp( '/Elements/QueryString', %$SearchArg ); + + +<%ARGS> +$Name => undef +$SavedSearch => undef +%Override => () +$IgnoreMissing => undef +$hideable => 1 +$ShowCustomize => 1 + diff --git a/rt/share/html/Elements/ShowUser b/rt/share/html/Elements/ShowUser new file mode 100644 index 000000000..2fbdcbc3e --- /dev/null +++ b/rt/share/html/Elements/ShowUser @@ -0,0 +1,69 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +%# Released under the terms of version 2 of the GNU Public License +<%INIT> +# $User is an RT::User object +# $Address is Email::Address object +if ( !$User && $Address ) { + $User = RT::User->new( $session{'CurrentUser'} ); + $User->LoadByEmail( $Address->address ); + unless ( $User->Id ) { + $m->comp( '/Elements/ShowUserVerbose', Address => $Address ); + return; + } +} +if ( $style eq 'concise' ) { + $m->comp( '/Elements/ShowUserConcise', User => $User ); +} +else { $m->comp( '/Elements/ShowUserVerbose', User => $User ); } + +<%ARGS> +$User => undef +$Address => undef +$style => RT->Config->Get('UsernameFormat', $session{'CurrentUser'}) + diff --git a/rt/share/html/Elements/ShowUserConcise b/rt/share/html/Elements/ShowUserConcise new file mode 100644 index 000000000..3cdba10dd --- /dev/null +++ b/rt/share/html/Elements/ShowUserConcise @@ -0,0 +1,52 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +%# Released under the terms of version 2 of the GNU Public License +<% $User->RealName || $User->Name %>\ +<%ARGS> +$User + diff --git a/rt/share/html/Elements/ShowUserEmailFrequency b/rt/share/html/Elements/ShowUserEmailFrequency new file mode 100644 index 000000000..b7654944b --- /dev/null +++ b/rt/share/html/Elements/ShowUserEmailFrequency @@ -0,0 +1,56 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +(<% loc($frequency) %>) +<%INIT> +my $frequency = $User->EmailFrequency( Ticket => $Ticket ); +return unless $frequency; + +<%ARGS> +$User +$Ticket => undef + diff --git a/rt/share/html/Elements/ShowUserVerbose b/rt/share/html/Elements/ShowUserVerbose new file mode 100644 index 000000000..82d65b0b3 --- /dev/null +++ b/rt/share/html/Elements/ShowUserVerbose @@ -0,0 +1,73 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +%# Released under the terms of version 2 of the GNU Public License +<%$Address->format%>\ +<%INIT> +my ($phrase, $address, $comment); + +if ($User) { + $address = $User->EmailAddress; + $phrase = $User->RealName + if $User->RealName && lc $User->RealName ne lc $address; + $comment = $User->Name if lc $User->Name ne lc $address; + $comment = "($comment)" if defined $comment and length $comment; + $Address = Email::Address->new( $phrase, $address, $comment ); +} + +$Address->comment('') if $comment && lc $Address->user eq lc $comment; +if ( $phrase and my ( $l, $r ) = ( $phrase =~ /^(\w+) (\w+)$/ ) ) { + $Address->phrase('') + if $Address->user =~ /^\Q$l\E.\Q$r\E$/ + || $Address->user =~ /^\Q$r\E.\Q$l\E$/; +} + + +<%ARGS> +$User => undef +$Address => undef + diff --git a/rt/share/html/Elements/SimpleSearch b/rt/share/html/Elements/SimpleSearch new file mode 100755 index 000000000..16b55fcee --- /dev/null +++ b/rt/share/html/Elements/SimpleSearch @@ -0,0 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$SendTo => '/Search/Simple.html' + diff --git a/rt/share/html/Elements/Submit b/rt/share/html/Elements/Submit new file mode 100755 index 000000000..79d87a6c8 --- /dev/null +++ b/rt/share/html/Elements/Submit @@ -0,0 +1,103 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 ($CheckAll) { + +% } +% if ($ClearAll) { + +% } +% if ($Reset) { + +% } +
+
+% if ( $Back ) { + <%$BackCaption%> + <% + $BackName ? qq[ name="$BackName"] : '' | n %> value="<%$BackLabel%>" class="button" /> +% } + +% if ($AlternateLabel) { + <%$AlternateCaption%> + <% $Name ? qq[ name="$Name"] : '' | n %> value="<%$AlternateLabel%>" class="button" /> +% } else { + <%$Caption%> + <% $Name ? qq[ name="$Name"] : '' | n %> value="<%$Label%>" class="button" /> +% } +
+
+
+ +<%ARGS> +$color => undef +$Caption => '' +$AlternateCaption => undef +$AlternateLabel => undef +$Label => loc('Submit') +$Name => undef +$CheckAll => undef +$CheckAllLabel => loc('Check All') +$ClearAll => undef +$ClearAllLabel => loc('Clear All') +$CheckboxName => '' +$Back => undef +$BackName => 'Back' +$BackLabel => loc('Back') +$BackCaption => '' +$BackOnClick => undef +$OnClick => undef +$Reset => undef +$ResetLabel => loc('Reset') +$id => undef + diff --git a/rt/share/html/Elements/Tabs b/rt/share/html/Elements/Tabs new file mode 100755 index 000000000..0e0ab978d --- /dev/null +++ b/rt/share/html/Elements/Tabs @@ -0,0 +1,128 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/PageLayout, + current_toptab => $current_toptab, + current_tab => $current_tab, + toptabs => $toptabs, + topactions => $topactions, + tabs => $tabs, + actions => $actions, + subactions => $subactions, + title => $Title, + show_menu => $show_menu, +&> + +<%INIT> +my $action; +my $basetopactions = { + A => { html => $m->scomp('/Elements/CreateTicket') + }, + B => { html => $m->scomp('/Elements/SimpleSearch') + } + }; +my $basetabs = { A => { title => loc('Homepage'), + path => 'index.html', + }, + Ab => { title => loc('Simple Search'), + path => 'Search/Simple.html' + }, + B => { title => loc('Tickets'), + path => 'Search/Build.html' + }, + C => { title => loc('Tools'), + path => 'Tools/index.html' + }, + }; + +if ($session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', + Object => $RT::System )) { + $basetabs->{E} = { title => loc('Configuration'), + path => 'Admin/', + }; +} + +if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', + Object => $RT::System )) { + $basetabs->{K} = { title => loc('Preferences'), + path => 'Prefs/Other.html' + }; +} + +if ($session{'CurrentUser'}->HasRight( Right => 'ShowApprovalsTab', + Object => $RT::System )) { + $basetabs->{P} = { title => loc('Approval'), + path => 'Approvals/' + }; +} + +if (!defined $toptabs) { + $toptabs = $basetabs; +} +if (!defined $topactions) { + $topactions = $basetopactions; +} + +# Now let callbacks add their extra tabs +$m->callback( + topactions => $topactions, + toptabs => $toptabs, + %ARGS +); + + +<%ARGS> +$current_toptab => undef +$current_tab => undef +$toptabs => undef +$topactions => undef +$tabs => undef +$actions => undef +$subactions => undef +$Title => undef +$show_menu => 1 + diff --git a/rt/share/html/Elements/TicketList b/rt/share/html/Elements/TicketList new file mode 100644 index 000000000..059ad7be0 --- /dev/null +++ b/rt/share/html/Elements/TicketList @@ -0,0 +1,70 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$m->comp( + '/Elements/CollectionList', + %ARGS, + Class => 'RT::Tickets' + ); + +<%ARGS> +$Collection => undef +$Query => undef +$Format => RT->Config->Get('DefaultSearchResultFormat') +$DisplayFormat => undef +$Order => undef +$OrderBy => undef +$Rows => 50 +$Page => 1 +$Title => loc('Ticket Search') +$BaseURL => undef +$AllowSorting => undef +$ShowNavigation => 1 +$ShowHeader => 1 +$ShowEmpty => 0 + diff --git a/rt/share/html/Elements/TitleBox b/rt/share/html/Elements/TitleBox new file mode 100644 index 000000000..1efb45a80 --- /dev/null +++ b/rt/share/html/Elements/TitleBox @@ -0,0 +1,51 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +# For compatibility with 3.4 +$m->comp('/Widgets/TitleBox', %ARGS ); + diff --git a/rt/share/html/Elements/TitleBoxEnd b/rt/share/html/Elements/TitleBoxEnd new file mode 100644 index 000000000..1c10a866c --- /dev/null +++ b/rt/share/html/Elements/TitleBoxEnd @@ -0,0 +1,51 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +# For compatibility with 3.4 +$m->comp('/Widgets/TitleBoxEnd', %ARGS ); + diff --git a/rt/share/html/Elements/TitleBoxStart b/rt/share/html/Elements/TitleBoxStart new file mode 100644 index 000000000..65e750348 --- /dev/null +++ b/rt/share/html/Elements/TitleBoxStart @@ -0,0 +1,51 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +# For compatibility with 3.4 +$m->comp('/Widgets/TitleBoxStart', %ARGS ); + diff --git a/rt/share/html/Elements/ValidateCustomFields b/rt/share/html/Elements/ValidateCustomFields new file mode 100644 index 000000000..0253e1cbc --- /dev/null +++ b/rt/share/html/Elements/ValidateCustomFields @@ -0,0 +1,100 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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, @res) = (1, ()); +$CustomFields->GotoFirstItem; +while ( my $CF = $CustomFields->Next ) { + 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); + + my @values = (); + if ( ref $value eq 'ARRAY' ) { + @values = @$value; + } elsif ( $CF->Type =~ /text/i ) { + @values = ($value); + } else { + @values = split /\r*\n/, ( defined $value ? $value : ''); + } + @values = grep $_ ne '', + map { + s/\r+\n/\n/g; + s/^\s+//; + s/\s+$//; + $_; + } + grep defined, @values; + @values = ('') unless @values; + + foreach my $value( @values ) { + next if $CF->MatchPattern($value); + + my $msg = loc("Input must match [_1]", $CF->FriendlyPattern); + $m->notes( ('InvalidField-' . $CF->Id) => $msg ); + push @res, $msg; + $valid = 0; + } +} +$m->notes('ValidFields', $valid); +return wantarray? ($valid, @res): $valid; + +<%ARGS> +$CustomFields +$ARGSRef +$NamePrefix => "Object-RT::Ticket--CustomField-" + diff --git a/rt/share/html/Helpers/Autocomplete/CustomFieldValues b/rt/share/html/Helpers/Autocomplete/CustomFieldValues new file mode 100644 index 000000000..c7630c96a --- /dev/null +++ b/rt/share/html/Helpers/Autocomplete/CustomFieldValues @@ -0,0 +1,81 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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( my $value = $values->Next ) { +% my $desc = $value->Description || ''; +% $desc = ' ('. $m->interp->apply_escapes( $desc, 'h' ) .')' if $desc; +
  • <% $value->Name %><% $desc |n %>
  • +% } +
+% $m->abort; +<%INIT> +my ($CustomField, $Value); +while( my($k, $v) = each %ARGS ) { + next unless $k =~ /^Object-.*?-\d*-CustomField-(\d+)-Values?$/; + ($CustomField, $Value) = ($1, $v); + last; +} +$m->abort unless $CustomField; +my $CustomFieldObj = RT::CustomField->new( $session{'CurrentUser'} ); +$CustomFieldObj->Load( $CustomField ); +my $values = $CustomFieldObj->Values; +$values->Limit( + FIELD => 'Name', + OPERATOR => 'LIKE', + VALUE => $Value, + SUBCLAUSE => 'autcomplete', +); +$values->Limit( + ENTRYAGGREGATOR => 'OR', + FIELD => 'Description', + OPERATOR => 'LIKE', + VALUE => $Value, + SUBCLAUSE => 'autcomplete', +); + + diff --git a/rt/share/html/Helpers/CalPopup.html b/rt/share/html/Helpers/CalPopup.html new file mode 100644 index 000000000..96e8d77d0 --- /dev/null +++ b/rt/share/html/Helpers/CalPopup.html @@ -0,0 +1,133 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 +
+
+ +<&|/l&>Close window + +
+ + + +% foreach my $wday (@weekdays) { + +% } + +% foreach my $week (@cal) { + +% foreach my $day (@{$week}) { + +% } #foreach $day + +% } # foreach $week +
+ + <% $months[$DisplayedMonth-1] %> <% $DisplayedYear %> + +
<%$wday%>
+% if ($day) { +% my $datestr = sprintf('%04d-%02d-%02d', $DisplayedYear, $DisplayedMonth, $day); +% my $class; +% if ( ( $DisplayedYear == $today[5] + 1900 ) && ( $DisplayedMonth == $today[4] + 1 ) && ( $day == $today[3] ) ) { +% $class = 'today'; +% } + href="#" onclick="updateParentField('<% $field %>','<% $datestr %>'); return false;"><% $day %> +% } else { +   +% } +
+
+
+ + +% $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); + + +<%args> +$field => 'none' +$DisplayedMonth => undef +$DisplayedYear => undef + diff --git a/rt/share/html/Helpers/Toggle/TicketBookmark b/rt/share/html/Helpers/Toggle/TicketBookmark new file mode 100644 index 000000000..45fe70883 --- /dev/null +++ b/rt/share/html/Helpers/Toggle/TicketBookmark @@ -0,0 +1,54 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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> +$id + +<%INIT> +$m->comp('/Ticket/Elements/Bookmark', id => $id, Toggle => 1); +$m->abort(); + diff --git a/rt/share/html/Install/Basics.html b/rt/share/html/Install/Basics.html new file mode 100644 index 000000000..7345c4799 --- /dev/null +++ b/rt/share/html/Install/Basics.html @@ -0,0 +1,104 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Wrapper, Title => loc('Step [_1] of [_2]', 3, 7) .': '. loc('Customize Basics') &> + +<& Elements/Errors, Errors => \@errors &> + +

+<&|/l&>These configuration options cover some of the basics needed to get RT up and running. We need to know the name of your RT installation and the domain name where RT will live. You will also need to set a password for your default administrative user. +

+ +
+<& /Widgets/BulkEdit, Types => \@Types,Meta => $RT::Installer->{Meta}, + CurrentValue => RT::Installer->CurrentValues(@Types) &> + + +<& /Elements/Submit, + Label => loc('Next') .': '. loc('Customize Email Configuration'), + Back => 1, BackLabel => loc('Back') .': '. loc('Check Database Credentials'), +&> +
+ + + +<%init> +my @errors; + +my @Types = qw/rtname WebDomain WebPort Password/; + +if ( $Run ) { + + $m->comp('/Widgets/BulkProcess', Types => \@Types, Arguments => \%ARGS, + Store => $RT::Installer->{InstallConfig}, + Meta => $RT::Installer->{Meta} ); + + if ( $ARGS{WebPort} && $ARGS{WebPort} !~ /^\d+$/ ) { + push @errors, loc("Invalid [_1]: it should be a number", 'WebPort'); + } + + unless ( $ARGS{Password} ) { + push @errors, loc("You must enter an Administrative password"); + } + + if ( $Back ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/DatabaseDetails.html'); + } + + unless ( @errors ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Sendmail.html'); + } +} + + + +<%args> +$Run => undef +$Back => undef + diff --git a/rt/share/html/Install/DatabaseDetails.html b/rt/share/html/Install/DatabaseDetails.html new file mode 100644 index 000000000..e690eab4a --- /dev/null +++ b/rt/share/html/Install/DatabaseDetails.html @@ -0,0 +1,201 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Wrapper, Title => loc('Step [_1] of [_2]', 2, 7 ) .': '. loc('Check Database Credentials') &> + +% if ( @errors ) { +<& Elements/Errors, Errors => \@errors &> +

+<&|/l&>Tell us a little about how to find the database RT will be using +

+<&|/l&>We need to know the name of the database RT will use and where to find it. We also need to know the username and password of the user RT should use. RT can create the database and user for you, which is why we ask for the username and password of a user with DBA privileges. During step 6 of the installation process we will use this information to create and initialize RT's database. +

+

+<&|/l&>When you click on 'Check Database Connectivity' there may be a small delay while RT tries to connect to your database + +% } elsif ( @results ) { +<& /Elements/ListActions, actions => \@results &> + +

+<&|/l&>We are able to find your database and connect as the DBA. You can click on 'Customize Basics' to continue customizing RT. + +% } + +

+ +% if ( @results && !@errors ) { +<& /Elements/Submit, + Label => loc('Next') .': '. loc('Customize Basics'), + Back => 1, BackLabel => loc('Back') .': '. loc('Select Database Type'), + Name => 'Next', +&> +% } else { +<& /Widgets/BulkEdit, Types => \@Types, Meta => $RT::Installer->{Meta}, + CurrentValue => { %{RT::Installer->CurrentValues(@Types)}, + DatabaseAdmin => + RT::Installer->CurrentValue( 'DatabaseAdmin' ) || + $RT::Installer->{InstallConfig}{DatabaseAdmin} || + ( $db_type eq 'mysql' ? 'root' + : $db_type eq 'Pg' ? 'postgres' + : '' ), + } + &> +<& /Elements/Submit, + Label => loc('Check Database Connectivity'), + Back => 1, BackLabel => loc('Back') .': '. loc('Choose Database Engine'), +&> +% } + +
+ + +<%init> +my (@results, @errors); +my $ConnectionSucceeded; + +my @Types = 'DatabaseName'; + +my $db_type = $RT::Installer->{InstallConfig}{DatabaseType}; + +unless ( $db_type eq 'SQLite' ) { + push @Types, 'DatabaseHost', 'DatabasePort', 'DatabaseAdmin', + 'DatabaseAdminPassword', 'DatabaseUser', 'DatabasePassword'; +} +if ( $db_type eq 'Pg' ) { + push @Types, 'DatabaseRequireSSL'; +} + + +if ( $Run ) { + + if ( $Back ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/DatabaseType.html'); + } + + if ( $ARGS{Next} ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Basics.html'); + } + + $m->comp('/Widgets/BulkProcess', Types => \@Types, Arguments => \%ARGS, + Store => $RT::Installer->{InstallConfig}, + Meta => $RT::Installer->{Meta}, KeepUndef => 1 ); + + + my ( $status, $msg ) = RT::Installer->SaveConfig; + if ( $status ) { + delete $INC{'RT_SiteConfig.pm'}; + RT->LoadConfig; + RT::Handle->FinalizeDatabaseType(); + # dba connect systemdsn + my $dbh = DBI->connect( + RT::Handle->SystemDSN, $ARGS{DatabaseAdmin}, $ARGS{DatabaseAdminPassword}, { RaiseError => 0, PrintError => 0 }, + ); + + if ( $dbh ) { + push @results, loc('Connection succeeded'); + # dba connect dsn, which has table info + $dbh = DBI->connect( + RT::Handle->DSN, $ARGS{DatabaseAdmin}, $ARGS{DatabaseAdminPassword}, { RaiseError => 0, PrintError => 0 }, + ); + + if ( $dbh ) { + # check if table Users exists + eval { + my $dbh = DBI->connect( + RT::Handle->DSN, + $ARGS{DatabaseAdmin}, + $ARGS{DatabaseAdminPassword}, + { RaiseError => 1, PrintError => 0 }, + ); + + my $sth = $dbh->prepare('select * from Users'); + }; + + unless ( $@ ) { + + my $sth = $dbh->prepare('select id from Users where Name=?'); + $sth->execute('RT_System'); + if ( $sth->fetchrow_array ) { + $RT::Installer->{DatabaseAction} = 'none'; + push @results, loc("[_1] appears to be fully initialized. We won't need to create any tables or insert metadata, but you can continue to customize RT by clicking 'Customize Basics' below", $RT::DatabaseName); + } + else { + $RT::Installer->{DatabaseAction} = 'acl,coredata,insert'; + push @results, loc("[_1] already exists and has RT's tables in place, but does not contain RT's metadata. The 'Initialize Database' step later on can insert metadata into this existing database. If this is acceptable, click 'Customize Basics' below to continue customizing RT.", $RT::DatabaseName); + } + } + else { + $RT::Installer->{DatabaseAction} = 'schema,acl,coredata,insert'; + push @results, loc("[_1] already exists, but does not contain RT's tables or metadata. The 'Initialize Database' step later on can insert tables and metadata into this existing database. if this is acceptable, click 'Customize Basic' below to continue customizing RT.", $RT::DatabaseName ); + } + + } + else { + $RT::Installer->{DatabaseAction} = + 'create,schema,acl,coredata,insert'; + } + } + else { + $RT::Installer->{DatabaseAction} = 'error'; + push @errors, loc("Failed to connect to database: [_1]", + $DBI::errstr ); + } + } + else { + push @results, loc($msg); + } + +} + + + +<%args> +$Run => undef +$Back => undef + diff --git a/rt/share/html/Install/DatabaseType.html b/rt/share/html/Install/DatabaseType.html new file mode 100644 index 000000000..c236dcb17 --- /dev/null +++ b/rt/share/html/Install/DatabaseType.html @@ -0,0 +1,90 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Wrapper, Title => loc('Step [_1] of [_2]', 1, 7 ) .': '. loc('Choose Database Engine') &> + +
+

+<&|/l&>RT works with a number of different databases. MySQL, PostgreSQL, Oracle and SQLite are all supported. +

+

+<&|/l&>You should choose the database you or your local database administrator is most comfortable with. +

+

+<&|/l&>SQLite is a database that doesn't need a server or any configuration whatsoever. RT's authors recommend it for testing, demoing and development, but it's not quite right for a high-volume production RT server. +

+

+<&|/l, 'CPAN' &>If your preferred database isn't listed in the dropdown below, that means RT couldn't find a database driver for it installed locally. You may be able to remedy this by using [_1] to download and install DBD::MySQL, DBD::Oracle or DBD::Pg. +

+
+ +
+<& /Widgets/BulkEdit, Types => \@Types, Meta => $RT::Installer->{Meta}, + CurrentValue => RT::Installer->CurrentValues(@Types) &> + + +<& /Elements/Submit, Label => loc('Next') .': '. loc( 'Check Database Credentials') &> +
+ +<%init> + +my @Types = 'DatabaseType'; + +if ( $Run ) { + + $m->comp('/Widgets/BulkProcess', Types => \@Types, Arguments => \%ARGS, Meta + => $RT::Installer->{Meta}, Store => $RT::Installer->{InstallConfig} ); + + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'Install/DatabaseDetails.html'); +} + + + + +<%args> +$Run => undef + diff --git a/rt/share/html/Install/Elements/Errors b/rt/share/html/Install/Elements/Errors new file mode 100644 index 000000000..d37768946 --- /dev/null +++ b/rt/share/html/Install/Elements/Errors @@ -0,0 +1,63 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 (@Errors) { +<&| "/Widgets/TitleBox", title => loc('Error'), hideable => 0, class => 'error' &> +
    +% for my $Error ( @Errors ) { +
  • +<% $Error %> +
  • +% } +
+ + +% } + +<%args> +@Errors + diff --git a/rt/share/html/Install/Elements/Wrapper b/rt/share/html/Install/Elements/Wrapper new file mode 100644 index 000000000..f3da5fa70 --- /dev/null +++ b/rt/share/html/Install/Elements/Wrapper @@ -0,0 +1,66 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/PageLayout, + title => $Title, + toptabs => { a => { title => loc('Install RT'), + path => 'Install/' + }, + b => { title => loc('Buy Support'), + path => 'mailto:sales@bestpractical.com'} + }, + + show_menu => 1 +&> + +<% $m->content() |n%> +<& /Elements/Footer &> +% $m->abort; +<%args> +$Title => 'Install RT' + diff --git a/rt/share/html/Install/Finish.html b/rt/share/html/Install/Finish.html new file mode 100644 index 000000000..2ce97c42a --- /dev/null +++ b/rt/share/html/Install/Finish.html @@ -0,0 +1,95 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Wrapper, Title => loc('Step [_1] of [_2]', 7, 7) .': '. loc('Finish') &> + +
+

+<&|/l&>Click "Finish Installation" below to complete this wizard. +

+ +

+<&|/l&>You should be taken directly to a login page. You'll be able to log in with username of root and the password you set earlier. +

+ +

+<&|/l&>If you've change the Port that RT runs on, you'll need to restart the server in order to log in. +

+ +

+<&|/l, RT::Installer->ConfigFile &>The settings you've chosen are stored in [_1]. +

+
+ +
+ +<& /Elements/Submit, Label => 'Finish Installation' &> +
+ + +<%init> +if ( $Run ) { + RT->InstallMode(0); + RT->ConnectToDatabase(); + RT->InitSystemObjects(); + RT->InitClasses(); + RT->InitPlugins(); + + system( 'chmod -w ' . RT::Installer->ConfigFile ) && + $RT::Logger->error( + 'failed to make ' . RT::Installer->ConfigFile . ' readonly' ); + my $root = RT::User->new( $RT::SystemUser ); + $root->Load('root'); + $root->SetPassword( $RT::Installer->{InstallConfig}{Password} ); + + RT::Interface::Web::Redirect(RT->Config->Get('WebURL')); +} + + +<%args> +$Run => undef + diff --git a/rt/share/html/Install/Global.html b/rt/share/html/Install/Global.html new file mode 100644 index 000000000..649fd237d --- /dev/null +++ b/rt/share/html/Install/Global.html @@ -0,0 +1,121 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Wrapper, Title => loc('Step [_1] of [_2]', 5, 7 ) .': '. loc('Customize Email Addresses') &> + +<& Elements/Errors, Errors => \@errors &> + +

<&|/l&>Help us set up some useful defaults for RT.

+ +

<&|/l&>When RT sends an email it sets the From: and Reply-To: headers so users can add to the conversation by just hitting Reply in their mail client. It uses different addresses for Replies and Comments. These can be changed for each of your queues. These addresses will need to be configured to use the rt-mailgate program.

+ +

<&|/l&>By default, RT will use the timezone of your system. This lets you set a global default for the display of dates and times in RT. Your users can choose a different Timezone in their preferences.

+
+<& /Widgets/BulkEdit, Types => \@Types,Meta => $RT::Installer->{Meta}, + CurrentValue => RT::Installer->CurrentValues(@Types) +&> + + +<& /Elements/Submit, + Label => $RT::Installer->{DatabaseAction} eq 'none' ? + loc('Next') .': '. loc('Finish') : loc('Next') .': '. loc('Initialize Database'), + Back => 1, BackLabel => loc('Back') .': '. loc('Customize Email Configuration'), +&> +
+ +<%init> +my @errors; + +my @Types = qw/CommentAddress CorrespondAddress Timezone/; + +if ( $Run ) { + + $m->comp('/Widgets/BulkProcess', Types => \@Types, Arguments => \%ARGS, + Store => $RT::Installer->{InstallConfig}, + Meta => $RT::Installer->{Meta}, KeepUndef => 1 ); + + if ( $Back ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Sendmail.html'); + } + + for ( qw/CommentAddress CorrespondAddress/ ) { + if ( $ARGS{$_} && $ARGS{$_} !~ /.+@.+/ ) { + push @errors, + loc("Invalid [_1]: '[_2]' doesn't look like an email address", + $_, $ARGS{$_}); + } + } + + unless ( @errors ) { + my ( $status, $msg ) = RT::Installer->SaveConfig; + + if ( $status ) { + delete $INC{'RT_SiteConfig.pm'}; + RT->LoadConfig; + + if ( $RT::Installer->{DatabaseAction} ne 'none' ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Initialize.html'); + } + else { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Finish.html'); + } + } + else { + push @errors, loc($msg); + } + } +} + + + +<%args> +$Run => undef +$Back => undef + diff --git a/rt/share/html/Install/Initialize.html b/rt/share/html/Install/Initialize.html new file mode 100644 index 000000000..e1237c3de --- /dev/null +++ b/rt/share/html/Install/Initialize.html @@ -0,0 +1,142 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Wrapper, Title => loc('Step [_1] of [_2]', 6, 7) .': '. loc('Initialize Database') &> + +<& Elements/Errors, Errors => \@errors &> + +% unless ( @errors ) { +
+<&|/l&>Click "Initialize Database" to create RT's database and insert initial metadata. This may take a few moments +
+% } + +
+ +<& /Elements/Submit, + Label => loc('Initialize Database'), + Back => 1, BackLabel => loc('Back') .': '. loc('Customize Email Addresses'), +&> +
+ +<%init> +my @errors; +if ( $Run ) { + if ( $Back ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Global.html'); + } + + my @actions = split /,/, $RT::Installer->{DatabaseAction}; + + my $sysdbh = DBI->connect( + RT::Handle->SystemDSN, + $RT::Installer->{InstallConfig}{DatabaseAdmin}, + $RT::Installer->{InstallConfig}{DatabaseAdminPassword}, + { RaiseError => 0, PrintError => 0 }, + ); + die $DBI::errstr unless $sysdbh; + + my ( $status, $msg ) = ( 1, '' ); + + if ( $actions[0] eq 'create' ) { + ($status, $msg) = RT::Handle->CreateDatabase( $sysdbh ); + unless ( $status ) { + push @errors, loc('ERROR: [_1]', $msg ); + } + + shift @actions; # shift the 'create' action since its job is done. + } + + if ( $status ) { + + my $dbh = DBI->connect( + RT::Handle->DSN, $RT::Installer->{InstallConfig}{DatabaseAdmin}, + $RT::Installer->{InstallConfig}{DatabaseAdminPassword}, + { RaiseError => 0, PrintError => 0 }, + ); + die $DBI::errstr unless $dbh; + + foreach my $action ( @actions ) { + ($status, $msg) = (1, ''); + if ( $action eq 'schema' ) { + ($status, $msg) = RT::Handle->InsertSchema( $dbh ); + } + elsif ( $action eq 'acl' ) { + ($status, $msg) = RT::Handle->InsertACL( $dbh ); + } + elsif ( $action eq 'coredata' ) { + $RT::Handle = new RT::Handle; + $RT::Handle->dbh( undef ); + RT::ConnectToDatabase(); + RT::InitLogging(); + ($status, $msg) = $RT::Handle->InsertInitialData; + } + elsif ( $action eq 'insert' ) { + $RT::Handle = new RT::Handle; + RT::Init(); + my $file = $RT::EtcPath . "/initialdata"; + ($status, $msg) = $RT::Handle->InsertData( $file ); + } + unless ( $status ) { + push @errors, loc('ERROR: [_1]', $msg); + last; + } + } + } + + unless ( @errors ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Finish.html'); + } +} + +<%args> +$Run => undef +$Back => undef + + diff --git a/rt/share/html/Install/Sendmail.html b/rt/share/html/Install/Sendmail.html new file mode 100644 index 000000000..ae5857cac --- /dev/null +++ b/rt/share/html/Install/Sendmail.html @@ -0,0 +1,107 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Wrapper, Title => loc('Step [_1] of [_2]', 4, 7 ) .': '. loc('Customize Email Configuration') &> + +<& Elements/Errors, Errors => \@errors &> + +

+<&|/l&>RT can communicate with your users about new tickets or new correspondence on tickets. Tell us where to find sendmail (or a sendmail compatible binary such as the one provided by postifx). RT also needs to know who to notify when someone sends invalid email. This must not be an address that feeds back into RT. +

+ +
+<& /Widgets/BulkEdit, Types => \@Types,Meta => $RT::Installer->{Meta}, + CurrentValue => RT::Installer->CurrentValues(@Types) +&> + + +<& /Elements/Submit, + Label => loc('Next') .': '. loc('Customize Email Addresses'), + Back => 1, BackLabel => loc('Back' ) .': '. loc('Customize Basics'), +&> +
+ +<%init> +my @errors; + +my @Types = qw/SendmailPath OwnerEmail/; + +if ( $Run ) { + + $m->comp('/Widgets/BulkProcess', Types => \@Types, Arguments => \%ARGS, + Store => $RT::Installer->{InstallConfig}, + Meta => $RT::Installer->{Meta}, KeepUndef => 1); + + if ( $Back ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Basics.html'); + } + + + unless ( -e $ARGS{SendmailPath} ) { + push @errors, loc( "[_1] doesn't exist.", $ARGS{SendmailPath} ); + } + + if ( ! $ARGS{OwnerEmail} || $ARGS{OwnerEmail} !~ /.+@.+/ ) { + push @errors, + loc("Invalid [_1]: '[_2]' doesn't look like an email address", + 'Administrator Email', $ARGS{OwnerEmail} ); + } + + + unless ( @errors ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . +'Install/Global.html'); + } +} + + + +<%args> +$Run => undef +$Back => undef + diff --git a/rt/share/html/Install/autohandler b/rt/share/html/Install/autohandler new file mode 100644 index 000000000..0db00a530 --- /dev/null +++ b/rt/share/html/Install/autohandler @@ -0,0 +1,67 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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 }}} +<%flags> +inherit => undef + + +<%init> + +if (RT->InstallMode) { + $r->content_type("text/html; charset=utf-8"); + require RT::Installer; + + $RT::Installer->{'CurrentUser'} = RT::CurrentUser->new(); + $RT::Installer->{Meta} = RT::Installer->Meta; + $m->call_next; +} +else { + # redirect to login page if not in install mode + RT::Interface::Web::Redirect(RT->Config->Get('WebURL')) +} + + diff --git a/rt/share/html/Install/index.html b/rt/share/html/Install/index.html new file mode 100644 index 000000000..afe933615 --- /dev/null +++ b/rt/share/html/Install/index.html @@ -0,0 +1,142 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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/Wrapper, Title => loc('Welcome to RT!') &> + +<& Elements/Errors, Errors => \@errors &> + +% return if $locked; + +
+ +

<% loc('Language') %>

+ +
+<&|/l&>Select another language: +<& /Elements/SelectLang, + Name => 'Lang', + Default => $lang_handle? $lang_handle->language_tag : undef, +&> + +
+ +

<% loc('What is RT?') %>

+ +
+

+<&|/l&>RT is an enterprise-grade issue tracking system designed to let you intelligently and efficiently manage tasks, issues, requests, defects or anything else that looks like an "action item." +

+

+<&|/l&>RT is used by Fortune 100 companies, one-person businesses, government agencies, educational institutions, hospitals, nonprofits, NGOs, libraries, open source projects and all sorts of other organizations on all seven continents. (Yes, even Antarctica.) +

+

<% loc('Getting started') %>

+

+ +<&|/l&>You're seeing this screen because you started up an RT server without a working database. Most likely, this is the first time you're running RT. If you click Let's go! below, RT will guide you through setting up your RT server and database. + +

+

+<&|/l&>If you already have a working RT server and database, you should take this opportunity to make sure that your database server is running and that the RT server can connect to it. Once you've done that, stop and start the RT server.

+
+ +<& /Elements/Submit, Label => loc( "Let's go!"), Name => 'Run' &> +
+ + +<%init> +my @errors; +my $locked; + +my $file = File::Spec->catfile( $RT::EtcPath, 'RT_SiteConfig.pm' ); + +if ( ! -e $file ) { + # write a blank RT_SiteConfig.pm + open my $fh, '>', $file or die $!; + close $fh; +} +elsif ( ! -w $file ) { + $locked = 1; +} + +if ( $locked ) { + push @errors, loc("Config file [_1] is locked", $file); +} +elsif ( $Run ) { + $RT::Installer->{InstallConfig} ||= {}; + for my $field ( + qw/DatabaseType DatabaseName DatabaseHost DatabasePort + DatabaseUser DatabaseRequireSSL rtname + Organization Timezone CommentAddress CorrespondAddress + SendmailPath WebDomain WebPort/ + ) { + $RT::Installer->{InstallConfig}{$field} ||= RT->Config->Get($field); + } + + for my $field ( qw/OwnerEmail Password DatabasePassword DatabaseAdminPassword/ ) { + # stuff we don't want to keep null + $RT::Installer->{InstallConfig}{$field} = ''; + } + + RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'Install/DatabaseType.html'); +} elsif ( $ChangeLang && $Lang ) { + # hackish, but works + $session{'CurrentUser'} = new RT::CurrentUser; + $session{'CurrentUser'}->LanguageHandle( $Lang ); +} +my $lang_handle = do { local $@; + eval { + ($session{'CurrentUser'} || RT::CurrentUser->new($RT::SystemUser->Id)) + ->LanguageHandle + } +}; + + +<%args> +$Run => 0 +$ChangeLang => undef +$Lang => undef + diff --git a/rt/share/html/NoAuth/Logout.html b/rt/share/html/NoAuth/Logout.html new file mode 100755 index 000000000..5a4926b97 --- /dev/null +++ b/rt/share/html/NoAuth/Logout.html @@ -0,0 +1,79 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Logout'), Refresh => "1;URL=$URL" &> + + + +<& /Elements/Footer, Menu => 0 &> + +% $m->abort(); + +<%INIT> +$m->callback( %ARGS, CallbackName => 'BeforeSessionDelete' ); + +if (defined %session) { + tied(%session)->delete; + $session{'CurrentUser'} = RT::CurrentUser->new; +} + +$m->callback( %ARGS, CallbackName => 'AfterSessionDelete' ); + + +<%ARGS> +$URL => RT->Config->Get('WebPath')."/" + diff --git a/rt/share/html/NoAuth/Reminder.html b/rt/share/html/NoAuth/Reminder.html new file mode 100755 index 000000000..b76d48879 --- /dev/null +++ b/rt/share/html/NoAuth/Reminder.html @@ -0,0 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC +%# +%# +%# (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/licenses/old-licenses/gpl-2.0.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('Password Reminder') &> + +<&|/l&>Not yet implemented. diff --git a/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckcontextmenu.js b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckcontextmenu.js new file mode 100644 index 000000000..56027dc05 --- /dev/null +++ b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckcontextmenu.js @@ -0,0 +1,223 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2009 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * FCKContextMenu Class: renders an control a context menu. + */ + +var FCKContextMenu = function( parentWindow, langDir ) +{ + this.CtrlDisable = false ; + + var oPanel = this._Panel = new FCKPanel( parentWindow ) ; + oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; + oPanel.IsContextMenu = true ; + + // The FCKTools.DisableSelection doesn't seems to work to avoid dragging of the icons in Mozilla + // so we stop the start of the dragging + if ( FCKBrowserInfo.IsGecko ) + oPanel.Document.addEventListener( 'draggesture', function(e) {e.preventDefault(); return false;}, true ) ; + + var oMenuBlock = this._MenuBlock = new FCKMenuBlock() ; + oMenuBlock.Panel = oPanel ; + oMenuBlock.OnClick = FCKTools.CreateEventListener( FCKContextMenu_MenuBlock_OnClick, this ) ; + + this._Redraw = true ; +} + + +FCKContextMenu.prototype.SetMouseClickWindow = function( mouseClickWindow ) +{ + if ( !FCKBrowserInfo.IsIE ) + { + this._Document = mouseClickWindow.document ; + if ( FCKBrowserInfo.IsOpera && !( 'oncontextmenu' in document.createElement('foo') ) ) + { + this._Document.addEventListener( 'mousedown', FCKContextMenu_Document_OnMouseDown, false ) ; + this._Document.addEventListener( 'mouseup', FCKContextMenu_Document_OnMouseUp, false ) ; + } + this._Document.addEventListener( 'contextmenu', FCKContextMenu_Document_OnContextMenu, false ) ; + } +} + +/** + The customData parameter is just a value that will be send to the command that is executed, + so it's possible to reuse the same command for several items just by assigning different data for each one. +*/ +FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) +{ + var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ; + this._Redraw = true ; + return oItem ; +} + +FCKContextMenu.prototype.AddSeparator = function() +{ + this._MenuBlock.AddSeparator() ; + this._Redraw = true ; +} + +FCKContextMenu.prototype.RemoveAllItems = function() +{ + this._MenuBlock.RemoveAllItems() ; + this._Redraw = true ; +} + +FCKContextMenu.prototype.AttachToElement = function( element ) +{ + if ( FCKBrowserInfo.IsIE ) + FCKTools.AddEventListenerEx( element, 'contextmenu', FCKContextMenu_AttachedElement_OnContextMenu, this ) ; + else + element._FCKContextMenu = this ; +} + +function FCKContextMenu_Document_OnContextMenu( e ) +{ + if ( FCKConfig.BrowserContextMenu ) + return true ; + + var el = e.target ; + + while ( el ) + { + if ( el._FCKContextMenu ) + { + if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) ) + return true ; + + FCKTools.CancelEvent( e ) ; + FCKContextMenu_AttachedElement_OnContextMenu( e, el._FCKContextMenu, el ) ; + return false ; + } + el = el.parentNode ; + } + return true ; +} + +var FCKContextMenu_OverrideButton ; + +function FCKContextMenu_Document_OnMouseDown( e ) +{ + if( !e || e.button != 2 ) + return false ; + + if ( FCKConfig.BrowserContextMenu ) + return true ; + + var el = e.target ; + + while ( el ) + { + if ( el._FCKContextMenu ) + { + if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) ) + return true ; + + var overrideButton = FCKContextMenu_OverrideButton ; + if( !overrideButton ) + { + var doc = FCKTools.GetElementDocument( e.target ) ; + overrideButton = FCKContextMenu_OverrideButton = doc.createElement('input') ; + overrideButton.type = 'button' ; + var buttonHolder = doc.createElement('p') ; + doc.body.appendChild( buttonHolder ) ; + buttonHolder.appendChild( overrideButton ) ; + } + + overrideButton.style.cssText = 'position:absolute;top:' + ( e.clientY - 2 ) + + 'px;left:' + ( e.clientX - 2 ) + + 'px;width:5px;height:5px;opacity:0.01' ; + } + el = el.parentNode ; + } + return false ; +} + +function FCKContextMenu_Document_OnMouseUp( e ) +{ + if ( FCKConfig.BrowserContextMenu ) + return true ; + + var overrideButton = FCKContextMenu_OverrideButton ; + + if ( overrideButton ) + { + var parent = overrideButton.parentNode ; + parent.parentNode.removeChild( parent ) ; + FCKContextMenu_OverrideButton = undefined ; + + if( e && e.button == 2 ) + { + FCKContextMenu_Document_OnContextMenu( e ) ; + return false ; + } + } + return true ; +} + +function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el ) +{ + if ( ( fckContextMenu.CtrlDisable && ( ev.ctrlKey || ev.metaKey ) ) || FCKConfig.BrowserContextMenu ) + return true ; + + var eTarget = el || this ; + + if ( fckContextMenu.OnBeforeOpen ) + fckContextMenu.OnBeforeOpen.call( fckContextMenu, eTarget ) ; + + if ( fckContextMenu._MenuBlock.Count() == 0 ) + return false ; + + if ( fckContextMenu._Redraw ) + { + fckContextMenu._MenuBlock.Create( fckContextMenu._Panel.MainNode ) ; + fckContextMenu._Redraw = false ; + } + + // This will avoid that the content of the context menu can be dragged in IE + // as the content of the panel is recreated we need to do it every time + FCKTools.DisableSelection( fckContextMenu._Panel.Document.body ) ; + + var x = 0 ; + var y = 0 ; + if ( FCKBrowserInfo.IsIE ) + { + x = ev.screenX ; + y = ev.screenY ; + } + else if ( FCKBrowserInfo.IsSafari ) + { + x = ev.clientX ; + y = ev.clientY ; + } + else + { + x = ev.pageX ; + y = ev.pageY ; + } + fckContextMenu._Panel.Show( x, y, ev.currentTarget || null ) ; + + return false ; +} + +function FCKContextMenu_MenuBlock_OnClick( menuItem, contextMenu ) +{ + contextMenu._Panel.Hide() ; + FCKTools.RunFunction( contextMenu.OnItemClick, contextMenu, menuItem ) ; +} diff --git a/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdataprocessor.js b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdataprocessor.js new file mode 100644 index 000000000..f0ac79d74 --- /dev/null +++ b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdataprocessor.js @@ -0,0 +1,119 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2009 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * The Data Processor is responsible for transforming the input and output data + * in the editor. For more info: + * http://dev.fckeditor.net/wiki/Components/DataProcessor + * + * The default implementation offers the base XHTML compatibility features of + * FCKeditor. Further Data Processors may be implemented for other purposes. + * + */ + +var FCKDataProcessor = function() +{} + +FCKDataProcessor.prototype = +{ + /* + * Returns a string representing the HTML format of "data". The returned + * value will be loaded in the editor. + * The HTML must be from to , including , and + * eventually the DOCTYPE. + * Note: HTML comments may already be part of the data because of the + * pre-processing made with ProtectedSource. + * @param {String} data The data to be converted in the + * DataProcessor specific format. + */ + ConvertToHtml : function( data ) + { + // The default data processor must handle two different cases depending + // on the FullPage setting. Custom Data Processors will not be + // compatible with FullPage, much probably. + if ( FCKConfig.FullPage ) + { + // Save the DOCTYPE. + FCK.DocTypeDeclaration = data.match( FCKRegexLib.DocTypeTag ) ; + + // Check if the tag is available. + if ( !FCKRegexLib.HasBodyTag.test( data ) ) + data = '' + data + '' ; + + // Check if the tag is available. + if ( !FCKRegexLib.HtmlOpener.test( data ) ) + data = '' + data + '' ; + + // Check if the tag is available. + if ( !FCKRegexLib.HeadOpener.test( data ) ) + data = data.replace( FCKRegexLib.HtmlOpener, '$&' ) ; + + return data ; + } + else + { + var html = + FCKConfig.DocType + + ' 0 && !FCKRegexLib.Html4DocType.test( FCKConfig.DocType ) ) + html += ' style="overflow-y: scroll"' ; + + html += '>' + + '' + + data + + '' ; + + return html ; + } + }, + + /* + * Converts a DOM (sub-)tree to a string in the data format. + * @param {Object} rootNode The node that contains the DOM tree to be + * converted to the data format. + * @param {Boolean} excludeRoot Indicates that the root node must not + * be included in the conversion, only its children. + * @param {Boolean} format Indicates that the data must be formatted + * for human reading. Not all Data Processors may provide it. + */ + ConvertToDataFormat : function( rootNode, excludeRoot, ignoreIfEmptyParagraph, format ) + { + var data = FCKXHtml.GetXHTML( rootNode, !excludeRoot, format ) ; + + if ( ignoreIfEmptyParagraph && FCKRegexLib.EmptyOutParagraph.test( data ) ) + return '' ; + + return data ; + }, + + /* + * Makes any necessary changes to a piece of HTML for insertion in the + * editor selection position. + * @param {String} html The HTML to be fixed. + */ + FixHtml : function( html ) + { + return html ; + } +} ; diff --git a/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdocumentfragment_gecko.js b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdocumentfragment_gecko.js new file mode 100644 index 000000000..04a3099d6 --- /dev/null +++ b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdocumentfragment_gecko.js @@ -0,0 +1,53 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2009 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * This is a generic Document Fragment object. It is not intended to provide + * the W3C implementation, but is a way to fix the missing of a real Document + * Fragment in IE (where document.createDocumentFragment() returns a normal + * document instead), giving a standard interface for it. + * (IE Implementation) + */ + +var FCKDocumentFragment = function( parentDocument, baseDocFrag ) +{ + this.RootNode = baseDocFrag || parentDocument.createDocumentFragment() ; +} + +FCKDocumentFragment.prototype = +{ + + // Append the contents of this Document Fragment to another element. + AppendTo : function( targetNode ) + { + targetNode.appendChild( this.RootNode ) ; + }, + + AppendHtml : function( html ) + { + var eTmpDiv = this.RootNode.ownerDocument.createElement( 'div' ) ; + eTmpDiv.innerHTML = html ; + FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ; + }, + + InsertAfterNode : function( existingNode ) + { + FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ; + } +} diff --git a/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdocumentfragment_ie.js b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdocumentfragment_ie.js new file mode 100644 index 000000000..d9e4b3d97 --- /dev/null +++ b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdocumentfragment_ie.js @@ -0,0 +1,58 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2009 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * This is a generic Document Fragment object. It is not intended to provide + * the W3C implementation, but is a way to fix the missing of a real Document + * Fragment in IE (where document.createDocumentFragment() returns a normal + * document instead), giving a standard interface for it. + * (IE Implementation) + */ + +var FCKDocumentFragment = function( parentDocument ) +{ + this._Document = parentDocument ; + this.RootNode = parentDocument.createElement( 'div' ) ; +} + +// Append the contents of this Document Fragment to another node. +FCKDocumentFragment.prototype = +{ + + AppendTo : function( targetNode ) + { + FCKDomTools.MoveChildren( this.RootNode, targetNode ) ; + }, + + AppendHtml : function( html ) + { + var eTmpDiv = this._Document.createElement( 'div' ) ; + eTmpDiv.innerHTML = html ; + FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ; + }, + + InsertAfterNode : function( existingNode ) + { + var eRoot = this.RootNode ; + var eLast ; + + while( ( eLast = eRoot.lastChild ) ) + FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ; + } +} ; diff --git a/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdomrange.js b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdomrange.js new file mode 100644 index 000000000..b0912ebb5 --- /dev/null +++ b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckdomrange.js @@ -0,0 +1,935 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2009 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Class for working with a selection range, much like the W3C DOM Range, but + * it is not intended to be an implementation of the W3C interface. + */ + +var FCKDomRange = function( sourceWindow ) +{ + this.Window = sourceWindow ; + this._Cache = {} ; +} + +FCKDomRange.prototype = +{ + + _UpdateElementInfo : function() + { + var innerRange = this._Range ; + + if ( !innerRange ) + this.Release( true ) ; + else + { + // For text nodes, the node itself is the StartNode. + var eStart = innerRange.startContainer ; + + var oElementPath = new FCKElementPath( eStart ) ; + this.StartNode = eStart.nodeType == 3 ? eStart : eStart.childNodes[ innerRange.startOffset ] ; + this.StartContainer = eStart ; + this.StartBlock = oElementPath.Block ; + this.StartBlockLimit = oElementPath.BlockLimit ; + + if ( innerRange.collapsed ) + { + this.EndNode = this.StartNode ; + this.EndContainer = this.StartContainer ; + this.EndBlock = this.StartBlock ; + this.EndBlockLimit = this.StartBlockLimit ; + } + else + { + var eEnd = innerRange.endContainer ; + + if ( eStart != eEnd ) + oElementPath = new FCKElementPath( eEnd ) ; + + // The innerRange.endContainer[ innerRange.endOffset ] is not + // usually part of the range, but the marker for the range end. So, + // let's get the previous available node as the real end. + var eEndNode = eEnd ; + if ( innerRange.endOffset == 0 ) + { + while ( eEndNode && !eEndNode.previousSibling ) + eEndNode = eEndNode.parentNode ; + + if ( eEndNode ) + eEndNode = eEndNode.previousSibling ; + } + else if ( eEndNode.nodeType == 1 ) + eEndNode = eEndNode.childNodes[ innerRange.endOffset - 1 ] ; + + this.EndNode = eEndNode ; + this.EndContainer = eEnd ; + this.EndBlock = oElementPath.Block ; + this.EndBlockLimit = oElementPath.BlockLimit ; + } + } + + this._Cache = {} ; + }, + + CreateRange : function() + { + return new FCKW3CRange( this.Window.document ) ; + }, + + DeleteContents : function() + { + if ( this._Range ) + { + this._Range.deleteContents() ; + this._UpdateElementInfo() ; + } + }, + + ExtractContents : function() + { + if ( this._Range ) + { + var docFrag = this._Range.extractContents() ; + this._UpdateElementInfo() ; + return docFrag ; + } + return null ; + }, + + CheckIsCollapsed : function() + { + if ( this._Range ) + return this._Range.collapsed ; + + return false ; + }, + + Collapse : function( toStart ) + { + if ( this._Range ) + this._Range.collapse( toStart ) ; + + this._UpdateElementInfo() ; + }, + + Clone : function() + { + var oClone = FCKTools.CloneObject( this ) ; + + if ( this._Range ) + oClone._Range = this._Range.cloneRange() ; + + return oClone ; + }, + + MoveToNodeContents : function( targetNode ) + { + if ( !this._Range ) + this._Range = this.CreateRange() ; + + this._Range.selectNodeContents( targetNode ) ; + + this._UpdateElementInfo() ; + }, + + MoveToElementStart : function( targetElement ) + { + this.SetStart(targetElement,1) ; + this.SetEnd(targetElement,1) ; + }, + + // Moves to the first editing point inside a element. For example, in a + // element tree like "

Text

", the start editing point + // is "

^ Text

" (inside ). + MoveToElementEditStart : function( targetElement ) + { + var editableElement ; + + while ( targetElement && targetElement.nodeType == 1 ) + { + if ( FCKDomTools.CheckIsEditable( targetElement ) ) + editableElement = targetElement ; + else if ( editableElement ) + break ; // If we already found an editable element, stop the loop. + + targetElement = targetElement.firstChild ; + } + + if ( editableElement ) + this.MoveToElementStart( editableElement ) ; + }, + + InsertNode : function( node ) + { + if ( this._Range ) + this._Range.insertNode( node ) ; + }, + + CheckIsEmpty : function() + { + if ( this.CheckIsCollapsed() ) + return true ; + + // Inserts the contents of the range in a div tag. + var eToolDiv = this.Window.document.createElement( 'div' ) ; + this._Range.cloneContents().AppendTo( eToolDiv ) ; + + FCKDomTools.TrimNode( eToolDiv ) ; + + return ( eToolDiv.innerHTML.length == 0 ) ; + }, + + /** + * Checks if the start boundary of the current range is "visually" (like a + * selection caret) at the beginning of the block. It means that some + * things could be brefore the range, like spaces or empty inline elements, + * but it would still be considered at the beginning of the block. + */ + CheckStartOfBlock : function() + { + var cache = this._Cache ; + var bIsStartOfBlock = cache.IsStartOfBlock ; + + if ( bIsStartOfBlock != undefined ) + return bIsStartOfBlock ; + + // Take the block reference. + var block = this.StartBlock || this.StartBlockLimit ; + + var container = this._Range.startContainer ; + var offset = this._Range.startOffset ; + var currentNode ; + + if ( offset > 0 ) + { + // First, check the start container. If it is a text node, get the + // substring of the node value before the range offset. + if ( container.nodeType == 3 ) + { + var textValue = container.nodeValue.substr( 0, offset ).Trim() ; + + // If we have some text left in the container, we are not at + // the end for the block. + if ( textValue.length != 0 ) + return cache.IsStartOfBlock = false ; + } + else + currentNode = container.childNodes[ offset - 1 ] ; + } + + // We'll not have a currentNode if the container was a text node, or + // the offset is zero. + if ( !currentNode ) + currentNode = FCKDomTools.GetPreviousSourceNode( container, true, null, block ) ; + + while ( currentNode ) + { + switch ( currentNode.nodeType ) + { + case 1 : + // It's not an inline element. + if ( !FCKListsLib.InlineChildReqElements[ currentNode.nodeName.toLowerCase() ] ) + return cache.IsStartOfBlock = false ; + + break ; + + case 3 : + // It's a text node with real text. + if ( currentNode.nodeValue.Trim().length > 0 ) + return cache.IsStartOfBlock = false ; + } + + currentNode = FCKDomTools.GetPreviousSourceNode( currentNode, false, null, block ) ; + } + + return cache.IsStartOfBlock = true ; + }, + + /** + * Checks if the end boundary of the current range is "visually" (like a + * selection caret) at the end of the block. It means that some things + * could be after the range, like spaces, empty inline elements, or a + * single
, but it would still be considered at the end of the block. + */ + CheckEndOfBlock : function( refreshSelection ) + { + var isEndOfBlock = this._Cache.IsEndOfBlock ; + + if ( isEndOfBlock != undefined ) + return isEndOfBlock ; + + // Take the block reference. + var block = this.EndBlock || this.EndBlockLimit ; + + var container = this._Range.endContainer ; + var offset = this._Range.endOffset ; + var currentNode ; + + // First, check the end container. If it is a text node, get the + // substring of the node value after the range offset. + if ( container.nodeType == 3 ) + { + var textValue = container.nodeValue ; + if ( offset < textValue.length ) + { + textValue = textValue.substr( offset ) ; + + // If we have some text left in the container, we are not at + // the end for the block. + if ( textValue.Trim().length != 0 ) + return this._Cache.IsEndOfBlock = false ; + } + } + else + currentNode = container.childNodes[ offset ] ; + + // We'll not have a currentNode if the container was a text node, of + // the offset is out the container children limits (after it probably). + if ( !currentNode ) + currentNode = FCKDomTools.GetNextSourceNode( container, true, null, block ) ; + + var hadBr = false ; + + while ( currentNode ) + { + switch ( currentNode.nodeType ) + { + case 1 : + var nodeName = currentNode.nodeName.toLowerCase() ; + + // It's an inline element. + if ( FCKListsLib.InlineChildReqElements[ nodeName ] ) + break ; + + // It is the first
found. + if ( nodeName == 'br' && !hadBr ) + { + hadBr = true ; + break ; + } + + return this._Cache.IsEndOfBlock = false ; + + case 3 : + // It's a text node with real text. + if ( currentNode.nodeValue.Trim().length > 0 ) + return this._Cache.IsEndOfBlock = false ; + } + + currentNode = FCKDomTools.GetNextSourceNode( currentNode, false, null, block ) ; + } + + if ( refreshSelection ) + this.Select() ; + + return this._Cache.IsEndOfBlock = true ; + }, + + // This is an "intrusive" way to create a bookmark. It includes tags + // in the range boundaries. The advantage of it is that it is possible to + // handle DOM mutations when moving back to the bookmark. + // Attention: the inclusion of nodes in the DOM is a design choice and + // should not be changed as there are other points in the code that may be + // using those nodes to perform operations. See GetBookmarkNode. + // For performance, includeNodes=true if intended to SelectBookmark. + CreateBookmark : function( includeNodes ) + { + // Create the bookmark info (random IDs). + var oBookmark = + { + StartId : (new Date()).valueOf() + Math.floor(Math.random()*1000) + 'S', + EndId : (new Date()).valueOf() + Math.floor(Math.random()*1000) + 'E' + } ; + + var oDoc = this.Window.document ; + var eStartSpan ; + var eEndSpan ; + var oClone ; + + // For collapsed ranges, add just the start marker. + if ( !this.CheckIsCollapsed() ) + { + eEndSpan = oDoc.createElement( 'span' ) ; + eEndSpan.style.display = 'none' ; + eEndSpan.id = oBookmark.EndId ; + eEndSpan.setAttribute( '_fck_bookmark', true ) ; + + // For IE, it must have something inside, otherwise it may be + // removed during DOM operations. +// if ( FCKBrowserInfo.IsIE ) + eEndSpan.innerHTML = ' ' ; + + oClone = this.Clone() ; + oClone.Collapse( false ) ; + oClone.InsertNode( eEndSpan ) ; + } + + eStartSpan = oDoc.createElement( 'span' ) ; + eStartSpan.style.display = 'none' ; + eStartSpan.id = oBookmark.StartId ; + eStartSpan.setAttribute( '_fck_bookmark', true ) ; + + // For IE, it must have something inside, otherwise it may be removed + // during DOM operations. +// if ( FCKBrowserInfo.IsIE ) + eStartSpan.innerHTML = ' ' ; + + oClone = this.Clone() ; + oClone.Collapse( true ) ; + oClone.InsertNode( eStartSpan ) ; + + if ( includeNodes ) + { + oBookmark.StartNode = eStartSpan ; + oBookmark.EndNode = eEndSpan ; + } + + // Update the range position. + if ( eEndSpan ) + { + this.SetStart( eStartSpan, 4 ) ; + this.SetEnd( eEndSpan, 3 ) ; + } + else + this.MoveToPosition( eStartSpan, 4 ) ; + + return oBookmark ; + }, + + // This one should be a part of a hypothetic "bookmark" object. + GetBookmarkNode : function( bookmark, start ) + { + var doc = this.Window.document ; + + if ( start ) + return bookmark.StartNode || doc.getElementById( bookmark.StartId ) ; + else + return bookmark.EndNode || doc.getElementById( bookmark.EndId ) ; + }, + + MoveToBookmark : function( bookmark, preserveBookmark ) + { + var eStartSpan = this.GetBookmarkNode( bookmark, true ) ; + var eEndSpan = this.GetBookmarkNode( bookmark, false ) ; + + this.SetStart( eStartSpan, 3 ) ; + + if ( !preserveBookmark ) + FCKDomTools.RemoveNode( eStartSpan ) ; + + // If collapsed, the end span will not be available. + if ( eEndSpan ) + { + this.SetEnd( eEndSpan, 3 ) ; + + if ( !preserveBookmark ) + FCKDomTools.RemoveNode( eEndSpan ) ; + } + else + this.Collapse( true ) ; + + this._UpdateElementInfo() ; + }, + + // Non-intrusive bookmark algorithm + CreateBookmark2 : function() + { + // If there is no range then get out of here. + // It happens on initial load in Safari #962 and if the editor it's hidden also in Firefox + if ( ! this._Range ) + return { "Start" : 0, "End" : 0 } ; + + // First, we record down the offset values + var bookmark = + { + "Start" : [ this._Range.startOffset ], + "End" : [ this._Range.endOffset ] + } ; + // Since we're treating the document tree as normalized, we need to backtrack the text lengths + // of previous text nodes into the offset value. + var curStart = this._Range.startContainer.previousSibling ; + var curEnd = this._Range.endContainer.previousSibling ; + + // Also note that the node that we use for "address base" would change during backtracking. + var addrStart = this._Range.startContainer ; + var addrEnd = this._Range.endContainer ; + while ( curStart && curStart.nodeType == 3 && addrStart.nodeType == 3 ) + { + bookmark.Start[0] += curStart.length ; + addrStart = curStart ; + curStart = curStart.previousSibling ; + } + while ( curEnd && curEnd.nodeType == 3 && addrEnd.nodeType == 3 ) + { + bookmark.End[0] += curEnd.length ; + addrEnd = curEnd ; + curEnd = curEnd.previousSibling ; + } + + // If the object pointed to by the startOffset and endOffset are text nodes, we need + // to backtrack and add in the text offset to the bookmark addresses. + if ( addrStart.nodeType == 1 && addrStart.childNodes[bookmark.Start[0]] && addrStart.childNodes[bookmark.Start[0]].nodeType == 3 ) + { + var curNode = addrStart.childNodes[bookmark.Start[0]] ; + var offset = 0 ; + while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 ) + { + curNode = curNode.previousSibling ; + offset += curNode.length ; + } + addrStart = curNode ; + bookmark.Start[0] = offset ; + } + if ( addrEnd.nodeType == 1 && addrEnd.childNodes[bookmark.End[0]] && addrEnd.childNodes[bookmark.End[0]].nodeType == 3 ) + { + var curNode = addrEnd.childNodes[bookmark.End[0]] ; + var offset = 0 ; + while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 ) + { + curNode = curNode.previousSibling ; + offset += curNode.length ; + } + addrEnd = curNode ; + bookmark.End[0] = offset ; + } + + // Then, we record down the precise position of the container nodes + // by walking up the DOM tree and counting their childNode index + bookmark.Start = FCKDomTools.GetNodeAddress( addrStart, true ).concat( bookmark.Start ) ; + bookmark.End = FCKDomTools.GetNodeAddress( addrEnd, true ).concat( bookmark.End ) ; + return bookmark; + }, + + MoveToBookmark2 : function( bookmark ) + { + // Reverse the childNode counting algorithm in CreateBookmark2() + var curStart = FCKDomTools.GetNodeFromAddress( this.Window.document, bookmark.Start.slice( 0, -1 ), true ) ; + var curEnd = FCKDomTools.GetNodeFromAddress( this.Window.document, bookmark.End.slice( 0, -1 ), true ) ; + + // Generate the W3C Range object and update relevant data + this.Release( true ) ; + this._Range = new FCKW3CRange( this.Window.document ) ; + var startOffset = bookmark.Start[ bookmark.Start.length - 1 ] ; + var endOffset = bookmark.End[ bookmark.End.length - 1 ] ; + while ( curStart.nodeType == 3 && startOffset > curStart.length ) + { + if ( ! curStart.nextSibling || curStart.nextSibling.nodeType != 3 ) + break ; + startOffset -= curStart.length ; + curStart = curStart.nextSibling ; + } + while ( curEnd.nodeType == 3 && endOffset > curEnd.length ) + { + if ( ! curEnd.nextSibling || curEnd.nextSibling.nodeType != 3 ) + break ; + endOffset -= curEnd.length ; + curEnd = curEnd.nextSibling ; + } + this._Range.setStart( curStart, startOffset ) ; + this._Range.setEnd( curEnd, endOffset ) ; + this._UpdateElementInfo() ; + }, + + MoveToPosition : function( targetElement, position ) + { + this.SetStart( targetElement, position ) ; + this.Collapse( true ) ; + }, + + /* + * Moves the position of the start boundary of the range to a specific position + * relatively to a element. + * @position: + * 1 = After Start ^contents + * 2 = Before End contents^ + * 3 = Before Start ^contents + * 4 = After End contents^ + */ + SetStart : function( targetElement, position, noInfoUpdate ) + { + var oRange = this._Range ; + if ( !oRange ) + oRange = this._Range = this.CreateRange() ; + + switch( position ) + { + case 1 : // After Start ^contents + oRange.setStart( targetElement, 0 ) ; + break ; + + case 2 : // Before End contents^ + oRange.setStart( targetElement, targetElement.childNodes.length ) ; + break ; + + case 3 : // Before Start ^contents + oRange.setStartBefore( targetElement ) ; + break ; + + case 4 : // After End contents^ + oRange.setStartAfter( targetElement ) ; + } + + if ( !noInfoUpdate ) + this._UpdateElementInfo() ; + }, + + /* + * Moves the position of the start boundary of the range to a specific position + * relatively to a element. + * @position: + * 1 = After Start ^contents + * 2 = Before End contents^ + * 3 = Before Start ^contents + * 4 = After End contents^ + */ + SetEnd : function( targetElement, position, noInfoUpdate ) + { + var oRange = this._Range ; + if ( !oRange ) + oRange = this._Range = this.CreateRange() ; + + switch( position ) + { + case 1 : // After Start ^contents + oRange.setEnd( targetElement, 0 ) ; + break ; + + case 2 : // Before End contents^ + oRange.setEnd( targetElement, targetElement.childNodes.length ) ; + break ; + + case 3 : // Before Start ^contents + oRange.setEndBefore( targetElement ) ; + break ; + + case 4 : // After End contents^ + oRange.setEndAfter( targetElement ) ; + } + + if ( !noInfoUpdate ) + this._UpdateElementInfo() ; + }, + + Expand : function( unit ) + { + var oNode, oSibling ; + + switch ( unit ) + { + // Expand the range to include all inline parent elements if we are + // are in their boundary limits. + // For example (where [ ] are the range limits): + // Before => Some [Some sample text]. + // After => Some [Some sample text]. + case 'inline_elements' : + // Expand the start boundary. + if ( this._Range.startOffset == 0 ) + { + oNode = this._Range.startContainer ; + + if ( oNode.nodeType != 1 ) + oNode = oNode.previousSibling ? null : oNode.parentNode ; + + if ( oNode ) + { + while ( FCKListsLib.InlineNonEmptyElements[ oNode.nodeName.toLowerCase() ] ) + { + this._Range.setStartBefore( oNode ) ; + + if ( oNode != oNode.parentNode.firstChild ) + break ; + + oNode = oNode.parentNode ; + } + } + } + + // Expand the end boundary. + oNode = this._Range.endContainer ; + var offset = this._Range.endOffset ; + + if ( ( oNode.nodeType == 3 && offset >= oNode.nodeValue.length ) || ( oNode.nodeType == 1 && offset >= oNode.childNodes.length ) || ( oNode.nodeType != 1 && oNode.nodeType != 3 ) ) + { + if ( oNode.nodeType != 1 ) + oNode = oNode.nextSibling ? null : oNode.parentNode ; + + if ( oNode ) + { + while ( FCKListsLib.InlineNonEmptyElements[ oNode.nodeName.toLowerCase() ] ) + { + this._Range.setEndAfter( oNode ) ; + + if ( oNode != oNode.parentNode.lastChild ) + break ; + + oNode = oNode.parentNode ; + } + } + } + + break ; + + case 'block_contents' : + case 'list_contents' : + var boundarySet = FCKListsLib.BlockBoundaries ; + if ( unit == 'list_contents' || FCKConfig.EnterMode == 'br' ) + boundarySet = FCKListsLib.ListBoundaries ; + + if ( this.StartBlock && FCKConfig.EnterMode != 'br' && unit == 'block_contents' ) + this.SetStart( this.StartBlock, 1 ) ; + else + { + // Get the start node for the current range. + oNode = this._Range.startContainer ; + + // If it is an element, get the node right before of it (in source order). + if ( oNode.nodeType == 1 ) + { + var lastNode = oNode.childNodes[ this._Range.startOffset ] ; + if ( lastNode ) + oNode = FCKDomTools.GetPreviousSourceNode( lastNode, true ) ; + else + oNode = oNode.lastChild || oNode ; + } + + // We must look for the left boundary, relative to the range + // start, which is limited by a block element. + while ( oNode + && ( oNode.nodeType != 1 + || ( oNode != this.StartBlockLimit + && !boundarySet[ oNode.nodeName.toLowerCase() ] ) ) ) + { + this._Range.setStartBefore( oNode ) ; + oNode = oNode.previousSibling || oNode.parentNode ; + } + } + + if ( this.EndBlock && FCKConfig.EnterMode != 'br' && unit == 'block_contents' && this.EndBlock.nodeName.toLowerCase() != 'li' ) + this.SetEnd( this.EndBlock, 2 ) ; + else + { + oNode = this._Range.endContainer ; + if ( oNode.nodeType == 1 ) + oNode = oNode.childNodes[ this._Range.endOffset ] || oNode.lastChild ; + + // We must look for the right boundary, relative to the range + // end, which is limited by a block element. + while ( oNode + && ( oNode.nodeType != 1 + || ( oNode != this.StartBlockLimit + && !boundarySet[ oNode.nodeName.toLowerCase() ] ) ) ) + { + this._Range.setEndAfter( oNode ) ; + oNode = oNode.nextSibling || oNode.parentNode ; + } + + // In EnterMode='br', the end
boundary element must + // be included in the expanded range. + if ( oNode && oNode.nodeName.toLowerCase() == 'br' ) + this._Range.setEndAfter( oNode ) ; + } + + this._UpdateElementInfo() ; + } + }, + + /** + * Split the block element for the current range. It deletes the contents + * of the range and splits the block in the collapsed position, resulting + * in two sucessive blocks. The range is then positioned in the middle of + * them. + * + * It returns and object with the following properties: + * - PreviousBlock : a reference to the block element that preceeds + * the range after the split. + * - NextBlock : a reference to the block element that follows the + * range after the split. + * - WasStartOfBlock : a boolean indicating that the range was + * originaly at the start of the block. + * - WasEndOfBlock : a boolean indicating that the range was originaly + * at the end of the block. + * + * If the range was originaly at the start of the block, no split will happen + * and the PreviousBlock value will be null. The same is valid for the + * NextBlock value if the range was at the end of the block. + */ + SplitBlock : function( forceBlockTag ) + { + var blockTag = forceBlockTag || FCKConfig.EnterMode ; + + if ( !this._Range ) + this.MoveToSelection() ; + + // The range boundaries must be in the same "block limit" element. + if ( this.StartBlockLimit == this.EndBlockLimit ) + { + // Get the current blocks. + var eStartBlock = this.StartBlock ; + var eEndBlock = this.EndBlock ; + var oElementPath = null ; + + if ( blockTag != 'br' ) + { + if ( !eStartBlock ) + { + eStartBlock = this.FixBlock( true, blockTag ) ; + eEndBlock = this.EndBlock ; // FixBlock may have fixed the EndBlock too. + } + + if ( !eEndBlock ) + eEndBlock = this.FixBlock( false, blockTag ) ; + } + + // Get the range position. + var bIsStartOfBlock = ( eStartBlock != null && this.CheckStartOfBlock() ) ; + var bIsEndOfBlock = ( eEndBlock != null && this.CheckEndOfBlock() ) ; + + // Delete the current contents. + if ( !this.CheckIsEmpty() ) + this.DeleteContents() ; + + if ( eStartBlock && eEndBlock && eStartBlock == eEndBlock ) + { + if ( bIsEndOfBlock ) + { + oElementPath = new FCKElementPath( this.StartContainer ) ; + this.MoveToPosition( eEndBlock, 4 ) ; + eEndBlock = null ; + } + else if ( bIsStartOfBlock ) + { + oElementPath = new FCKElementPath( this.StartContainer ) ; + this.MoveToPosition( eStartBlock, 3 ) ; + eStartBlock = null ; + } + else + { + // Extract the contents of the block from the selection point to the end of its contents. + this.SetEnd( eStartBlock, 2 ) ; + var eDocFrag = this.ExtractContents() ; + + // Duplicate the block element after it. + eEndBlock = eStartBlock.cloneNode( false ) ; + eEndBlock.removeAttribute( 'id', false ) ; + + // Place the extracted contents in the duplicated block. + eDocFrag.AppendTo( eEndBlock ) ; + + FCKDomTools.InsertAfterNode( eStartBlock, eEndBlock ) ; + + this.MoveToPosition( eStartBlock, 4 ) ; + + // In Gecko, the last child node must be a bogus
. + // Note: bogus
added under