Re-Added searchbar clearing and journal highlighting

This commit is contained in:
Dominik Süß 2016-10-21 19:19:04 +02:00 committed by Simon Michael
parent 7d6887898a
commit 956b63f27d

View File

@ -62,13 +62,11 @@ sidebar vd@VD{..} =
<div #sidebar-menu .col-md-4 .col-sm-4 .sidebar-offcanvas> <div #sidebar-menu .col-md-4 .col-sm-4 .sidebar-offcanvas>
<ul .main-menu .nav .nav-stacked .affix-top> <ul .main-menu .nav .nav-stacked .affix-top>
<li .top> <li .top>
<a href=@{JournalR} title="Show general journal entries, most recent first">Journal <a href=@{JournalR} .#{journalcurrent} title="Show general journal entries, most recent first">Journal
^{accounts} ^{accounts}
|] |]
-- <a href=@{JournalR} .#{journalcurrent} title="Show general journal entries, most recent first" style="white-space:nowrap;">Journal
-- <p style="margin-top:1em;">
where where
journalcurrent = if here == JournalR then "current" else "" :: String journalcurrent = if here == JournalR then "inacct" else "" :: String
accounts = balanceReportAsHtml opts vd $ balanceReport (reportopts_ $ cliopts_ opts){empty_=True} am j accounts = balanceReportAsHtml opts vd $ balanceReport (reportopts_ $ cliopts_ opts){empty_=True} am j
-- -- | Navigation link, preserving parameters and possibly highlighted. -- -- | Navigation link, preserving parameters and possibly highlighted.
@ -98,6 +96,9 @@ searchform VD{..} = [hamlet|
<div #searchbar .input-group> <div #searchbar .input-group>
<input .form-control name=q value=#{q} title="Enter hledger search patterns to filter the data below" placeholder="Search"> <input .form-control name=q value=#{q} title="Enter hledger search patterns to filter the data below" placeholder="Search">
<div .input-group-btn> <div .input-group-btn>
$if filtering
<a href=@{here} .btn .btn-default title="Clear search terms">
<span .glyphicon .glyphicon-remove-circle>
<button .btn .btn-default type=submit title="Apply search terms"> <button .btn .btn-default type=submit title="Apply search terms">
<span .glyphicon .glyphicon-search> <span .glyphicon .glyphicon-search>
<button .btn .btn-default type=button data-toggle="modal" data-target="#helpmodal" title="Show search and general help">? <button .btn .btn-default type=button data-toggle="modal" data-target="#helpmodal" title="Show search and general help">?