| 377 | |
| 378 | |
| 379 | Like what we did with Genshi, this scheme can be extended to support additional intermediate levels. We did that for the admin and the preference panels. |
| 380 | |
| 381 | Let's take for example the Logging admin panel, [source:cboos.git/trac/admin/templates/jadmin_logging.html jadmin_logging.html]: |
| 382 | {{{#!html+jinja |
| 383 | # extends "jadmin.html" |
| 384 | <html> |
| 385 | <head> |
| 386 | <title> |
| 387 | # block admintitle |
| 388 | Logging |
| 389 | # endblock admintitle |
| 390 | </title> |
| 391 | </head> |
| 392 | |
| 393 | <body> |
| 394 | # block adminpanel |
| 395 | ... |
| 396 | # block adminpanel |
| 397 | </body> |
| 398 | </html> |
| 399 | }}} |
| 400 | - it starts by extending the jadmin.html page |
| 401 | - then it provides the `<head>` and `<body>` elements specific to that panel, |
| 402 | more precisely the //admintitle// and //adminpanel// blocks (if some JavaScript |
| 403 | or other resources are needed, the //head// could be redefined as well) |
| 404 | |
| 405 | The [source:cboos.git/trac/admin/templates/jadmin.html@jinja2 jadmin.html] page |
| 406 | is similar to the jsearch.html page in that it extends the jlayout.html: |
| 407 | {{{#!html+jinja |
| 408 | # extends "jlayout.html" |
| 409 | <html> |
| 410 | <head> |
| 411 | <title> |
| 412 | # block title |
| 413 | Administration: |
| 414 | # block admintitle |
| 415 | # endblock admintitle |
| 416 | ${ super() } |
| 417 | # endblock |
| 418 | </title> |
| 419 | </head> |
| 420 | |
| 421 | <body> |
| 422 | # block content |
| 423 | <div id="content" class="admin"> |
| 424 | <h1>Administration</h1> |
| 425 | <div id="tabs"> |
| 426 | <div id="tabcontent"> |
| 427 | # block adminpanel |
| 428 | # endblock adminpanel |
| 429 | <br style="clear: right" /> |
| 430 | </div> |
| 431 | </div> |
| 432 | # endblock content |
| 433 | </body> |
| 434 | </html> |
| 435 | }}} |
| 436 | |
| 437 | //See [1df4e05c/cboos.git] for the full conversion of admin.html -> jadmin.html and admin_logging.html -> jadmin_logging.html.// |
| 438 | |