Lines 250-269 of the \applications\core\dev\html\front\modcp\report.phtml template:
{{if count(\IPS\core\Reports\Types::roots() )>0}} <section class='i-margin-top_3'> <div class="ipsButtonBar ipsButtonBar--top"> <h2 class="ipsTitle i-font-size_1 i-flex_91 i-align-self_center i-padding-start_2">{lang="responses_to_report"}</h2> <ul class="ipsDataFilters"> <li> <a class="ipsJS_show ipsDataFilters__button" href="#elFilter_menu" id="elFilter" data-ipsMenu data-ipsMenu-activeClass="ipsDataFilters__button--active" ipsMenu-selectable="radio"> <span>{lang="automoderation_report_type_filter"}</span><i class="fa-solid fa-caret-down"></i> </a> <ul class="ipsMenu ipsMenu_auto ipsMenu_withStem ipsMenu_selectable ipsHide" id="elFilter_menu"> <li class="ipsMenu_item {{if ! isset( \IPS\Request::i()->report_type )}}ipsMenu_itemChecked{{endif}}"><a href="{$report->url()}">{lang="all"}</a></li> <li class="ipsMenu_sep"><hr></li> {{foreach \IPS\core\Reports\Types::roots() as $type}} <li class="ipsMenu_item {{if isset( \IPS\Request::i()->report_type ) and \IPS\Request::i()->report_type == $type->id}}ipsMenu_itemChecked{{endif}}" data-ipsMenuValue="{$type->id}"><a href="{$report->url()->setQueryString( array( 'report_type' => $type->id ) )}">{$type->_title}</a></li> {{endforeach}} </ul> </li> </ul> </div> {{endif}}
The IF check for report types should be moved AFTER the <section> element. As it is now, if there are no report types only the ending </section> element is displayed on the page.
Recommended Comments