Jump to content
  • [Beta2] Wrong IF check in \applications\core\dev\html\front\modcp\report.phtml


    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.


    User Feedback

    Recommended Comments

    teraßyte

    Posted (edited)

    This issue is also present in 4.7.19 Beta 3. Should I make a separate bug report for it? 🙄

    Edited by teraßyte
    teraßyte

    Posted

    24 minutes ago, Esther E. said:

    No, it wasn't fixed yet. 

    Yep, I know.

     

    It's just that I made this bug report for v5 (Beta 2) and not for v4. Either way you now know the issue is present also in v4. 😋


×
×
  • Create New...