-
Notifications
You must be signed in to change notification settings - Fork 3
/
View.elm
88 lines (82 loc) · 2.29 KB
/
View.elm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module View (show) where
import Html exposing (Html, div, h2, text)
import Html.Attributes exposing (class)
import Model exposing (Model)
import Update exposing (Action(..))
import Effect.Summary
import Effect.Summary.View
import Ethos.AllList
import Ethos.SelectedList
import Government.AllList
import Government.SelectedList
import Trait.AllList
import Trait.SelectedList
import Race.Name
import Race.Reset
show : Signal.Address Action -> Model -> Html
show address model =
let
effects = Effect.Summary.extractEffects model
warning =
case model.warning of
Nothing ->
text ""
Just str ->
div
[ class "alert alert-warning" ]
[ text str ]
in
div
[ class "container-fluid" ]
[ warning
, div
[ class "row" ]
[ div
[ class "col-sm-12" ]
[ Race.Reset.show address ]
]
, div
[ class "row" ]
[ div
[ class "col-sm-5" ]
[ Race.Name.show address model.name ]
, div
[ class "col-sm-7" ]
[ ]
]
, div
[ class "row" ]
[ div
[ class "col-sm-5" ]
[ Ethos.AllList.show address model.selectedEthoses ]
, div
[ class "col-sm-7" ]
[ Ethos.SelectedList.show model.hoveredEthos model.selectedEthoses ]
]
, div
[ class "row" ]
[ div
[ class "col-sm-5" ]
[ Government.AllList.show address model.selectedEthoses model.selectedGovernment ]
, div
[ class "col-sm-7" ]
[ Government.SelectedList.show model.hoveredGovernmentForm model.hoveredGovernment model.selectedGovernment ]
]
, div
[ class "row" ]
[ div
[ class "col-sm-5" ]
[ Trait.AllList.show address model.hoveredTrait model.selectedTraits ]
, div
[ class "col-sm-7" ]
[ Trait.SelectedList.show model.hoveredTrait model.selectedTraits ]
]
, div
[ class "row" ]
[ div
[ class "col-sm-12" ]
[ h2 [] [ text "Summary" ]
, Effect.Summary.View.show effects
]
]
]