From 8c5d6e21d51563e90bf589bf3d7a34b4706322e8 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 21 Jun 2005 14:39:57 +0000 Subject: [PATCH] always updating html templates added an exception or to to ex.ttk (much more to come) git-svn-id: svn://svn.open-ils.org/ILS/trunk@888 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/templates/html/box | 28 ++++++++----- Open-ILS/src/templates/html/col | 1 + Open-ILS/src/templates/html/iframe | 4 +- Open-ILS/src/templates/html/row | 1 + Open-ILS/src/templates/opac/logic/page_router.ttk | 3 +- .../templates/opac/pages/chunks/body_header.ttk | 2 + Open-ILS/src/templates/opac/pages/chunks/init.ttk | 20 ++++++++- .../src/templates/opac/pages/chunks/status_bar.ttk | 4 ++ Open-ILS/src/templates/opac/pages/login.ttk | 1 + Open-ILS/src/templates/opac/pages/opac_start.ttk | 2 + .../src/templates/opac/pages/record_detail.ttk | 47 +++++++++++++--------- Open-ILS/src/templates/strings/ex.ttk | 3 ++ 12 files changed, 82 insertions(+), 34 deletions(-) diff --git a/Open-ILS/src/templates/html/box b/Open-ILS/src/templates/html/box index 4cbeb9c28f..0cfa9c8c71 100644 --- a/Open-ILS/src/templates/html/box +++ b/Open-ILS/src/templates/html/box @@ -1,10 +1,20 @@ -[%# html/bar: table containing a single row and a single cell - # ARGS: - # as per html/table, html/row and html/cell --%] -[% WRAPPER html/table; - WRAPPER html/row + html/cell width='' col=''; - content; - END; - END; +[% + ""; + content; + ""; %] + diff --git a/Open-ILS/src/templates/html/col b/Open-ILS/src/templates/html/col index f9b6e4ef77..3a1570c0af 100644 --- a/Open-ILS/src/templates/html/col +++ b/Open-ILS/src/templates/html/col @@ -6,6 +6,7 @@ IF class; " class='" _ class _ "'"; END; IF id; " id='" _ id _ "'"; END; IF style; " style='" _ style _ "'"; END; + IF nowrap; " nowrap='" _ nowrap _ "'"; END; ">"; IF content; content; END; diff --git a/Open-ILS/src/templates/html/iframe b/Open-ILS/src/templates/html/iframe index fb4bbb0594..a0aabe62fe 100644 --- a/Open-ILS/src/templates/html/iframe +++ b/Open-ILS/src/templates/html/iframe @@ -2,12 +2,12 @@ ""; %] diff --git a/Open-ILS/src/templates/html/row b/Open-ILS/src/templates/html/row index 9075dc993b..545bde8374 100644 --- a/Open-ILS/src/templates/html/row +++ b/Open-ILS/src/templates/html/row @@ -10,6 +10,7 @@ [%- IF col %] bgcolor="[% col %]"[% END %] [%- IF id %] id="[% id %]"[% END %] [%- IF align %] align="[% align %]"[% END %] + [%- IF class %] class="[% class %]"[% END %] [%- IF valign %] valign="[% valign %]"[% END %]> [%- content -%] diff --git a/Open-ILS/src/templates/opac/logic/page_router.ttk b/Open-ILS/src/templates/opac/logic/page_router.ttk index d51b8729b2..0da023244e 100644 --- a/Open-ILS/src/templates/opac/logic/page_router.ttk +++ b/Open-ILS/src/templates/opac/logic/page_router.ttk @@ -1,8 +1,9 @@ [% target = cgi.param("target"); + sub_frame = cgi.param("sub_frame"); - IF ! target; + IF ! target or sub_frame; INCLUDE opac/pages/main.ttk; ELSIF target == "start"; diff --git a/Open-ILS/src/templates/opac/pages/chunks/body_header.ttk b/Open-ILS/src/templates/opac/pages/chunks/body_header.ttk index d68753909c..9f5b0c76b6 100644 --- a/Open-ILS/src/templates/opac/pages/chunks/body_header.ttk +++ b/Open-ILS/src/templates/opac/pages/chunks/body_header.ttk @@ -3,6 +3,8 @@ INCLUDE opac/pages/chunks/opac_search_bar.ttk; WRAPPER html/div id='page_trail';END; + WRAPPER html/div id='deep_link_div';END; + lines(1); INCLUDE opac/pages/chunks/status_bar.ttk; diff --git a/Open-ILS/src/templates/opac/pages/chunks/init.ttk b/Open-ILS/src/templates/opac/pages/chunks/init.ttk index f8def67ae5..c1b4f7ba28 100644 --- a/Open-ILS/src/templates/opac/pages/chunks/init.ttk +++ b/Open-ILS/src/templates/opac/pages/chunks/init.ttk @@ -18,8 +18,12 @@ WRAPPER html/js; ' - if(parent) logicNode = parent; - else logicNode = window; + if(!parent || !parent.frames["appframe"]) { + /* redirect to the outer frame */ + location.href = location.href + "&sub_frame=1"; + } + + logicNode = parent; logicNode.paramObj = new Object(); '; FOR pname IN cgi.param(); @@ -63,6 +67,18 @@ globalAppFrame = window; globalPage = logicNode.globalPage; + setDeepLink(); + } + + function setDeepLink() { + var node = document.getElementById("deep_link_div"); + if(node) { + var a = document.createElement("a"); + a.setAttribute("href", location.href + "&sub_frame=1"); + a.setAttribute("target", "_blank"); + a.appendChild(document.createTextNode("Link to this page")); + node.appendChild(a); + } } '; END; diff --git a/Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk b/Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk index 43107b70ce..63497f56d6 100644 --- a/Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk +++ b/Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk @@ -1,4 +1,7 @@ [% + WRAPPER html/div; + + WRAPPER html/table + html/row id='top_status_bar' class='status_bar'; cell(id='now_searching_cell', class='now_searching_cell'); @@ -33,4 +36,5 @@ END; END; + END; %] diff --git a/Open-ILS/src/templates/opac/pages/login.ttk b/Open-ILS/src/templates/opac/pages/login.ttk index 96a932347a..33ebe7d8b3 100644 --- a/Open-ILS/src/templates/opac/pages/login.ttk +++ b/Open-ILS/src/templates/opac/pages/login.ttk @@ -13,6 +13,7 @@ globalPage.session.exp_days = "' _ global.config.session_timeout _ '"; globalPage.login_success_msg = "' _ tm.success _ '"; globalPage.login_failure_msg = "' _ tm.failure _ '"; + document.getElementById("login_username").focus(); '; # here, this just provides the color backdrop for the search bar diff --git a/Open-ILS/src/templates/opac/pages/opac_start.ttk b/Open-ILS/src/templates/opac/pages/opac_start.ttk index 63b8764afe..382eb5302c 100644 --- a/Open-ILS/src/templates/opac/pages/opac_start.ttk +++ b/Open-ILS/src/templates/opac/pages/opac_start.ttk @@ -57,6 +57,8 @@ PROCESS search_range; lines(3); + anchor( id='login_link', href='?target=login', text = "Login" ); + space(3); anchor( id='adv_search_link', href='?target=advanced_search', text = "Advanced Search" ); END; diff --git a/Open-ILS/src/templates/opac/pages/record_detail.ttk b/Open-ILS/src/templates/opac/pages/record_detail.ttk index 5edfe9a999..3f272fd3e2 100644 --- a/Open-ILS/src/templates/opac/pages/record_detail.ttk +++ b/Open-ILS/src/templates/opac/pages/record_detail.ttk @@ -27,61 +27,68 @@ WRAPPER html/box id='record_detail_main_box'; WRAPPER html/box id='detail_items_div'; + WRAPPER html/table id='record_detail_table'; - + WRAPPER html/row; - cell(content="Record Details", class="detail_header_cell"); + cell(content="Record Details", nowrap='nowrap', class="detail_header_cell"); cell(id='record_detail_view_marc', class="detail_header_cell"); + cell(id='record_detail_pic_cell', rowspan='10'); END; - WRAPPER html/row; - cell(content="Title"); + WRAPPER html/row class='detail_item_row'; + cell(content="Title", nowrap='nowrap', class='detail_item_label'); cell(id='record_detail_title_cell'); END; - WRAPPER html/row; - cell(content="Author"); + WRAPPER html/row class='detail_item_row'; + cell(content="Author", class='detail_item_label'); cell(id='record_detail_author_cell'); END; - WRAPPER html/row; - cell(content="ISBN"); + WRAPPER html/row class='detail_item_row'; + cell(content="ISBN", class='detail_item_label'); cell(id='record_detail_isbn_cell'); END; - WRAPPER html/row; - cell(content="Edition"); + WRAPPER html/row class='detail_item_row'; + cell(content="Edition", class='detail_item_label'); cell(id='record_detail_edition_cell'); END; - WRAPPER html/row; - cell(content="Publication Date"); + WRAPPER html/row class='detail_item_row'; + cell(content="Publication Date", class='detail_item_label'); cell(id='record_detail_pubdate_cell'); END; - WRAPPER html/row; - cell(content="Publisher"); + WRAPPER html/row class='detail_item_row'; + cell(content="Publisher", class='detail_item_label'); cell(id='record_detail_publisher_cell'); END; - WRAPPER html/row; - cell(content="Title Control Number"); + WRAPPER html/row class='detail_item_row'; + cell(content="Title Control Number", nowrap='nowrap', class='detail_item_label'); cell(id='record_detail_tcn_cell'); END; - WRAPPER html/row; - cell(content="Type of Resource"); + WRAPPER html/row class='detail_item_row'; + cell(content="Type of Resource", class='detail_item_label'); cell(id='record_detail_resource_cell'); END; - WRAPPER html/row; - cell(content="Subjects"); + WRAPPER html/row class='detail_item_row'; + cell(content="Subjects", class='detail_item_label'); cell(id='record_detail_subject_cell'); END; END; + END; + + lines(1); + box(id='record_detail_copy_info'); + END; END; # body diff --git a/Open-ILS/src/templates/strings/ex.ttk b/Open-ILS/src/templates/strings/ex.ttk index 39bcf7cadd..5ab1649736 100644 --- a/Open-ILS/src/templates/strings/ex.ttk +++ b/Open-ILS/src/templates/strings/ex.ttk @@ -30,4 +30,7 @@ IF type == ex_types.DUPLICATE_USER_USERNAME; ret("Username is a duplicate"); END; + IF type == ex_types.USER_WRONG_PASSWORD; + ret("Password is incorrect"); END; + -%] -- 2.11.0