Moving Database Search Tool

Moving Database Search Tool

by Stewart Brouillette -
Number of replies: 5

Hi - I have been able to address most of my database issues. However, I notice that the search tool appears at the end of my list view. I would like to have it appear at the top of the list view. Is this something I have to address in the HTML script within the template or is this inherent in v 1.8/1.9? Any help is appreciated.

Thanks 

Average of ratings: -
In reply to Stewart Brouillette

Re: Moving Database Search Tool

by David Bogner -
Picture of Core developers Picture of Plugin developers
Hello Stewart,

I tried to do the same thing. You could just copy all the source code (in FireFox right click in the browser-window an then choose "view source code") between the tags <form>.......</form> (including the form tags) and paste it in the introduction section. But before you do this, you have to read this thread:
Allow form, option und select HTML-Tags to be added by admin,
because there are some troubles doing this, but it is possible!.

I already submitted an issue on this, register and vote for it, so it can be fixed soon: MDL-13025

Good luck!
David

In reply to David Bogner

Re: Moving Database Search Tool

by Rosario Carcò -

Hi David,

I am looking for a Hack to format the date fields in my displays, eg. instead of 28 February 2008, I would prefer 28.02.2008 (the swiss-german way). Unfortunately I did not find any hints neither in the manuals nor in the database forum. Maybe a little JavaScript or CSS would do the trick?

Thanks for any hint, Rosario

In reply to Rosario Carcò

Re: Moving Database Search Tool

by Rosario Carcò -

Hi, I think I am on the correct road. Here is what I did:

  • Investigated JavaScript and it's Date-Format capabilities
  • I wrote a little test-program (in the attachment)
  • I went into my database to add the javascript from test-prog into the according template
  • I added the call to my javascript function into the single display template to see whether the function is correctly called
  • And now the big question was, how I could pass Date to my function to process it? I never thought this would work:

    <script ...>
    <!--
      document.write(getMyDate("Date")); //pass the date string and get back the desired format
    -->
    </script>

    BUT IT REALLY PASSES THE STRING Date along
  • So last thing to do is a little string processing to get my desired date-format

If you are intrested, I will post my solution as Template-Preset.

Rosario

In reply to Stewart Brouillette

Re: Moving Database Search Tool

by Robert Allerstorfer -
In the current 1.9+ there is a separate Search tab, so there is no need to move it at the list view page. It's there in addition to the Search tab.