diff options
-rw-r--r-- | elm/Lib/Image.elm | 2 | ||||
-rw-r--r-- | elm/VNEdit.elm | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/elm/Lib/Image.elm b/elm/Lib/Image.elm index 3a20c648..31bab0b3 100644 --- a/elm/Lib/Image.elm +++ b/elm/Lib/Image.elm @@ -152,7 +152,7 @@ viewVote model = , required True , onCheck <| (if sex then MySex else MyVio) val , checked <| (if sex then i.my_sexual else i.my_violence) == Just val - , name <| "imgvote-" ++ (if sex then "sex" else "vio") ++ "-" ++ Maybe.withDefault "" (Maybe.map (\e -> e.id) i.entry) + , name <| "imgvote-" ++ (if sex then "sex" else "vio") ++ "-" ++ Maybe.withDefault "" model.id ] [] vote i = table [] [ thead [] [ tr [] diff --git a/elm/VNEdit.elm b/elm/VNEdit.elm index 4e442815..3c6f06a6 100644 --- a/elm/VNEdit.elm +++ b/elm/VNEdit.elm @@ -475,7 +475,7 @@ view model = let showrel r = "[" ++ (RDate.format (RDate.expand r.released)) ++ " " ++ (String.join "," r.lang) ++ "] " ++ r.title ++ " (r" ++ String.fromInt r.id ++ ")" rellist = List.map (\r -> (Just r.id, showrel r)) model.releases - scr n (id, i, rel) = tr [] <| + scr n (id, i, rel) = (String.fromInt id, tr [] <| let getdim img = Maybe.map (\nfo -> (nfo.width, nfo.height)) img |> Maybe.withDefault (0,0) imgdim = getdim i.img relnfo = List.filter (\r -> Just r.id == rel) model.releases |> List.head @@ -510,7 +510,7 @@ view model = (Nothing, Just r) -> [(Just r, "[Deleted or unlinked release: r" ++ String.fromInt r ++ "]")] _ -> [] ] - ] + ]) add = let free = 10 - List.length model.screenshots @@ -553,8 +553,11 @@ view model = , a [ href <| "/v" ++ Maybe.withDefault "" (Maybe.map String.fromInt model.id) ++ "/add" ] [ text "add the appropriate release entries" ] , text " first and then come back to this form to upload screenshots." ] - else table [ class "vnedit_scr" ] - <| tfoot [] [ tr [] [ td [] [], td [ colspan 2 ] add ] ] :: List.indexedMap scr model.screenshots + else + table [ class "vnedit_scr" ] + [ tfoot [] [ tr [] [ td [] [], td [ colspan 2 ] add ] ] + , K.node "tbody" [] <| List.indexedMap scr model.screenshots + ] newform () = form_ DupSubmit (model.state == Api.Loading) |