From f2d471d8a3f033c983fb308f40db4033cd0cce89 Mon Sep 17 00:00:00 2001 From: lioneltrebuchon <ltrebuchon@gmail.com> Date: Sun, 3 Dec 2017 10:41:49 +0100 Subject: [PATCH] Added keydescriptors to json. --- src/config.json | 33 +++++++++++++++++++++++++++++---- src/index.js | 10 ++-------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/config.json b/src/config.json index 1db1a7d..7369fd4 100644 --- a/src/config.json +++ b/src/config.json @@ -2,16 +2,41 @@ "apiUrl": "https://amiv-api.ethz.ch/", "Events": { "keyDescriptors": { - "title_de": "Titel in Deutsch", + "title_de": "Titel auf Deutsch", "title_en": "Title in English", - "location": "Location (Ort) of the event", - "allow_email_signup": "Event open for non-AMIV members", + "location": "Location (Ort)", "show_website": "Event is shown on the website", - "priority": "TODO: What type of priority is meant here? Edit priority? Organization prio?" + "priority": "TODO: What type of priority is meant here? Edit priority? Organization prio?", + "time_end": "Ending time", + "time_register_end": "Deadline for registration", + "time_start": "Starting time", + + "spots": "Spots available", + "allow_email_signup": "Event open for non-AMIV members", + "price": "Price", + + "signup_count": "Signed-up participants", + "catchphrase_en": "Catchphrase in English. Announce and Website.", + "catchphrase_de": "Schlagwort auf Deutsch", + "description_de": "Beschreibung auf Deutsch", + "description_en": "Description in English", + "img_banner": "Banner as png", + "img_poster": "Poster as png", + "img_thumbnail": "Thumbnail as png", + "show_infoscreen": "Does the event show on the infoscreen?", + "img_infoscreen": "Infoscreen as png", + "time_advertising_end": "Advertisment ends on", + "time_advertising_start": "Advertisement starts on", + "selection_strategy": "TODO what is this?", + "show_announce": "Does it belong to announce?", + "_id": "TODO Event ID how is this generated?" }, "tableKeys": [ "title_de", "location", + "time_end", + "time_start", + "time_register_end", "show_website", "priority" ] diff --git a/src/index.js b/src/index.js index df09844..f341484 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import LoginScreen from './login'; import TableView from './views/tableView'; import { UserModal, UserTable, NewUser } from './userTool'; import { MembershipView } from './membershipTool'; -import { EventTable, NewEvent } from './eventTool'; +import { EventTable, NewEvent, EventView } from './eventTool'; import Sidebar from './sidebar'; import AnnounceTool from './announceTool'; @@ -37,14 +37,8 @@ m.route(root, '/users', { '/newusers': layoutWith(NewUser), '/groupmemberships/:id': layoutWith(MembershipView), '/events': layoutWith(EventTable), + '/events/:id': layoutWith(EventView), '/newevents': layoutWith(NewEvent), - view() { - return m(TableView, { - resource: 'events', - keys: ['title_de', 'time_start', 'show_website', 'spots', 'signup_count'], - }); - }, - }), '/groups': layoutWith({ view() { return m(TableView, { -- GitLab