| 1 | <% from MaKaC.webinterface.materialFactories import MaterialFactoryRegistry %> |
|---|
| 2 | <% from MaKaC.common import Config %> |
|---|
| 3 | <% import MaKaC.common.info as info %> |
|---|
| 4 | <% from MaKaC.rb_location import Location %> |
|---|
| 5 | <% import simplejson %> |
|---|
| 6 | <%! |
|---|
| 7 | config = Config.getInstance() |
|---|
| 8 | authenticators = config.getAuthenticatorList() |
|---|
| 9 | extAuths = [] |
|---|
| 10 | for auth in authenticators: |
|---|
| 11 | if auth.lower() != "local": |
|---|
| 12 | extAuths.append(auth) |
|---|
| 13 | |
|---|
| 14 | rbActive = info.HelperMaKaCInfo.getMaKaCInfoInstance().getRoomBookingModuleActive() |
|---|
| 15 | if rbActive: |
|---|
| 16 | locationList = {} |
|---|
| 17 | locationNames = map(lambda l: l.friendlyName, Location.allLocations) |
|---|
| 18 | |
|---|
| 19 | for name in locationNames: |
|---|
| 20 | locationList[name] = name; |
|---|
| 21 | else: |
|---|
| 22 | locationList = None |
|---|
| 23 | |
|---|
| 24 | %> |
|---|
| 25 | <% end %> |
|---|
| 26 | |
|---|
| 27 | var Indico = { |
|---|
| 28 | SystemIcons: { |
|---|
| 29 | conference: "<%= iconFileName("conference") %>", |
|---|
| 30 | lecture: "<%= iconFileName("lecture") %>", |
|---|
| 31 | meeting: "<%= iconFileName("meeting") %>", |
|---|
| 32 | help: "<%= iconFileName("help") %>", |
|---|
| 33 | arrow_previous: "<%= iconFileName("arrow_previous") %>", |
|---|
| 34 | arrow_next: "<%= iconFileName("arrow_next") %>", |
|---|
| 35 | dot_gray: "<%= iconFileName("dot_gray") %>", |
|---|
| 36 | dot_blue: "<%= iconFileName("dot_blue") %>", |
|---|
| 37 | dot_green: "<%= iconFileName("dot_green") %>", |
|---|
| 38 | dot_red: "<%= iconFileName("dot_red") %>", |
|---|
| 39 | dot_orange: "<%= iconFileName("dot_orange") %>", |
|---|
| 40 | loading: "<%= iconFileName("loading") %>", |
|---|
| 41 | ui_loading: "<%= iconFileName("ui_loading") %>", |
|---|
| 42 | role_participant: "<%= iconFileName("role_participant") %>", |
|---|
| 43 | role_creator: "<%= iconFileName("role_creator") %>", |
|---|
| 44 | role_manager: "<%= iconFileName("role_manager") %>", |
|---|
| 45 | remove: "<%= iconFileName("remove") %>", |
|---|
| 46 | remove_faded: "<%= iconFileName("remove_faded") %>", |
|---|
| 47 | add: "<%= iconFileName("add") %>", |
|---|
| 48 | add_faded: "<%= iconFileName("add_faded") %>", |
|---|
| 49 | basket: "<%= iconFileName("basket") %>", |
|---|
| 50 | tick: "<%= iconFileName("tick") %>", |
|---|
| 51 | edit: "<%= iconFileName("edit") %>", |
|---|
| 52 | edit_faded: "<%= iconFileName("edit_faded") %>", |
|---|
| 53 | currentMenuItem: "<%= iconFileName("currentMenuItem") %>", |
|---|
| 54 | itemExploded:"<%= iconFileName("itemExploded") %>", |
|---|
| 55 | enabledSection: "<%= iconFileName("enabledSection") %>", |
|---|
| 56 | disabledSection: "<%= iconFileName("disabledSection") %>", |
|---|
| 57 | timezone: "<%= iconFileName("timezone") %>", |
|---|
| 58 | basket: "<%= iconFileName("basket") %>", |
|---|
| 59 | play: "<%= iconFileName("play") %>", |
|---|
| 60 | stop: "<%= iconFileName("stop") %>", |
|---|
| 61 | play_small: "<%= iconFileName("play_small") %>", |
|---|
| 62 | stop_small: "<%= iconFileName("stop_small") %>", |
|---|
| 63 | reload: "<%= iconFileName("reload") %>", |
|---|
| 64 | mail_big: "<%= iconFileName("mail_big") %>", |
|---|
| 65 | play_faded: "<%= iconFileName("play_faded") %>", |
|---|
| 66 | stop_faded: "<%= iconFileName("stop_faded") %>", |
|---|
| 67 | play_faded_small: "<%= iconFileName("play_faded_small") %>", |
|---|
| 68 | stop_faded_small: "<%= iconFileName("stop_faded_small") %>", |
|---|
| 69 | info: "<%= iconFileName("info") %>", |
|---|
| 70 | accept: "<%= iconFileName("accept") %>", |
|---|
| 71 | reject:"<%= iconFileName("reject") %>", |
|---|
| 72 | user:"<%= iconFileName("user") %>", |
|---|
| 73 | room:"<%= iconFileName("room") %>", |
|---|
| 74 | popupMenu: "<%= iconFileName("popupMenu")%>", |
|---|
| 75 | roomwidgetArrow: "<%= iconFileName("roomwidgetArrow")%>", |
|---|
| 76 | breadcrumbArrow: "<%= iconFileName("breadcrumbArrow")%>", |
|---|
| 77 | star: "<%= iconFileName("star")%>", |
|---|
| 78 | starGrey: "<%= iconFileName("starGrey")%>", |
|---|
| 79 | warning_yellow: "<%= iconFileName("warning_yellow")%>", |
|---|
| 80 | arrow_up: "<%= iconFileName("upArrow")%>", |
|---|
| 81 | arrow_down: "<%= iconFileName("downArrow")%>", |
|---|
| 82 | indico_small: "<%= iconFileName("indico_small")%>", |
|---|
| 83 | protected: "<%= iconFileName("protected")%>", |
|---|
| 84 | calendarWidget: "<%= iconFileName("calendarWidget") %>" |
|---|
| 85 | }, |
|---|
| 86 | FileTypeIcons: |
|---|
| 87 | <%= simplejson.dumps(dict((k.lower(),v[2]) for k,v in config.getFileTypes().iteritems())) %> |
|---|
| 88 | , |
|---|
| 89 | Urls: { |
|---|
| 90 | JsonRpcService: "<%= urlHandlers.UHJsonRpcService.getURL() %>", |
|---|
| 91 | SecureJsonRpcService: "<%= urlHandlers.UHSecureJsonRpcService.getURL() %>", |
|---|
| 92 | |
|---|
| 93 | ImagesBase: "<%= Config.getInstance().getImagesBaseURL() %>", |
|---|
| 94 | SecureImagesBase: "<%= Config.getInstance().getImagesBaseSecureURL() %>", |
|---|
| 95 | |
|---|
| 96 | Login: "<%= urlHandlers.UHSignIn.getURL() %>", |
|---|
| 97 | |
|---|
| 98 | Favourites: "<%= urlHandlers.UHUserBaskets.getURL() %>", |
|---|
| 99 | |
|---|
| 100 | ConferenceDisplay: "<%= urlHandlers.UHConferenceDisplay.getURL() %>", |
|---|
| 101 | ContributionDisplay: "<%= urlHandlers.UHContributionDisplay.getURL() %>", |
|---|
| 102 | SessionDisplay: "<%= urlHandlers.UHSessionDisplay.getURL() %>", |
|---|
| 103 | ConfCollaborationDisplay: "<%= urlHandlers.UHCollaborationDisplay.getURL() %>", |
|---|
| 104 | |
|---|
| 105 | ContribToXML: "<%= urlHandlers.UHContribToXML.getURL() %>", |
|---|
| 106 | ContribToPDF: "<%= urlHandlers.UHContribToPDF.getURL() %>", |
|---|
| 107 | ContribToiCal: "<%= urlHandlers.UHContribToiCal.getURL() %>", |
|---|
| 108 | |
|---|
| 109 | SessionToiCal: "<%= urlHandlers.UHSessionToiCal.getURL() %>", |
|---|
| 110 | ConfTimeTablePDF: "<%= urlHandlers.UHConfTimeTablePDF.getURL() %>", |
|---|
| 111 | ConfTimeTableCustomPDF: "<%= urlHandlers.UHConfTimeTableCustomizePDF.getURL() %>", |
|---|
| 112 | |
|---|
| 113 | SessionModification: "<%= urlHandlers.UHSessionModification.getURL() %>", |
|---|
| 114 | ContributionModification: "<%= urlHandlers.UHContributionModification.getURL() %>", |
|---|
| 115 | BreakModification: "<%= urlHandlers.UHConfModifyBreak.getURL() %>", |
|---|
| 116 | |
|---|
| 117 | Reschedule: "<%= urlHandlers.UHConfModifReschedule.getURL() %>", |
|---|
| 118 | SlotCalc: "<%= urlHandlers.UHSessionModSlotCalc.getURL() %>", |
|---|
| 119 | FitSession: "<%= urlHandlers.UHSessionModFit.getURL() %>", |
|---|
| 120 | |
|---|
| 121 | UploadAction: { |
|---|
| 122 | subContribution: '<%= str(urlHandlers.UHSubContribModifAddMaterials.getURL()) %>', |
|---|
| 123 | contribution: '<%= str(urlHandlers.UHContribModifAddMaterials.getURL()) %>', |
|---|
| 124 | session: '<%= str(urlHandlers.UHSessionModifAddMaterials.getURL()) %>', |
|---|
| 125 | conference: '<%= str(urlHandlers.UHConfModifAddMaterials.getURL()) %>', |
|---|
| 126 | category: '<%= str(urlHandlers.UHCategoryAddMaterial.getURL()) %>' |
|---|
| 127 | } |
|---|
| 128 | }, |
|---|
| 129 | |
|---|
| 130 | Data: { |
|---|
| 131 | MaterialTypes: { meeting : <%= simplejson.dumps(list((k,k.title()) for k in MaterialFactoryRegistry._allowedMaterials['meeting'])) %>, |
|---|
| 132 | simple_event: <%= simplejson.dumps(list((k,k.title()) for k in MaterialFactoryRegistry._allowedMaterials['simple_event'])) %>, |
|---|
| 133 | conference: <%= simplejson.dumps(list((k,k.title()) for k in MaterialFactoryRegistry._allowedMaterials['conference'])) %>, |
|---|
| 134 | category: <%= simplejson.dumps(list((k,k.title()) for k in MaterialFactoryRegistry._allowedMaterials['category'])) %>}, |
|---|
| 135 | WeekDays: <%= [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] %>, |
|---|
| 136 | DefaultLocation: '<%= str(Location.getDefaultLocation().friendlyName) %>', |
|---|
| 137 | Locations: <%= jsonEncode(locationList) %> |
|---|
| 138 | }, |
|---|
| 139 | Settings: { |
|---|
| 140 | ExtAuthenticators: <%= extAuths %>, |
|---|
| 141 | RoomBookingModuleActive: <%= jsBoolean(rbActive) %> |
|---|
| 142 | } |
|---|
| 143 | }; |
|---|