kpac: added content integration
authorBill Erickson <berick@esilibrary.com>
Mon, 21 May 2012 18:32:39 +0000 (14:32 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 21 May 2012 18:32:39 +0000 (14:32 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/kpac/parts/addedcontent.tt2
Open-ILS/web/css/skin/default/kpac/style.css

index 6103703..27f4ded 100644 (file)
@@ -1,12 +1,12 @@
-<div class='item_detail_extras_tabs' style='width:98%; padding:5px;'> 
-
-[% 
+<a name='addedcontent'></a> <!-- for page focus -->
+<div class='item_detail_extras_tabs'>
+[%-
     ac_types = {
         reviews => l('Reviews'),
         anotes  => l('Author Notes'),
         toc     => l('Table of Contents'),
         excerpt => l('Excerpt'),
-        summary => l('Summary')
+        summary => l('Smmary')
     };
 
     selected_type = CGI.param('ac');
     # content, do not render the link if it's known to not have content.  If 
     # the content status is unknown, render the link, but hide the link via CSS
     # if dojo is enabled.  If dojo is not enabled, render and display the link.
-%]
+-%]
 
-    <div id='ac_tab_wrapper'>
-    [% 
+    [%- 
         all_hidden = 1;
         FOR type IN ac_types.keys;
-            tab_class = 'ac_tab';
-            SET tab_class = tab_class _ ' ac_tab_selected' IF type == selected_type; 
+            tab_class = '';
+            SET tab_class = 'ac_tab_selected' IF type == selected_type; 
             IF ctx.added_content.$type.status != '2'; # no content
                 all_hidden = 0;
                 IF ctx.added_content.$type.status == '3' AND want_dojo; # status unknown
                     tab_class = tab_class _ ' hidden';
                 END %]
-            <div class="[% tab_class %]" id="ac:[% type %]">
-                <a href="[% mkurl('', {ac => type}) _ '#addedcontent' %]">[% ac_types.$type %]</a>
-            </div>
+                <a class="[% tab_class %]" id="ac:[% type %]" href="[% mkurl('', {ac => type}) _ '#addedcontent' %]">[% ac_types.$type %]</a>
             [% END;
         END;
     %]
-    </div>
+    <div class="clear">&nbsp;</div>
+</div>
 
-    <div class='clear'></div>
+<div style='width:98%; padding:5px;'> 
     <div id='ac_content'>
         [% 
             IF selected_type; 
                 content = ctx.added_content.$selected_type.content;
-                '<hr/>';
                 IF content;
                     content;
                 ELSE;
index ba050ce..bc88132 100755 (executable)
@@ -620,8 +620,7 @@ input[type=text], input[type=password], textarea {
        background:#e3e3e3;\r
 }\r
 \r
-.item_detail_extras_tabs a,\r
-.item_detail_extras_tabs div.selected {\r
+.item_detail_extras_tabs a {\r
        display:block;\r
        float:left;\r
        padding:14px 35px;\r
@@ -631,8 +630,8 @@ input[type=text], input[type=password], textarea {
        margin-right:10px;\r
 }\r
 \r
-.item_detail_extras_tabs a.selected,\r
-.item_detail_extras_tabs div.selected {\r
+.item_detail_extras_tabs a.ac_tab_selected,\r
+.item_detail_extras_tabs div.ac_tab_selected {\r
        background:white;\r
        color:#424242;\r
 }\r