Edgewall Software

Ticket #5400 (closed defect: fixed)

Opened 15 months ago

Last modified 9 months ago

Header logo on wrong position, when SEARCH_VIEW not activated

Reported by: jl Owned by: osimons
Priority: normal Milestone: 0.11
Component: search system Version: devel
Severity: normal Keywords:
Cc:

Description

The header logo is on the wrong position (crossing the wiki/timeline/roadmap/... -bar), when the SEARCH_VIEW permission is not available for the user. This happens not in version 0.10.4. My actual test version is 0.11dev-r5552.

Attachments

Logo.PNG (41.7 kB) - added by jl 15 months ago.
Wrong logo position

Change History

Changed 15 months ago by jl

Wrong logo position

Changed 11 months ago by anonymous

Same error here, only I have disabled trac.search.web_ui entirely so same effect for all users. Using 0.11dev-r6038

Changed 9 months ago by osimons

  • owner changed from jonas to osimons
  • status changed from new to assigned
  • milestone changed from 0.11.1 to 0.11

Found it. It is a minor change from 0.10 that we no doudt didn't see the formatting consequences of. Basically, the search form consists of the <form> tag, and a <div> containing the textfield and button. In 0.10, we keep the form regardless, but don't show any fields - basically the search will not show, but the form 'lives' and takes up it's usual place in the page layout.

Here is a patch:

  • trac/templates/layout.html

     
    4343          height="${chrome.logo.height or None}" width="${chrome.logo.width or None}" /></a> 
    4444        <h1 py:otherwise=""><a href="${chrome.logo.link}">${project.name}</a></h1> 
    4545      </div> 
    46       <form py:if="'SEARCH_VIEW' in perm" id="search" 
    47             action="${href.search()}" method="get"><div> 
    48         <label for="proj-search">Search:</label> 
    49         <input type="text" id="proj-search" name="q" size="18" accesskey="f" value="" /> 
    50         <input type="submit" value="Search" /> 
    51       </div></form> 
     46      <form id="search" action="${href.search()}" method="get"> 
     47        <div py:if="'SEARCH_VIEW' in perm"> 
     48          <label for="proj-search">Search:</label> 
     49          <input type="text" id="proj-search" name="q" size="18" accesskey="f" value="" /> 
     50          <input type="submit" value="Search" /> 
     51        </div> 
     52      </form> 
    5253      ${navigation('metanav')} 
    5354    </div> 
    5455    ${navigation('mainnav')} 

If we're OK with restoring the 0.10 way of things, then I'll apply the patch.

Changed 9 months ago by osimons

  • status changed from assigned to closed
  • resolution set to fixed
  • component changed from general to search system

Patch applied in [6278]. Closing.

Add/Change #5400 (Header logo on wrong position, when SEARCH_VIEW not activated)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.