Ok,

It's now easier than ever to create your own search screen. I just committed 
code that allows for a user defined TH1 report list view page. You know, the 
view that looks like:

Enter a new ticket:

    1. New Ticket

Choose a report format from the following list:

    2. All Tickets    [copy] [edit] [sql]
    3. ....

That is now a template that you can edit for yourself via Admin > Tickets > 
Report List Page. This means you can do about anything. It initializes your 
common code as well. So, to create a search screen, simply create a ticket 
report as described before. A simple example may be:

    SELECT title, severity FROM ticket
    WHERE 
        title LIKE '%'||cgi('title')||'%'
        AND severity LIKE cgi('severity')

Get the report number from the URL (something like rptedit?rn=20). Then edit 
your report list page and do something like:

  <form method="GET" action="$baseurl/rptview">
    <input type="hidden" name="rn" value="20"/>
    Title: <input type="text" name="title" /><br />
    Severity: <th1>combobox resolution $resolution_choices 1</th1><br />
    <input type="submit" />
  </form>

That's it!

Now, if your are CSS savy, the new template also opens up the possibility of 
better themeing of the report list. The report list is still built in fossil 
but it is placed into a variable and it uses only <li>...</li> tags. This means 
you can use <ol> or <ul> surrounding tags, you can turn them into menu entries, 
horizontal lists, etc...

Jeremy

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to