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 13 years ago

Closed 13 years ago

Last modified 12 years ago

Templates: Phase I — at Version 5

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" />

Change History (9)

comment:1 Changed 13 years ago by wmoore

  • Status changed from new to accepted

comment:2 Changed 13 years ago by wmoore

  • Description modified (diff)

comment:3 Changed 13 years ago by jburel

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

Moved from sprint 2011-11-10 (2)

Changed 13 years ago by wmoore

Webclient with current-looking header

Changed 13 years ago by wmoore

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

Changed 13 years ago by wmoore

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

Changed 13 years ago by wmoore

Extending base_header.html, including webclient links.

comment:4 Changed 13 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)
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.70342 sec.)

We're Hiring!