#41 Use Templates everywhere

3.1
open
nobody
Other (15)
7
2002-05-24
2002-04-28
Jon Foster
No

Hi,

This bug report is just to stop duplication of effort.
Ignore if you're not working on the code right now.

The edit-actions-list CGI doesn't use a template for
the HTML used for the "Set to Cautious" and "Set to
Advanced" buttons. It should.

I have this change in my local sandbox, but I won't have
time to commit it until Monday evening - I need to
separate it from another change I'm working on.

(I've also changed the design of the edit actions UI as
a result of jzw's comments, but this needs some
discussion - I'll submit it as a patch for comments,
when I've done the code change mentioned above.)

Jon

Discussion

    • summary: Templatize "standard actions" buttons --> Templatize "standard actions" buttons
     
  • Logged In: YES
    user_id=78811

    Hi Jon,

    > The edit-actions-list CGI doesn't use a template for
    > the HTML used for the "Set to Cautious" and "Set to
    > Advanced" buttons. It should.

    Yes -- I had only added a FIXME to this effect
    because I thought that the extra template handling
    might be too risky to do before 3.0. But you're
    propably right and we should do it.

    Just note that there are many more (old & new)
    spots in the code where we use hardcoded HTML
    that ought to be replaced with line templates:

    actions.c:

    - line formatting in action_to_html and
    current_action_to_html (maybe both not
    worth templatizing)

    cgi.c:

    - menu items in make_menu
    - table in dump_map (not worth it)

    cgisimple.c:

    - extra parameters case in default_cgi (just removed)
    - "file open error" case in cgi_show_status (should
    be a map_conditional)
    - View / Edit button generation, in cgi_show_status
    - actions file name headers (with buttons), cells for
    matching actions and "none match" cell in
    cgi_show_url_info

    filters.c:

    - trust and trust-info list items in trust_url

    loadcfg.c: (not worth it, imho)

    - errors while reading config
    - config options in savearg

    I don't feel very strongly about whether to fix
    all these before 3.0, but if you'd prefer it done,
    just tell me which areas of the code are currently
    "locked" by you, so I can start on the rest.

    > (I've also changed the design of the edit actions UI as
    > a result of jzw's comments,

    Cool. I'm curious!

    --Andreas

     
  • Jon Foster
    Jon Foster
    2002-04-30

    • summary: Templatize "standard actions" buttons --> Templatize "standard actions" buttons
     
  • Jon Foster
    Jon Foster
    2002-04-30

    Logged In: YES
    user_id=199289

    Hi,

    > Yes -- I had only added a FIXME to this effect
    > because I thought that the extra template handling
    > might be too risky to do before 3.0.

    Yep, I agree that that was probably best.

    > Just note that there are many more (old & new)
    > spots in the code where we use hardcoded HTML
    > that ought to be replaced with line templates:

    > I don't feel very strongly about whether to fix
    > all these before 3.0,

    I'm not too fussed either way, but leaving it alone
    is less risky.

    However, in this specific case, ...

    >> (I've also changed the design of the edit actions UI
    >> as a result of jzw's comments,

    ... I was going to edit the template that was hard-coded
    into the C function. At that point it becomes easier
    to do it properly: templatize it once, and then all the UI
    changes are low-risk.

    Blue skies,

    Jon

     
  • Jon Foster
    Jon Foster
    2002-05-03

    Logged In: YES
    user_id=199289

    Hi,

    I've fixed the original bug. Leaving this open due to very
    useful list of other places needing fixing, that Andreas
    posted. Renaming.

    Retargeting and reprioritizing - the other changes are
    probably too risky for 3.0 (see my earlier comment).

    Jon

     
  • Jon Foster
    Jon Foster
    2002-05-03

    • assigned_to: jongfoster --> nobody
    • milestone: 123037 --> 188502
    • priority: 9 --> 7
    • summary: Templatize "standard actions" buttons --> Templatize "standard actions" buttons
     
  • Jon Foster
    Jon Foster
    2002-05-03

    • summary: Templatize "standard actions" buttons --> Use Templates everywhere
     
    • labels: 340257 -->
    • milestone: 188502 -->
     
    • labels: --> Other
    • milestone: --> 3.1