Navigation Menu

Skip to content

Commit

Permalink
user attr_name and option_name for showDetailsFor
Browse files Browse the repository at this point in the history
fixes #61
  • Loading branch information
garbas committed Jun 10, 2020
1 parent 9413e66 commit 6d8dac2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/Page/Options.elm
Expand Up @@ -32,7 +32,6 @@ import Html.Attributes
( class
, colspan
, href
, property
)
import Html.Events
exposing
Expand Down Expand Up @@ -138,14 +137,14 @@ viewResultItem :
viewResultItem showDetailsFor item =
let
packageDetails =
if Just item.id == showDetailsFor then
if Just item.source.name == showDetailsFor then
[ td [ colspan 1 ] [ viewResultItemDetails item ]
]

else
[]
in
tr [ onClick (SearchMsg (Search.ShowDetails item.id)) ]
tr [ onClick (SearchMsg (Search.ShowDetails item.source.name)) ]
[ td [] [ text item.source.name ]
]
:: packageDetails
Expand Down
4 changes: 2 additions & 2 deletions src/Page/Packages.elm
Expand Up @@ -178,14 +178,14 @@ viewResultItem :
viewResultItem channel showDetailsFor item =
let
packageDetails =
if Just item.id == showDetailsFor then
if Just item.source.attr_name == showDetailsFor then
[ td [ colspan 4 ] [ viewResultItemDetails channel item ]
]

else
[]
in
tr [ onClick (SearchMsg (Search.ShowDetails item.id)) ]
tr [ onClick (SearchMsg (Search.ShowDetails item.source.attr_name)) ]
[ td [] [ text item.source.attr_name ]
, td [] [ text item.source.pname ]
, td [] [ text item.source.pversion ]
Expand Down

0 comments on commit 6d8dac2

Please sign in to comment.