summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/create.pug23
1 files changed, 18 insertions, 5 deletions
diff --git a/views/create.pug b/views/create.pug
index 717c4f0..7a8a6b8 100644
--- a/views/create.pug
+++ b/views/create.pug
@@ -14,14 +14,27 @@ html
+gamecover(title.title_id)
form(method="post" action="/create/"+title.title_id)
- if scenarios.length > 1
+ if Array.isArray(scenarios)
+ if scenarios.length > 1
+ p Scenario:
+ br
+ select(name="scenario")
+ each scenario in scenarios
+ option(value=scenario)= scenario
+ else
+ input(type="hidden" name="scenario" value=scenarios[0])
+ else
p Scenario:
br
select(name="scenario")
- each scenario in scenarios
- option(value=scenario)= scenario
- else
- input(type="hidden" name="scenario" value=scenarios[0])
+ each list, name in scenarios
+ if name === ""
+ each scenario in list
+ option(value=scenario)= scenario
+ else
+ optgroup(label=name)
+ each scenario in list
+ option(value=scenario)= scenario
| !{ title.create_html }