Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #7173 (closed)

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

Templates: Phase I

Reported by: wmoore Owned by: wmoore
Priority: major Milestone: OMERO-4.4
Component: Web Version: n.a.
Keywords: n.a. Cc: atarkowska, cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2011-11-29 (3)

Description (last modified by wmoore)

Organise existing code: rearrange into templates to support the first set of use cases in #7067.

Outline of NEW template hierarchy:

NEW TEMPLATES:

- common/base/base_html.html
    Blocks: link, title, script, jscript, head, body
    Content: body.css, shortcut icon.
    Extended by:
    - common/base/base_frame.html
        Content: 
            link: body.css jquery-ui.css
            script: jquery.js jquery-ui.js popup.js
            head: web icon
        Extended by:
        - webclient/annotations/metadata_general.html
    - common/base/base_header.html
        Content:
            link: header.css
            body: top_header - logo, menu, navigation
                  thin_header - header_left, header_right
        Blocks: nav_links, header_left, header_right
        Extended by:
        - common/base/base_main.html
            Content: 
                link: footer.css body-styles layout.css images.css
                body: include footer.html
            Extended by:
            - webclient/base/base_container.html
                - Extended by webclient/data/containers.html, webclient/data/container_tags.html etc. 
            - webclient/base/base.html
                - Extended by webclient/person/myaccount.html, webclient/index/index.html, help etc

Some of this will be exploratory, to decide what strategies we want to adopt in this template story.

Outline of work:

  • created new Django app: 'common'
  • moved 'generic' templates from webclient/base/ to common/base/ (not moved base.html since header needs 'nav')
  • separated various sections from base_main.html into 'includes' at common/base/includes/
    • menu
    • footer
  • split the body, header & footer sections of layout.css into separate css files under omeroweb/media/omeroweb/common/css/ (not sure if omeroweb/media is the final location for 'common' media?) The idea is to allow inclusion of only the css you need, without all of layout.css.


Questions

  • How to allow optional inclusion of various js or css? E.g.
    {% include footer_css %}
    

with footer_css is simply one line:

<link rel="stylesheet" href="{% url webstatic "common/css/footer.css" %}" type="text/css" />

Attachments (5)

Screen shot 2011-11-16 at 22.44.33.png (219.6 KB) - added by wmoore 12 years ago.
Webclient with current-looking header
Screen shot 2011-11-16 at 22.48.41.png (75.3 KB) - added by wmoore 12 years ago.
Extending base_header.html, overwriting footer, adding left & right headers
Screen shot 2011-11-16 at 22.49.05.png (78.4 KB) - added by wmoore 12 years ago.
Extending the webtest example above, using different logo, header links
Screen shot 2011-11-16 at 22.49.23.png (82.4 KB) - added by wmoore 12 years ago.
Extending base_header.html, including webclient links.
extending base header with indicated web links.png (181.4 KB) - added by saloynton 12 years ago.
Modified screenshot of Extending base_header.html, including webclient links - with 2 different options displayed.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by wmoore

  • Status changed from new to accepted

comment:2 Changed 12 years ago by wmoore

  • Description modified (diff)

comment:3 Changed 12 years ago by jburel

  • Sprint changed from 2011-11-10 (2) to 2011-11-29 (3)

Moved from sprint 2011-11-10 (2)

Changed 12 years ago by wmoore

Webclient with current-looking header

Changed 12 years ago by wmoore

Extending base_header.html, overwriting footer, adding left & right headers

Changed 12 years ago by wmoore

Extending the webtest example above, using different logo, header links

Changed 12 years ago by wmoore

Extending base_header.html, including webclient links.

comment:4 Changed 12 years ago by wmoore

  • Resolution set to fixed
  • Status changed from accepted to closed

Since we now have a working template hierarchy, with webtest examples https://github.com/will-moore/openmicroscopy/commit/d538f29138c6729861a973386363d765560e913e this Phase 1 work can be considered done. It is time to merge with Ola's static file branch https://github.com/aleksandra-tarkowska/openmicroscopy/tree/feature/static_file_handling.

comment:5 Changed 12 years ago by wmoore

  • Description modified (diff)

comment:6 Changed 12 years ago by saloynton

Will: Can I just ask if you had decided on any further changes to indicate the the current position of the page you are on. I have attached a couple of modified screenshots from a previous discussion.

Changed 12 years ago by saloynton

Modified screenshot of Extending base_header.html, including webclient links - with 2 different options displayed.

comment:7 Changed 12 years ago by wmoore

Thanks Scott - Not thought about this much more just yet. It's one of those things that will 'icing on the cake' once we've got the main parts working. But good to keep in mind so we have some ideas when we get to that point. Cheers.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.68605 sec.)

We're Hiring!