Commit fa392385 authored by Emmanuel Raviart's avatar Emmanuel Raviart

Update elm-format.

parent 97f8238e
......@@ -820,7 +820,8 @@ viewDebateModal model card debatedIds =
else
[]
)
-- TODO replace with "active" class
-- TODO replace with "active" class
]
[]
]
......@@ -842,7 +843,8 @@ viewDebateModal model card debatedIds =
else
[]
)
-- TODO replace with "active" class
-- TODO replace with "active" class
]
[]
]
......@@ -994,7 +996,8 @@ viewEditPropertyModal model card editedKeyId =
else
[]
)
-- TODO replace with "active" class
-- TODO replace with "active" class
]
[]
]
......@@ -1016,7 +1019,8 @@ viewEditPropertyModal model card editedKeyId =
else
[]
)
-- TODO replace with "active" class
-- TODO replace with "active" class
]
[]
]
......@@ -1161,10 +1165,11 @@ viewUseItModal language frenchGovDeployUrl =
]
]
]
-- , li [ class "option" ]
-- [ text "Deployer avec Octo" ]
-- , li [ class "option" ]
-- [ text "Deployer avec Capgemini" ]
-- , li [ class "option" ]
-- [ text "Deployer avec Octo" ]
-- , li [ class "option" ]
-- [ text "Deployer avec Capgemini" ]
]
]
]
......@@ -1416,7 +1421,8 @@ viewSidebar model card =
)
]
]
-- , viewSimilarTools -- TODO
-- , viewSimilarTools -- TODO
, div
[ class "row" ]
[ div [ class "col-xs-12" ]
......
......@@ -262,26 +262,28 @@ viewTool model language =
[ class "form-control"
, id "publisherField"
, onInput (\x -> ForSelf (SetField "Publisher" x))
-- , placeholder "What's the official name of the tool?" -- TODO
-- , placeholder "What's the official name of the tool?" -- TODO
, type_ "text"
]
[]
]
-- , div [ class "form-group" ]
-- [ label [ for "exampleInputFile" ]
-- [ text "File input" ]
-- , input [ id "exampleInputFile", type' "file" ]
-- []
-- , p [ class "help-block" ]
-- [ text "Example block-level help text here." ]
-- ]
-- , div [ class "checkbox" ]
-- [ label []
-- [ input [ type' "checkbox" ]
-- []
-- , text "Check me out"
-- ]
-- ]
-- , div [ class "form-group" ]
-- [ label [ for "exampleInputFile" ]
-- [ text "File input" ]
-- , input [ id "exampleInputFile", type' "file" ]
-- []
-- , p [ class "help-block" ]
-- [ text "Example block-level help text here." ]
-- ]
-- , div [ class "checkbox" ]
-- [ label []
-- [ input [ type' "checkbox" ]
-- []
-- , text "Check me out"
-- ]
-- ]
]
]
]
......@@ -326,12 +328,13 @@ viewTool model language =
]
]
]
-- , div [ class "row" ]
-- [ div [ class "col-xs-12" ]
-- [ i []
-- [ text "Maecenas " ]
-- ]
-- ]
-- , div [ class "row" ]
-- [ div [ class "col-xs-12" ]
-- [ i []
-- [ text "Maecenas " ]
-- ]
-- ]
]
]
]
......@@ -459,12 +462,13 @@ viewUseCase model language =
]
]
]
-- , div [ class "row" ]
-- [ div [ class "col-xs-12" ]
-- [ i []
-- [ text "Maecenas " ]
-- ]
-- ]
-- , div [ class "row" ]
-- [ div [ class "col-xs-12" ]
-- [ i []
-- [ text "Maecenas " ]
-- ]
-- ]
]
]
]
......
......@@ -122,10 +122,11 @@ viewCardsThumbnailsPanel language navigate onRemoveCard titleI18n data cards =
[ h4 [ class "zone-label" ]
[ text (I18n.translate language titleI18n) ]
]
-- , div [ class "col-xs-4 text-right up7" ]
-- [ a [ class "btn btn-default btn-xs btn-action", href "compare.html", type' "button" ]
-- [ text (I18n.translate language I18n.Compare) ]
-- ]
-- , div [ class "col-xs-4 text-right up7" ]
-- [ a [ class "btn btn-default btn-xs btn-action", href "compare.html", type' "button" ]
-- [ text (I18n.translate language I18n.Compare) ]
-- ]
]
, div [ class "panel-body" ]
[ div [ class "row" ]
......
......@@ -141,12 +141,13 @@ view model =
]
]
]
-- , div [ class "row" ]
-- [ div [ class "col-xs-12" ]
-- [ i []
-- [ text "Maecenas " ]
-- ]
-- ]
-- , div [ class "row" ]
-- [ div [ class "col-xs-12" ]
-- [ i []
-- [ text "Maecenas " ]
-- ]
-- ]
]
]
]
......@@ -160,7 +161,8 @@ view model =
, type_ "submit"
]
[ text (I18n.translate language (I18n.PublishCollection))
-- TODO i18n
-- TODO i18n
]
]
]
......
......@@ -237,10 +237,11 @@ viewCollectionContent language user data collection =
[ h4 [ class "zone-label" ]
[ text (I18n.translate language (I18n.Tool I18n.Plural)) ]
]
-- , div [ class "col-xs-4 text-right up7" ]
-- [ a [ class "btn btn-default btn-xs btn-action", href "compare.html", type' "button" ]
-- [ text (I18n.translate language I18n.Compare) ]
-- ]
-- , div [ class "col-xs-4 text-right up7" ]
-- [ a [ class "btn btn-default btn-xs btn-action", href "compare.html", type' "button" ]
-- [ text (I18n.translate language I18n.Compare) ]
-- ]
]
, div [ class "panel-body" ]
[ div [ class "row" ]
......
......@@ -3818,6 +3818,7 @@ try a couple different things, but there is no default value.
oneOf [ Nothing, Just 42, Just 71 ] == Just 42
oneOf [ Nothing, Nothing, Just 71 ] == Just 71
oneOf [ Nothing, Nothing, Nothing ] == Nothing
-}
oneOfMaybes : List (Maybe a) -> Maybe a
oneOfMaybes maybes =
......@@ -3917,7 +3918,8 @@ translate language translationId =
oneOfMaybes
[ translateHelp language
, translateHelp English
-- |> Maybe.map (\str -> "(EN) " ++ str)
-- |> Maybe.map (\str -> "(EN) " ++ str)
]
|> Maybe.withDefault
("TODO translate the ID "
......
module List.Extra exposing (..)
{-| Return all elements of the list except the last one.
init [1,2,3] == Just [1,2]
init [] == Nothing
init [1,2,3] == Just [1,2]
init [] == Nothing
Function taken from https://github.com/elm-community/list-extra, because it was not yet ported to Elm 0.18.
-}
......
......@@ -32,7 +32,8 @@ authenticationHeaders authentication =
Just authentication ->
[ Http.header "Retruco-API-Key" authentication.apiKey
, Http.header "Cache-Control" "no-cache"
-- Don't cache API requests when user is logged.
-- Don't cache API requests when user is logged.
]
Nothing ->
......
......@@ -814,14 +814,15 @@ viewHeader model language containerClass =
[]
[ text (I18n.translate language (I18n.UseCase I18n.Plural)) ]
]
-- , li []
-- [ aForPath
-- Navigate
-- language
-- "/organizations"
-- []
-- [ text (I18n.translate language (I18n.Organization I18n.Plural)) ]
-- ]
-- , li []
-- [ aForPath
-- Navigate
-- language
-- "/organizations"
-- []
-- [ text (I18n.translate language (I18n.Organization I18n.Plural)) ]
-- ]
, li []
[ aForPath
Navigate
......
......@@ -123,26 +123,27 @@ view { organizations, tools, useCases } activeCardType language location =
[ div [ class "row" ]
[ div [ class "container-fluid" ]
[ div [ class "tag" ] [ div [ class "bubbles" ] [] ]
-- , div [ class "row filters" ]
-- [ div [ class "col-md-12 text-center" ]
-- [ text "Showing results suited for"
-- , a
-- [ class "btn btn-default dropdown-toggle"
-- , attribute "data-slide-to" "2"
-- , href "#carousel-example-generic"
-- , attribute "role" "button"
-- ]
-- [ text "all organizations" ]
-- , text "and available in"
-- , a
-- [ class "btn btn-default dropdown-toggle"
-- , attribute "data-slide-to" "3"
-- , href "#carousel-example-generic"
-- , attribute "role" "button"
-- ]
-- [ text "English" ]
-- ]
-- ]
-- , div [ class "row filters" ]
-- [ div [ class "col-md-12 text-center" ]
-- [ text "Showing results suited for"
-- , a
-- [ class "btn btn-default dropdown-toggle"
-- , attribute "data-slide-to" "2"
-- , href "#carousel-example-generic"
-- , attribute "role" "button"
-- ]
-- [ text "all organizations" ]
-- , text "and available in"
-- , a
-- [ class "btn btn-default dropdown-toggle"
-- , attribute "data-slide-to" "3"
-- , href "#carousel-example-generic"
-- , attribute "role" "button"
-- ]
-- [ text "English" ]
-- ]
-- ]
]
]
]
......
......@@ -162,7 +162,8 @@ type alias Property =
{ arguments : List Argument
, ballotId :
String
-- TODO Use Maybe
-- TODO Use Maybe
, createdAt : String
, deleted : Bool
, id : String
......
......@@ -19,20 +19,26 @@ module UrlParser
, parseHash
)
{-|
{-| This file is a copy of UrlParser unpublished fork: <https://github.com/ogptoolbox/url-parser>.
This file is a copy of UrlParser unpublished fork: https://github.com/ogptoolbox/url-parser.
# Primitives
@docs Parser, string, int, s
# Path Parses
@docs (</>), map, oneOf, top, custom
# Query Parameter Parsers
@docs QueryParser, (<?>), stringParam, intParam, customParam
# Run a Parser
@docs parsePath, parseHash
-}
......@@ -69,6 +75,7 @@ type alias State value =
-- /alice/ ==> Just "alice"
-- /bob ==> Just "bob"
-- /42/ ==> Just "42"
-}
string : Parser (String -> a) a
string =
......@@ -81,6 +88,7 @@ string =
-- /alice/ ==> Nothing
-- /bob ==> Nothing
-- /42/ ==> Just 42
-}
int : Parser (Int -> a) a
int =
......@@ -91,6 +99,7 @@ int =
s "blog" -- can parse /blog/
-- but not /glob/ or /42/ or anything else
-}
s : String -> Parser a a
s str =
......@@ -111,20 +120,22 @@ s str =
`int` and `string` parsers:
int =
custom "NUMBER" String.toInt
custom "NUMBER" String.toInt
string =
custom "STRING" Ok
custom "STRING" Ok
You can use it to define something like “only CSS files” like this:
css : Parser (String -> a) a
css =
custom "CSS_FILE" <| \segment ->
if String.endsWith ".css" then
Ok segment
else
Err "Does not end with .css"
custom "CSS_FILE" <|
\segment ->
if String.endsWith ".css" then
Ok segment
else
Err "Does not end with .css"
-}
custom : String -> (String -> Result String a) -> Parser (a -> b) b
custom tipe stringToSomething =
......@@ -160,6 +171,7 @@ custom tipe stringToSomething =
-- /search/frog ==> Just "frog"
-- /search/ ==> Nothing
-- /cats/ ==> Nothing
-}
(</>) : Parser a b -> Parser b c -> Parser a c
(</>) (Parser parseBefore) (Parser parseAfter) =
......@@ -185,6 +197,7 @@ infixr 7 </>
-- /user/bob/comments/42 ==> Just { author = "bob", id = 42 }
-- /user/tom/comments/35 ==> Just { author = "tom", id = 35 }
-- /user/sam/ ==> Nothing
-}
map : a -> Parser a b -> Parser (b -> c) c
map subValue (Parser parse) =
......@@ -262,6 +275,7 @@ oneOf parsers =
-- /blog/post/42 ==> Just (Post 42)
-- /blog/post/forty-two ==> Just (NotFound ["post", "forty-two"])
-- /blog/delete ==> Just (NotFound ["delete"])
-}
remaining : Parser (List String -> a) a
remaining =
......@@ -292,6 +306,7 @@ remaining =
parsePath (s "blog" </> blogRoute) location
-- /blog/ ==> Just Overview
-- /blog/post/42 ==> Just (Post 42)
-}
top : Parser a a
top =
......@@ -323,6 +338,7 @@ type QueryParser a b
-- /blog/ ==> Just (BlogList Nothing)
-- /blog/?search=cats ==> Just (BlogList (Just "cats"))
-- /blog/42 ==> Just (BlogPost 42)
-}
(<?>) : Parser a b -> QueryParser b c -> Parser a c
(<?>) (Parser parser) (QueryParser queryParser) =
......@@ -337,6 +353,7 @@ infixl 8 <?>
parsePath (s "blog" <?> stringParam "search") location
-- /blog/ ==> Just (Overview Nothing)
-- /blog/?search=cats ==> Just (Overview (Just "cats"))
-}
stringParam : String -> QueryParser (Maybe String -> a) a
stringParam name =
......@@ -350,6 +367,7 @@ should appear first.
parsePath (s "results" <?> intParam "start") location
-- /results ==> Just Nothing
-- /results?start=10 ==> Just (Just 10)
-}
intParam : String -> QueryParser (Maybe Int -> a) a
intParam name =
......@@ -369,13 +387,15 @@ intParamHelp maybeValue =
{-| Create a custom query parser. You could create parsers like these:
jsonParam : String -> Decoder a -> QueryParser (Maybe a -> b) b
enumParam : String -> Dict String a -> QueryParser (Maybe a -> b) b
It may be worthwhile to have these in this library directly. If you need
either one in practice, please open an issue [here][] describing your exact
either one in practice, please open an issue [here] describing your exact
scenario. We can use that data to decide if they should be added.
[here]: https://github.com/evancz/url-parser/issues
-}
customParam : String -> (Maybe String -> a) -> QueryParser (a -> b) b
customParam key func =
......
......@@ -121,11 +121,12 @@ viewCardListItem navigate language values card =
, small []
[ text (I18n.getSubTypes language card values |> String.join ", ") ]
]
-- , div [ class "example-author" ]
-- [ img [ alt "screen", src "/img/TODO.png" ]
-- []
-- , text "TODO The White House"
-- ]
-- , div [ class "example-author" ]
-- [ img [ alt "screen", src "/img/TODO.png" ]
-- []
-- , text "TODO The White House"
-- ]
, p []
(case I18n.getOneString language descriptionKeys card values of
Just description ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment