Changeset 7318

Show
Ignore:
Timestamp:
03/02/09 10:43:14 (17 months ago)
Author:
josowski
Message:

Article Page Redesign, this changeset has four parts

1 - Article Level Metrics
2 - Fetch Article refactor
3 - Article Page redesign with new tabbed interface
4 - A new context based annotation menu

FetchArticle? no longer requires a chain of action classes in struts. The fetchArticle action now handles all the calls needed to the service tier to populate the freemarker template. There are regular expressions in the urlrewrite.xml file to handle these new action classes

Moved certain common functions from the ratings action classes to the articleOTMService. Moved a function from the abstract rating class to the rating service class.

TODO: Remove / refactor abstract rating action class as there are NO abstract methods.

References #1115

Location:
head/ambra
Files:
13 added
1 removed
26 modified

Legend:

Unmodified
Added
Removed
  • head/ambra/journals/journal-overlay/src/main/resources/struts/journals/overlayJournal/css/screen.css

    r7234 r7318  
    33 * $Id$ 
    44 * 
    5  * Copyright (c) 2006-2008 by Topaz, Inc. 
     5 * Copyright (c) 2006-2009 by Topaz, Inc. 
    66 * http://topazproject.org 
    77 * 
     
    2020/*      ------------------------------------------------------------- 
    2121 
    22         GLOBAL STYLE SHEET FOR : Overlay Journal 
     22        GLOBAL STYLE SHEET FOR : Ambra Journal 
    2323        CREATED ON  : 08-26-2006 
    2424        CREATED BY      : MARGARET SHEAR 
     
    3131 
    3232html            { margin: 0 0 1px 0; min-height: 100%; /* set margin and height to eliminate the scroll bar page shift on mozilla and safari */ background: transparent url(../images/html_bg.gif) 0 0 repeat-x; } /*changed background color to transparent to partially fix IE7 repaint bug of homepage body background image -SWT */ 
    33 body            { font: 82.5% Verdana, Arial, Helvetica, sans-serif; color: #00131D; margin: 0; border-bottom: 6px solid #202020; min-height: 100%; } 
    34 a:link          { color: #369; text-decoration: underline; } 
    35 a:visited       { color: #66c; } 
    36 a:hover         { color: #39f; text-decoration: none;} 
     33body            { font: 82.5% Verdana, Arial, Helvetica, sans-serif; color: #303030; margin: 0; border-bottom: 6px solid #202020; min-height: 100%; } 
     34a:link          { color: #c60; text-decoration: underline; } 
     35a:visited       { color: #a25100; } 
     36a:hover         { color: #f60; text-decoration: none;} 
    3737a:active        { } 
    3838:active, :focus { outline-style: none; -moz-outline-style:none; } 
     
    6565dd                      { margin: 0; } 
    6666table           { margin: 20px; border: none;} 
    67 th                      { padding: 6px; color:#fff; background-color: #666; border: 4px solid #FFF; border-width: 0 3px 3px 0; font-weight: bold;} 
    68 td                      { padding: 6px; background-color: #ccc; border: 4px solid #FFF; border-width: 0 3px 3px 0; } 
     67th                      { padding: 6px; background-color: #fdae7a; border: 4px solid #FFF; border-width: 0 3px 3px 0; font-weight: bold;} 
     68td                      { padding: 6px; background-color: #fcd3b8; border: 4px solid #FFF; border-width: 0 3px 3px 0; } 
    6969/* Default Headings */ 
    7070h1, h2, h3      { font-family: Georgia, "Times New Roman", Times, serif; color: #333; /*position: relative; Note: this was causing links in floated articleMenu to be covered up and unclickable in Firefox2 */ } 
     
    8080---------------------------------------------------------- 
    8181*/ 
    82 .noshow { line-height:0; } /* can be applied to elements that need to be present in the flow but not impact vertical spacing, e.g. in-page anchors */ 
    83 .clearer  { clear:both; line-height:0; } 
     82.noshow { display:block; height:0px; line-height:0em; } /* can be applied to elements that need to be present in the flow but not impact vertical spacing, e.g. in-page anchors */ 
     83.clearer  { clear:both; line-height:0; height:0; display:none; } 
     84.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 
     85.clearfix { zoom:1; } /*zoom allows self-clearing floats to work in IE*/ 
    8486 
    8587/* Global : Icons and Links 
     
    9193a.trackback:visited, 
    9294a.rating:visited, 
    93 a.annotation:visited,    
     95a.annotation:visited, 
    9496a.user:visited, 
    9597a.instructions:visited, 
    9698a.addannotation:visited, 
    97 a.corrections:visited { color: #369; } 
     99a.corrections:visited { color: #c60; } 
    98100 
    99101a.tooltip, 
     
    110112 
    111113a.rating      { padding: 0 0 2px 5px; border: none; background: transparent; } 
    112 h6 a.rating { font-size: .9em; } 
    113114 
    114115/* portions of this icon set have been adapted Mark Jame's Silk icon set available under a Creative Commons Attribution 2.5 license at http://www.famfamfam.com/lab/icons/silk/ */ 
     
    185186div.pane div.post a:hover       { background-color: #393; } 
    186187 
    187 /* div.rating div.close a { border-left: 2px solid #069; border-bottom: 2px solid #069;} */ 
     188/* div.rating div.close a { border-left: 2px solid #c60; border-bottom: 2px solid #c60;} */ 
    188189 
    189190/* Main Container: Main Menu : Elements 
     
    194195#container                      { position: relative; } 
    195196#container, #hdr        { margin: 0 auto; min-width: 675px; max-width: 930px; } 
    196 #content                        { margin: 50px 4px 50px 22px; line-height: 1.8em; font-size: .9em; } 
     197#content                        { margin: 30px 4px 50px 22px; line-height: 1.8em; font-size: .9em; } 
    197198 
    198199/* Horizontal Advertising Banners : Top & Bottom Slots 
     
    215216div#hdr                         { height: 150px; position: relative; z-index: 997;} 
    216217#hdr #logo                      { background: transparent url(../images/hdr_logo.gif) no-repeat top left; color: #039; } 
    217 #hdr #logo                      { width: 501px; height: 128px; position: absolute; top: 26px; left: 8px; margin: 0; font-size: 1.6em; } 
     218#hdr #logo                      { width: 501px; height: 128px; position: absolute; top: 16px; left: 8px; margin: 0; font-size: 1.6em; } 
    218219#hdr #logo a            { width: 300px; height: 90px; display: block; position:relative; } 
    219220#hdr #logo span, 
     
    232233ul#nav          { font-size: .85em; height:1.9em; margin: 0; padding: 0; position: absolute; bottom: 0; left: 14px; top:129px; list-style-type: none; z-index: 800; width: 100%; } 
    233234ul#nav li       { float: left; position: relative; list-style-type: none; margin: 0; padding: 0; } 
    234 #nav li a,  
     235#nav li a, 
    235236#nav li a:visited 
    236237                        { font-weight: bold;display:block; text-decoration:none; width: auto; padding: 5px .6em .1em .6em; float:left; height: 1.6em; line-height:normal; color:#fff; } 
    237238#nav li li      { width: 100%; position: relative; z-index: 802;} 
    238239#nav li ul      { visibility:hidden; position:absolute; top:1.5em; left:0; height:0; overflow:hidden; text-align: left; margin: 0; padding: 0; background-color: #fff; z-index: 801;} 
    239 /* first line style for IE7 and non-IE browsers and the second line for IE5.5 and IE6 */ 
     240/*#nav table    { margin:-1px; border-collapse:collapse; } what table? -SWT */ 
     241/* fist line style for IE7 and non-IE browsers and the second line for IE5.5 and IE6 */ 
    240242/* Note that class li.over is dynamically written into html from init_navigation.js -SWT */ 
    241243#nav li.over a, 
    242244#nav li:hover a, 
    243 #nav li a:hover                                 { background-color: #369; color: #FFF!important; } 
     245#nav li a:hover                                 { background-color: #c60; color: #FFF!important; } 
    244246#nav li.over ul, 
    245247#nav li:hover ul, 
    246 #nav li a:hover ul                              { visibility:visible; display:block; height:auto; width:16.6em; top:2.1em; overflow:visible; border: 1px solid #369;} 
     248#nav li a:hover ul                              { visibility:visible; display:block; height:auto; width:16.6em; top:2.1em; overflow:visible; border: 1px solid #c60;} 
    247249 
    248250#nav li.over li a, 
    249251#nav li:hover ul li a, 
    250 #nav li a:hover ul li a                 { display:block; font-weight:normal!important; background:transparent; text-decoration:none; height:auto; line-height: 1.5em;padding:0.2em 0.2em 0.2em 0.6em; width:15.8em; border-top: 0; color: #369!important; } 
     252#nav li a:hover ul li a                 { display:block; font-weight:normal!important; background:transparent; text-decoration:none; height:auto; line-height: 1.5em;padding:0.2em 0.2em 0.2em 0.6em; width:15.8em; border-top: 0; color:#c60!important; } 
    251253 
    252254#nav li.over ul li a:hover, 
    253255#nav li:hover ul li a:hover, 
    254 #nav li a:hover ul li a:hover   { border-top: 0; color: #369!important; background-color: #fff;text-decoration: underline;} 
     256#nav li a:hover ul li a:hover   { border-top: 0; color:#c60!important; background-color: #fff;text-decoration: underline;} 
    255257#nav li.journalnav                              { float: right; margin-right: 14px;} 
    256258 
    257259 
    258260/* Search Dashboard */ 
    259 #db { padding: 0; text-align: center; font-size: .8em; position: absolute; top: 50px; right: -20px; padding: 0; border-width: 0; color: #888; background: url(../images/db_bg.gif) no-repeat top left; padding: 8px 15px 10px 11px;} 
     261#db                     { padding: 0; text-align: center; font-size: .8em; position: absolute; top: 50px; right: -20px; padding: 0; border-width: 0; color: #888; background: url(../images/db_bg.gif) no-repeat top left; padding: 8px 15px 10px 11px;} 
    260262#db fieldset    { padding: 0; margin: 0; background-color: transparent; vertical-align: top; width: 327px; border: none; } 
    261263#db fieldset div{ position: relative; } 
     
    293295#user ul li { list-style-type: none;display: inline; } 
    294296#user li a:link, 
    295 #user li a:visited      { padding: 0; margin-left:0 2px; text-decoration: none;} 
     297#user li a:visited      { padding: 0; margin:0 2px; text-decoration: none; } 
    296298#user a:link, 
    297 #user a:visited {  color: #369!important; } 
     299#user a:visited {  color: #c60!important; } 
    298300#hdr #user a:hover { text-decoration: underline; } 
    299301 
     
    317319div#ftr ul              { margin: 0; padding: 0; list-style-type: none; } 
    318320div#ftr ul li   { margin: 0 5px; display: inline; } 
    319 /*div#ftr ul a, div#ftr ul a:visited { color: #c00;}*/ 
    320321div#ftr img     { margin: 0 10px -8px 10px; display: inline; } 
    321322div#ftr p               { margin: 0 0 10px 0; padding: 10px; background-color: #FFF; border-bottom: 1px solid #003956; white-space: nowrap; } 
    322 div#ftr p span  { display: inline; background: #FFF url(../images/user_ftr_cc_logo.png) no-repeat left center; padding: 8px 8px 8px 25px; } 
     323div#ftr p span  { display: inline; background-color:#fff; padding: 8px 8px 8px 25px; } 
    323324div#ftr div.powered { background-color: #202020; color: #bbb; font-size: .9em; padding: 10px 0 4px 0; letter-spacing: .03em; margin-top: 10px; border-top: 1px solid #fff;} 
    324325div.powered a:link, 
    325 div.powered a:visited, 
    326 div.powered a:hover { color: #ccc; font-weight: bold;} 
     326div.powered a:visited { color: #fff; font-weight: bold; } 
     327div.powered a:hover { text-decoration:none; } 
    327328 
    328329/* Research Article : Elements 
    329330----------------------------------------------------------= 
    330331*/ 
    331 div#rhc                 { float: right; width: 240px; position: relative; } 
     332 
     333/*TEMP STYLE: suppresses 2nd instance of research article title on the article page*/ 
     334div#articleMenu + h1 { display:none; } 
     335 
     336/* article page tabs */ 
     337div.horizontalTabs      { position:relative; border:0; margin-top:15px; padding:0; background:transparent; width:100%; } 
     338div.horizontalTabs:after  { content:"."; display: block; height:0; clear:left; visibility:hidden; } 
     339/*div#articleContainer div#researchArticle*/ ul#tabsContainer  { float:left;  margin:0!important; padding:0 0 0 10px!important; /* "!important" required for IE7 */ line-height:normal; background:transparent url("../images/tab_bg.gif") repeat-x bottom; width:640px; } 
     340ul#tabsContainer ul { margin:0; padding:10px 10px 0; } 
     341ul#tabsContainer li             { cursor:pointer; float:left; background:url("../images/tab_left.gif") no-repeat 0% 0%; margin:0 2px; padding:0 0 0 8px; list-style:none; font-size:.9em; font-weight:bold; color:#666; } 
     342ul#tabsContainer li a { display:block; float:left; background:url("../images/tab_right.gif") no-repeat 100% 0%;  padding:8px 16px 8px 8px!important; /* "!important" required for IE7 */ color:#666; text-decoration:none; } 
     343ul#tabsContainer li a:hover { color:#f60 } 
     344ul#tabsContainer li.active { background-position:0% -40px; } 
     345ul#tabsContainer li.active a { background-position:100% -40px; padding-bottom: 9px!important; } 
     346 
     347div#rhc                 { float: right; width: 240px; position: relative; margin-top:8px; } 
     348div.browse div#rhc { padding:0; } 
    332349div.content     { margin-right: 255px; } 
    333350 
     
    338355 
    339356div.static h1, 
    340 div.search h1           { padding-top: 10px; border-top: 6px solid #666; } 
    341 div.pageerror h1        { background-color: #666; color:#fff; padding: 8px;} 
     357div.search h1           { padding-top: 10px; border-top: 6px solid #f60; } 
     358div.pageerror h1        { background-color: #f60; color:#fff; padding: 8px;} 
    342359div.pageerror p         { margin-left: 8px; } 
    343360div.content h2  { /* article sub-title */ margin: 10px 0; font-style: italic; font-size: 1.5em; background: none; padding: 0;} 
     
    377394div.content dd p { margin:0; } 
    378395 
    379 div#contentHeader { /* open access image */ position: relative; top:0; height:34px; margin:0; background:#666 url(../images/content_oa.gif) no-repeat 100% 0; } 
     396div#contentHeader { /* open access image */ position: relative; top:0; height:34px; margin:0; background:#c60 url(../images/content_oa.gif) no-repeat 100% 0; } 
    380397div#contentHeader p { margin: 0; padding:0; text-indent: -9999px; } 
    381398div#contentHeader p#articleType { text-transform:uppercase; text-indent:7px; margin-top:-13px; font-weight:bold; color:#fff; background-color:transparent; } 
    382399 
    383 div#publisher { border-bottom:1px dashed #369; background-color:#fff; } /* background color allows bottom border to display in IE6 */ 
     400div#publisher { border-bottom:1px dashed #c60; background-color:#fff; } /* background color allows bottom border to display in IE6 */ 
    384401div#publisher p { margin:0 0 2px 0; } 
    385402div#publisher p a { font-weight:bold; font-style:italic; } 
     
    389406ol.references a.find { font-size: .9em; text-transform: uppercase; font-weight: bold; margin-left: 4px;} 
    390407 
    391 p.oa-banner             { margin: 0; padding: 5px 0;font-size: .85em; border-bottom: 8px solid #069; color: #666; } 
     408p.oa-banner             { margin: 0; padding: 5px 0;font-size: .85em; border-bottom: 8px solid #c60; color: #666; } 
    392409p.authors               { margin: 10px 0 0 0; font-weight: bold; font-size: 1.1em; } 
    393410p.affiliations  { font-size: .85em; margin: 0; } 
     
    401418div.abstract h3 { font-size: 1.3em; margin: 20px 0 0 0; padding:0; border-bottom:0; color: #333; font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; } 
    402419span.pullquote  { font-size: 2em; line-height: 1em; width: 55%; padding: 10px; float: right; letter-spacing: -.05em; font-style: italic; margin: 5px; } 
    403 div.box { color: #000; margin:10px 0; padding: 10px; background-color: #efefef; } 
     420div.box                 { color: #000; padding: 10px; background-color: #fcd3b8; margin: 10px 0; } 
    404421div.content div.box h3, 
    405422div.content div.box h4 { margin:0; } 
     
    407424 
    408425/* Menu next to article title containing download links, print link, etc. */ 
    409 div#articleMenu { float:right; width:165px!important; margin:10px 0 20px 10px; padding:0 0 12px 10px; background:#fff; } 
    410 div#articleMenu ul { list-style-type:none; margin:0 15px 0 0; padding:0; background:none; position:static!important; } /* position:static fixes display issues in IE6 */ 
    411 div#articleMenu ul li { border-bottom: 1px solid #ccc; margin:0; padding:1px 0; font-size:.85em; background:none; } 
    412 div#articleMenu ul li a:link, 
    413 div#articleMenu ul li a:visited { background-color:transparent; background-position:5% 50%; background-repeat:no-repeat; padding:2px 0 2px 25px; color:#666; text-decoration:none; } 
    414 div#articleMenu ul li a:hover { text-decoration:underline; color:#f00; } 
    415  
    416 /* Related articles at top of right column on article pages */ 
    417 dl#relatedArticles { margin:0 0 20px 0; padding:9px 0 .5em 0; border-bottom:1px solid #666; background-color:#fff; } 
    418 dl#relatedArticles dt { font-size:1em; color:#303030; margin-bottom:.5em; } 
    419 dl#relatedArticles dd { line-height:1.2em; margin-bottom:.5em; } 
    420 dl#relatedArticles dd a:link, 
    421 dl#relatedArticles dd a:visited { font-size:.95em; text-decoration:none; } 
    422 dl#relatedArticles dd a:hover { text-decoration:underline; } 
    423  
    424 #rhc ul li a, 
    425 #rhc ul li a:visited    { display: block; font-size: .85em; padding: 0 5px; text-decoration: none; color: #333; } 
    426 #rhc ul li a, 
    427 #rhc ul li a:visited    { background-color: transparent; background-position: 5% 50%; background-repeat: no-repeat; padding:1px 0 2px 0; padding-left:30px; border-bottom: 1px solid #ccc; margin: 0 3px; } 
    428 #rhc ul li a:hover              { background-color: #ddd; color: #000;} 
    429 #rhc ul li a.last               { border-bottom-width: 0; } 
    430 #rhc ol li a.commentary { background-image: none; display:block; margin-top:5px; padding: 2px 0 2px 0; font-weight: bold; } 
    431 #rhc ol li a.corrections { display:inline; background-position:left 0%; } 
    432 /* Valid use of child selector to hide these from IE6 which doubles bottom margin. Results in no bottom margin display for IE6 */  
    433 div#rhc > div#sideNav > div#postcomment > div.commentview > ol > li > a.corrections, 
    434 div#rhc > div#sideNav > div#postcommentfloat > div.commentview > ol > li > a.corrections/*for Safari*/ { display:block; margin-bottom:5px; background-position:left 0.2em; } 
    435  
    436 ul#dcCount1 { margin-bottom:5px; } /* increases spacing below note and comment counts to help block view/join discussion section */ 
     426div.content div#articleMenu { float:right; width:200px; margin:18px 0 0 15px; padding-bottom:15px; background:#fcd3b8 url(../images/articleMenu_btm.gif) no-repeat bottom left; font-size:0.9em; zoom:1; } 
     427div.content div#articleMenu div.wrap { background:#fcd3b8 url(../images/articleMenu_top.gif) no-repeat top left; margin-bottom:8px; padding-top:8px; zoom:1; } 
     428div.content div#articleMenu p { margin-bottom:0; padding:0 8px 0 23px; } 
     429div.content div#articleMenu ul { margin:0; padding:0 8px 0 23px; position:static!important; } /* position:static fixes display issues in IE6 */ 
     430div.content div#articleMenu ul li { background-image:none; padding:2px 0; line-height:1.5em; } 
     431div.content div#articleMenu ul li.annotation, 
     432div.content div#articleMenu ul li.discuss { background-position:0 2px; background-repeat:no-repeat; padding-left:18px; } 
     433div.content div#articleMenu ul li.annotation    { background-image: url(../images/icon_annotation.gif); } 
     434div.content div#articleMenu ul li.discuss       { background-image: url(../images/icon_discuss.gif); } 
     435 
     436/* Related articles in right column on article pages */ 
     437div#sideNav dl.related { margin:0 0 20px 0; padding:9px 0 .5em 0; border-bottom:1px solid #999; background-color:#fff; } 
     438div#sideNav dl.related dt { font-size:1em; text-transform:uppercase; color:#303030; margin-bottom:.5em; } 
     439div#sideNav dl.related dt em { text-transform:none; font-style:normal } 
     440div#sideNav dl.related dd { line-height:1.2em; margin-bottom:.5em; } 
     441div#sideNav dl.related dd a:link, 
     442div#sideNav dl.related dd a:visited { font-size:.95em; text-decoration:none; } 
     443div#sideNav dl.related dd a:hover { text-decoration:underline; } 
     444 
     445/* Right column on article pages */ 
     446#rhc { font-size:0.9em; line-height:1.5em; } 
     447#rhc h6 { font-size:1em; } 
     448#rhc h6 a.info { display:inline-block; background:url(../images/button_info.png) no-repeat bottom left; text-indent:-9999px; height:15px; width:14px; } 
     449#rhc p { margin:3px 5px 5px 5px; } 
     450#rhc div.rhcBox_type1 { margin-bottom:18px; padding-bottom:8px; background:#fcd3b8 url(../images/rhcBox_btm.gif) no-repeat bottom left; zoom:1; } 
     451#rhc div.rhcBox_type1 div.wrap { background:#fcd3b8 url(../images/rhcBox_top.gif) no-repeat top left; padding-top:8px; } 
     452#rhc div.rhcBox_type2 { margin-bottom:8px; border:1px solid #bababa; } 
     453#rhc div.rhcBox_type2 h6 { margin:0; padding:1px 5px; color:#fff; background-color:#cc6600; } 
     454#rhc div.rhcBox_type2 div.more { text-align:right; margin:bottom:0; } 
     455#rhc div.rhcBox_type2 div.more a { display:block; float:right; background:transparent url(../images/rhcBox_more.gif) no-repeat top left; width:4em; text-decoration:none; font-weight:bold; line-height:2em; padding:0 5px 0 0; text-align:right; } 
     456#rhc div.rhcBox_type2 div.more > a { float:right; text-align:right; }  /* for non-IE6 browers */ 
     457 
     458#rhc div#download ul, 
     459#rhc div#share ul  { margin:0 5px 0 8px; padding:0; } 
     460#rhc div#download ul li, 
     461#rhc div#share ul { background-image:none; padding:2px 0; line-height:1.8em; list-style-type:none; } 
     462#rhc div#download ul li.download, 
     463#rhc div#download ul li.print, 
     464#rhc div#share ul li.email, 
     465#rhc div#share ul li.twitter { background-position:0 3px; background-repeat:no-repeat; padding-left:21px; } 
     466#rhc div#download ul li.download        { background-image: url(../images/icon_download.gif); } 
     467#rhc div#download ul li.print   { background-image: url(../images/icon_print.gif); } 
     468#rhc div#share ul li.email { background-image: url(../images/icon_email.gif); } 
     469#rhc div#share ul li.twitter  { background-image: url(../images/icon_twitter.gif); } 
     470#rhc div#share div.bookmarklets { display:inline-block; } 
     471#rhc div#share li.bookmarklets { height:2em; margin-top:3px; } 
     472#rhc div#share li.bookmarklets div { display:inline-block; } 
     473#rhc div#share li.bookmarklets img, 
     474#rhc div#share li.bookmarklets iframe { margin-bottom:-0.3em; } /*iframe for digg.com bookmarklet*/ 
    437475 
    438476/* correction article type styles */ 
     
    441479/* correction note types, header, and associated page styles */ 
    442480div#discussionContainer div.corrections td.title { background-color: #fff4f0; }/* "correction" name space conflict: see line #393 above and line #594 below. Resolved by using "corrections". */ 
    443 div#discussionContainer div.corrections div.original div.hd h3 { text-indent:20px; color:#ff0000; }  
     481div#discussionContainer div.corrections div.original div.hd h3 { text-indent:20px; color:#ff0000; } 
    444482 
    445483div.corrections td.title a, 
     
    450488div.fch p.fch, 
    451489div.corrections td.title a, 
     490a.corrections, 
    452491div#discussionContainer div.corrections div.original div.hd h3 { background:url(../images/icon_correction.gif) left 0% no-repeat; } 
    453492div.fch p.fch { margin:8px 8px 0; text-indent:20px; } 
     
    458497div.fch ol li p a:visited { font-weight:normal; color:#004e9c; } 
    459498 
    460  
    461 /* rhc rounded containers : top */ 
    462 div.links, 
    463 div.tools                               { background-position: bottom; background-repeat: no-repeat; padding: 0 0 8px 0; margin: 0 0 6px 0; } 
    464 div.links                               { background-image: url(../images/sidenav_bg.gif); position: relative;} 
    465 div.tools                               { background-image: url(../images/tools_bg.gif);} 
    466  
    467  
    468 /* rhc rounded containers : bottom */ 
    469 div.links ul, 
    470 div.tools ul                    { background-repeat: no-repeat; background-position: top; padding: 8px 0 0 0; margin: 0; list-style-type: none; } 
    471 div.links ul                    { background-image: url(../images/sidenav_bg.gif);} 
    472 div.tools ul                    { background-image: url(../images/tools_bg.gif); padding-bottom: 2px;} 
    473 div.links li 
    474 div.tools li                    { list-style-type: none; margin: 0; padding: 0; }                                
    475  
    476 /* rhc square box */ 
    477 div.rhcBox { position:relative; top:0pt; width:240px; border:3px solid #999999; margin:0; padding:0; } 
    478  
    479 div.commentview                 { padding: 5px; border: 3px solid #999; margin: 8px 0; background: url(../images/toolbar_bg.gif) repeat-x top;} 
    480 div.commentview div#ratingAverages { border: 1px solid #ccc; border-width: 1px 0; margin: 5px -5px; padding: 10px; background-color: #eee; position: relative; width:214px; } 
    481 div.commentview  li     { font-size: .9em; } 
    482 div.commentview h6, 
    483 div.rhcBox h6 { margin: 0; } 
    484 div.commentview ol, 
    485 div.commentview li              { margin: 0; padding: 0; list-style-type: none; } 
    486 div.commentview  div#ratingAverages li  { font-weight: bold; position: relative; } 
    487 div.commentview label   { font-weight: normal; } 
    488 div.commentview li ul   { margin: 0; padding: 0; list-style-type: none; } 
    489 div.commentview li ul li        { background: url(../images/tools_li.gif) no-repeat 0 2px; font-weight: bold; padding-left: 14px; margin-left: 20px; font-size: 1em; color: #666;} 
     499div#ratingRhc1 { margin-bottom:5px;} 
     500div#ratingRhc1 ol, 
     501div#ratingRhc1 li { margin:0; padding:0; list-style-type: none; } 
     502div#rhc div#ratingRhc1 h6 { font-weight:bold; margin-top:2px; margin-bottom:3px; color:#303030; background-color:transparent; } /*when the Impact tab is put in and the ratings box becomes part of the Impact box, this header should be changed to a h7 or p*/ 
     503div#ratingRhc1 div#ratingAverages li    { font-weight: bold; position: relative; } 
     504div#ratingRhc1 label { font-weight: normal; } 
     505div#ratingRhc1 a.rating { white-space:nowrap; } 
     506div#ratingRhc1 div#ratingAverages { background-color:#EEEEEE; border-color:#CCCCCC; border-style:solid; border-width:1px 0; margin:3px 0; padding:10px;} 
    490507 
    491508ol.ratingAvgs { padding: 0; margin: 0; } 
    492509ol.ratingAvgs, 
    493510ol.ratingAvgs ul { list-style: none; } 
    494 ol.ratingAvgs li { padding: 0 0 0 10px; margin: 0; height: 2em; }  
    495 ol.ratingAvgs label {  } 
    496 ol.ratingAvgs ul { left: 8em; top: -2em;} 
     511ol.ratingAvgs li { padding: 0 0 0 10px; margin: 0; height: 2em;} 
    497512ol.ratingAvgs li ul li { display: inline; background: none; margin: 0; padding: 0; width: auto;} 
    498  
    499 #postcomment, #postcommentfloat { width: 240px; top: 0; position: relative; } 
    500 #postcommentfloat { position: fixed; display: none; } 
    501 .fixed { position: fixed !important; } 
    502  
    503 #sectionNav ul li a, 
    504 #sectionNavTop ul li a, 
    505 #sectionNavTopFloat ul li a, /* sectionNavTopFloat style is for Safari only*/ 
    506 #sectionNav ul li a:visited, 
    507 #sectionNavTop ul li a:visited, 
    508 #sectionNavTopFloat ul li a:visited { padding-right:5px; background: transparent url(../images/sectionnav_li_bg.gif) no-repeat 5% .7em; border-color: #999;} 
    509  
    510 #sectionNav                     { width: 240px; top: 20px; background-color: #FFF; position: fixed; /* hide temporarily until js is implemented */ display: none; } 
    511  
    512513 
    513514div.buttons                             { margin: 6px 0; padding: 0; background: url(../images/buttons_bg.gif) no-repeat; background-position: 0 -32px; position: relative;} 
     
    520521 
    521522 
    522 div.figure                              { background-color: #efefef; padding: 10px; font-size: .85em; margin: 10px 0;} 
     523div.figure                              { background-color: #fcd3b8; padding: 10px; font-size: .85em; margin: 10px 0;} 
    523524div.figure:after                { content: ".";  display: block;  height: 0; clear: both; visibility: hidden; } 
    524525div.figure h5                   { float:none; margin: 0; color: #000;} 
     
    526527#content div.figure img.thumbnail       { margin: 0 10px 10px 0; float: left;} /* only thumbnails will float, not in-line images */ 
    527528div.figure a img.thumbnail              { border: 2px solid #FFF; } /* only thumbnails will float, not in-line images */ 
    528 div.figure a:hover img  { border: 2px solid #069; } 
     529div.figure a:hover img  { border: 2px solid #c60; } 
    529530 
    530531span.equation          { width: 100%; margin: 20px 0; font-weight: bold; font-size: .85em; text-align: right; padding: 0 10px; } 
     
    539540a.bug, 
    540541a:visited.bug { 
    541   position:relative;  
     542  position:relative; 
    542543        top:-5px; 
    543544  margin-right:2px; 
    544545        padding:1px 11px 1px 4px; 
    545         color:#fff;  
    546   text-decoration:none;  
    547   font-size:.85em;  
     546        color:#fff; 
     547  text-decoration:none; 
     548  font-size:.85em; 
    548549        font-weight:bold; 
    549550  background:url(../images/annotation_bug.gif) top right no-repeat; 
     
    595596 
    596597/* ------ User Profile Page Styles ------*/ 
    597 div#content.profile     { border: 2px solid #666; border-width: 2px 0; background: #e8e8e8 url(../images/forms_bg.gif) repeat-x top; padding: 20px 0; width: 70%; margin-left: auto; margin-right: auto; position: relative;} 
     598div#content.profile     { border: 2px solid #f90; border-width: 2px 0; background: #fcd3b8 url(../images/forms_bg.gif) repeat-x top; padding: 20px 0; width: 70%; margin-left: auto; margin-right: auto; position: relative;} 
    598599div.profile img { float: left; margin: 20px 0 0 20px;} 
    599600div.profile h1  { position: absolute; left: 120px; margin: 0; padding-bottom: 10px; padding-top: 10px;top: 60px;} 
    600601div.profile h2  { background-image: none; clear: left; } 
    601602div.profile ol { list-style-type: none; margin: 25px 0px 0px; padding: 0px; clear: left; padding-top: 20px; } 
    602 div.profile ol li { list-style: none; display: block; padding: 0 20px 10px 20px; padding-left: 20px; border-bottom-color: #ccc; border-bottom-style: solid;border-bottom-width: 2px; background-color: transparent; background-image: none; padding-top: 5px; clear: both; } 
     603div.profile ol li { list-style: none; display: block; padding: 0 20px 10px 20px; padding-left: 20px; border-bottom-color: #b8f0a9; border-bottom-style: solid;border-bottom-width: 2px; background-color: transparent; background-image: none; padding-top: 5px; clear: both; } 
    603604div.profile li em{ color: #555; font-size: .9em;} 
    604605div.profile ol li span.heading{ font-weight: bold; display: block; } 
    605 div.profile ol li input { width: 200px; border: 1px solid #ACF1FF; padding: 2px; } 
    606 div.profile ol li .long-input { width: 324px; }  
    607 div.profile ol li select { width: 206px; border: 1px solid #ACF1FF; padding: 2px; } 
     606div.profile ol li input { width: 200px; border: 1px solid #fdae7a; padding: 2px; } 
     607div.profile ol li .long-input { width: 324px; } 
     608div.profile ol li select { width: 206px; border: 1px solid #fdae7a; padding: 2px; } 
    608609div.profile ol li .radio { width: 14px;} 
    609610div.profile ol li .checkbox { width: 14px;} 
    610 div.profile textarea {width: 324px; border: 1px solid #ACF1FF; } 
     611div.profile textarea {width: 324px; border: 1px solid #fdae7a; } 
    611612div.profile #submit, .pone-form #cancel {margin-top: 15px; margin-left: 10px; } 
    612  
    613 div.horizontalTabs              { position: relative; border-width: 0;} 
    614 .horizontalTabs ul, 
    615 .horizontalTabs ul li   { list-style-type: none; margin: 0; padding: 0; font-weight: bold; color: #069;} 
    616 .horizontalTabs ul              { display: block; margin-bottom: 5px; z-index: 10; border-bottom: 2px solid #ACF1FF; } 
    617 .horizontalTabs ul li   { cursor: pointer; padding: 6px; background-color: transparent; margin: 5px 2px 3px 2px; display: inline; } 
    618 .horizontalTabs ul li.active    { font-weight: bold;background: url(../images/forms_bg.gif) repeat-x bottom; border-bottom-color: #fff; text-decoration: none; color: #000;} 
    619 .horizontalTabs .contentwrap {margin: 0; border: 2px solid #fff; padding: 0;position: relative; } 
    620613 
    621614/* ------ EdBoard Styles ----*/ 
    622615.edboard dl { text-align: right; margin: 0 240px 0 0; } 
    623616.edboard dt { font-weight: bold; display: block; float: left; padding-left: 5px; margin-top: 5px; position: relative;} 
    624 .edboard dd { margin: 0 0 5px 0; padding: 0 5px 5px 5px; background-color: #D2F7FF; border-top: 6px solid #D2F7FF; font-size: .85em; text-indent: 10px; } 
    625  
    626 .static p.intro, 
    627 .static div.intro 
    628 { border: 2px solid #ccc; padding: 10px; background: url(../images/toolbar_bg.gif) repeat-x bottom; color: #000;} 
    629 .static div.intro { margin:10px 0; padding-top:0 } 
     617.edboard dd { margin: 0 0 5px 0; padding: 0 5px 5px 5px; background-color: #fcd3b8; border-top: 6px solid #fcd3b8; font-size: .85em; text-indent: 10px; } 
     618 
     619.static p.intro                                 { border: 2px solid #ccc; padding: 10px; background: url(../images/toolbar_bg.gif) repeat-x bottom; color: #000;} 
    630620 
    631621/* ------ Search Styles ----*/ 
     
    643633div.source                      { padding: 0; font-size: 1.3em; font-weight:bold; margin: 10px 0; } 
    644634div.source a.article{ background-image: url(../images/icon_source.gif); background-position: 0 4px;padding-left: 20px;display: block; font-family:Georgia,"Times New Roman",Times,serif; text-decoration: none;  border-bottom: 1px solid #ccc; } 
    645 div.source a:visited { color:#369; } 
    646 div.source a:hover      { color:#39f; text-decoration:underline; } 
     635div.source a:visited { color:#c60; } 
     636div.source a:hover      { color:#f60; text-decoration:underline; } 
    647637div.source a:hover span.inline-rating { text-decoration:none; background-color:#fff; } 
    648638/* span wraps original article label */ 
     
    681671 
    682672/*--- Browse by TOC and Journal Archive ---*/ 
    683 p#issueNav { margin:0; padding:0; position:relative; top:-12px } 
    684 div.toc div#rhc { padding-top:0; } 
     673p#issueNav { margin:0; padding:0; position:relative; font-size:0.9em; } 
     674p#issueNav a:link, 
     675p#issueNav a:visited { text-decoration:none; } 
     676p#issueNav a:hover { text-decoration:underline; } 
     677div.toc div#rhc { margin-top:-9px; padding-top:0; } 
    685678div.toc div#rhc div#floatMarker { line-height:0; margin:0; padding:0; display:none; } /* see floatingMenu.js */ 
    686679div.toc h1, 
    687 div.archive h1  { width:99%; margin-bottom: 20px; padding-top: 10px; border-top: 6px solid #666; } 
     680div.archive h1  { width:99%; margin-bottom: 20px; padding-top: 10px; border-top: 6px solid #f60; } 
    688681div#issueImage { margin:30px 0 15px 0; } 
    689682div#issueImage h4 { display:inline; font-size:0.9em; font-style:italic; font-family:Verdana, Arial, Helvetica, sans-serif; margin:0; padding:0; } 
     
    700693div.toc #search-results { margin-top:0; padding:0; } 
    701694div.toc h2, 
    702 div.archive h2  { margin:15px 0 0 0; font-size:170%; font-style:normal; border-bottom:1px solid #666 } 
     695div.archive h2  { margin:15px 0 0 0; font-size:170%; font-style:normal; border-bottom:1px solid #c60 } 
    703696div.toc div.article { margin-bottom:20px; padding-bottom:10px; border-bottom:1px solid #ccc; background:white; } /* white background allows bottom border to render in IE6 - wierd */ 
    704697div.toc h3, 
     
    712705div.toc dl.related dt, 
    713706div.toc dl.related dd { margin-bottom:.2em; font-size:.9em; line-height:1.5em; } 
    714 div.toc dl.related dt { color:#666 } 
     707div.toc dl.related dt { float:none; color:#666 } 
    715708div.toc dl.related dt em { font-style:normal } 
    716709 
  • head/ambra/journals/journal-plosone/src/main/resources/struts/journals/plosone/article/browse.ftl

    r5568 r7318  
    101101          <span class="date">Published ${art.date?string("dd MMM yyyy")}</span> 
    102102          <@s.url id="fetchArticleURL" action="fetchArticle" namespace="/article" articleURI="${art.id}" includeParams="none"/> 
    103           <span class="article"><@s.a href="%{fetchArticleURL}" title="Read Open Access Article">${art.title}</@s.a></span> 
     103          <span class="article"><@s.a href="%{fetchArticleURL}" title="Read Open Access Article"><@articleFormat>${art.title}</@articleFormat></@s.a></span> 
    104104          <span class="authors"> 
    105105            <#list art.authors as auth><#if auth_index gt 0>, </#if>${auth}</#list> 
  • head/ambra/journals/journal-plosone/src/main/resources/struts/journals/plosone/global/global_topbanner.ftl

    r6066 r7318  
    3838<!-- begin : left banner slot --> 
    3939<div class="left"> 
    40   <iframe frameborder="0" scrolling="no" width="468px" height="60px" marginheight="0" marginwidth="0" src="http://comparenetworks.com/partnerAds/IFrameAd.aspx?adid=0&adtypeid=2&siteid=35&subsiteid=0&pagetypeid=0&pageid=0&subpageid=0"> 
     40  <iframe frameborder="0" scrolling="no" width="468px" height="60px" marginheight="0" marginwidth="0" id="compareNetworksBanner"> 
    4141  </iframe> 
    4242</div> 
  • head/ambra/libs/js/src/main/scripts/ambra.profile.js

    r6338 r7318  
    1111        "dijit.layout.TabContainer", 
    1212        "dojox.data.dom", 
     13        "ambra.alm", 
    1314        "ambra.general", 
    1415        "ambra.domUtil", 
     
    2223        "ambra.annotation", 
    2324        "ambra.corrections", 
     25        "ambra.displayAnnotationContext", 
    2426        "ambra.displayComment", 
    2527        "ambra.responsePanel", 
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/article/action/FetchArticleAction.java

    r7298 r7318  
    1919package org.topazproject.ambra.article.action; 
    2020 
    21 import java.net.URI; 
    22 import java.util.ArrayList; 
    23 import java.util.Set; 
     21import org.topazproject.ambra.action.BaseSessionAwareActionSupport; 
     22import org.topazproject.ambra.model.article.ArticleInfo; 
     23import org.topazproject.ambra.model.article.ArticleType; 
     24import org.topazproject.ambra.rating.service.RatingsService; 
     25import org.topazproject.ambra.article.service.BrowseService; 
     26import org.topazproject.ambra.article.service.ArticleOtmService; 
     27import org.topazproject.ambra.article.service.NoSuchArticleIdException; 
     28import org.topazproject.ambra.article.service.FetchArticleService; 
     29import org.topazproject.ambra.journal.JournalService; 
     30import org.topazproject.ambra.models.Journal; 
     31import org.topazproject.ambra.models.Article; 
     32import org.topazproject.ambra.models.Retraction; 
     33import org.topazproject.ambra.models.ArticleAnnotation; 
     34import org.topazproject.ambra.models.MinorCorrection; 
     35import org.topazproject.ambra.models.FormalCorrection; 
     36import org.topazproject.ambra.ApplicationException; 
     37import org.topazproject.ambra.annotation.service.AnnotationService; 
     38import org.topazproject.ambra.annotation.service.WebAnnotation; 
     39import org.topazproject.ambra.annotation.service.AnnotationConverter; 
     40import org.topazproject.ambra.annotation.service.ReplyService; 
     41import org.topazproject.ambra.annotation.Commentary; 
     42import org.springframework.beans.factory.annotation.Required; 
     43import org.springframework.transaction.annotation.Transactional; 
    2444 
    2545import org.apache.commons.logging.Log; 
    2646import org.apache.commons.logging.LogFactory; 
    2747 
    28 import org.springframework.beans.factory.annotation.Required; 
    29 import org.springframework.transaction.annotation.Transactional; 
    30  
    31 import org.topazproject.ambra.action.BaseActionSupport; 
    32 import org.topazproject.ambra.annotation.service.AnnotationService; 
    33 import org.topazproject.ambra.article.service.BrowseService; 
    34 import org.topazproject.ambra.article.service.FetchArticleService; 
    35 import org.topazproject.ambra.article.service.NoSuchArticleIdException; 
    36 import org.topazproject.ambra.article.service.ArticleOtmService; 
    37 import org.topazproject.ambra.journal.JournalService; 
    38 import org.topazproject.ambra.model.article.ArticleInfo; 
    39 import org.topazproject.ambra.model.article.ArticleType; 
    40 import org.topazproject.ambra.models.Article; 
    41 import org.topazproject.ambra.models.ArticleAnnotation; 
    42 import org.topazproject.ambra.models.FormalCorrection; 
    43 import org.topazproject.ambra.models.Journal; 
    44 import org.topazproject.ambra.models.MinorCorrection; 
    45 import org.topazproject.ambra.models.Retraction; 
     48import java.net.URI; 
     49import java.util.Set; 
     50import java.util.ArrayList; 
     51import java.util.Arrays; 
    4652 
    4753import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator; 
    4854 
    4955/** 
    50  * Fetch article action. 
     56 * This class fetches the information from the service tier for the artcle 
     57 * Tabs.  Common data is defined in the setCommonData.  One method is defined 
     58 * for each tab. 
     59 * 
     60 * Freemarker builds rest like URLs, inbound and outbound as 
     61 * defined in the /WEB-INF/urlrewrite.xml file. These URLS then map to the 
     62 * methods are referenced in the struts.xml file. 
     63 * 
     64 * ex: http://localhost/article/related/info%3Adoi%2F10.1371%2Fjournal.pone.0299 
     65 * 
     66 * Gets rewritten to: 
     67 * 
     68 * http://localhost/fetchRelatedArticle.action&articleURI=info%3Adoi%2F10.1371%2Fjournal.pone.0299 
     69 * 
     70 * Struts picks this up and translates it call the FetchArticleRelated method 
     71 * ex: <action name="fetchRelatedArticle" 
     72 *    class="org.topazproject.ambra.article.action.FetchArticleAction" 
     73 *    method="FetchArticleRelated"> 
     74 *  
    5175 */ 
    52 @SuppressWarnings("serial") 
    53 public class FetchArticleAction extends BaseActionSupport { 
     76public class FetchArticleAction extends BaseSessionAwareActionSupport { 
     77  private static final Log log = LogFactory.getLog(FetchArticleAction.class); 
     78  private final ArrayList<String> messages = new ArrayList<String>(); 
     79 
    5480  private String articleURI; 
     81  private String transformedArticle; 
    5582  private String annotationId = ""; 
    5683 
    57   private final ArrayList<String> messages = new ArrayList<String>(); 
    58   private static final Log log = LogFactory.getLog(FetchArticleAction.class); 
    59   private BrowseService browseService; 
    60   private FetchArticleService fetchArticleService; 
    61   private ArticleOtmService articleOtmService; 
    62   private JournalService journalService; 
    63   private Set<Journal> journalList; 
     84  private int numDiscussions = 0; 
     85  private int numMinorCorrections = 0; 
     86  private int numComments = 0; 
     87  private int numFormalCorrections = 0; 
     88  private int numRetractions = 0; 
     89 
     90  private boolean isResearchArticle; 
     91  private boolean hasRated; 
     92 
     93  private ArticleInfo articleInfoX; 
    6494  private Article articleInfo; 
    6595  private ArticleType articleType; 
    66   private ArticleInfo articleInfoX; 
    67   private String transformedArticle; 
    68   // Displayed article type (assigned default) 
    69   private final String articleTypeHeading = "Research Article"; 
     96  private Commentary[] commentary; 
     97 
     98  private ReplyService replyService; 
     99  private AnnotationConverter annotationConverter; 
     100  private FetchArticleService fetchArticleService; 
    70101  private AnnotationService annotationService; 
    71   private int numDiscussions = 0; 
    72   private int numMinorCorrections = 0; 
    73   private int numFormalCorrections = 0; 
    74   private int numRetractions = 0; 
    75   /** 
    76    * Represents the number of notes that are not corrections from  a UI stand point 
    77    */ 
    78   private int numComments = 0; 
    79  
    80  
    81   @Override 
     102  private BrowseService browseService; 
     103  private JournalService journalService; 
     104  private RatingsService ratingsService; 
     105  private ArticleOtmService articleOtmService; 
     106 
     107  private Set<Journal> journalList; 
     108  private RatingsService.AverageRatings averageRatings; 
     109 
     110  /** 
     111   * Fetch common data the article HTML text 
     112   * @return "success" on succes, "error" on error 
     113   */ 
    82114  @Transactional(readOnly = true) 
    83   public String execute() { 
     115  public String FetchArticle() { 
    84116    try { 
    85       setTransformedArticle(fetchArticleService.getURIAsHTML(articleURI)); 
    86  
    87       ArticleAnnotation anns[] = annotationService.listAnnotations(articleURI, null); 
    88       // Tally the total number of each type of correction. 
    89       for (ArticleAnnotation a : anns) { 
    90         if (a.getContext() == null) { 
    91           numDiscussions ++; 
    92         } else { 
    93           if (a instanceof MinorCorrection) { 
    94             numMinorCorrections++; 
    95           } else if (a instanceof FormalCorrection) { 
    96             numFormalCorrections++; 
    97           } else if (a instanceof Retraction) { 
    98             numRetractions++; 
    99           } else { 
    100             numComments++; 
    101           } 
    102         } 
    103       } 
    104  
    105       Article artInfo = articleOtmService.getArticle(URI.create(articleURI)); 
    106  
    107       setArticleInfo(artInfo); 
    108  
    109       articleType = ArticleType.getDefaultArticleType(); 
    110       for (URI artTypeUri : artInfo.getArticleType()) { 
    111         if (ArticleType.getKnownArticleTypeForURI(artTypeUri)!= null) { 
    112           articleType = ArticleType.getKnownArticleTypeForURI(artTypeUri); 
    113           break; 
    114         } 
    115       } 
    116  
    117       // get the alternate ArticleInfo, e.g. contains RelatedArticles 
    118       articleInfoX = browseService.getArticleInfo(URI.create(articleURI)); 
    119  
    120       journalList  = journalService.getJournalsForObject(URI.create(articleURI)); 
     117      setCommonData(); 
     118 
     119      transformedArticle = fetchArticleService.getURIAsHTML(articleURI); 
     120 
    121121    } catch (NoSuchArticleIdException e) { 
    122122      messages.add("No article found for id: " + articleURI); 
     
    132132 
    133133  /** 
    134    * A struts Action method used to display the annotated article.  
    135    * The transformedArticle field is populated with the annotated articleURI content.  
    136    *  
    137    * @return Annotated Article XML String 
     134   * Fetch common data and annotations 
     135   * @return "success" on succes, "error" on error 
    138136   */ 
    139137  @Transactional(readOnly = true) 
    140   public String displayAnnotatedArticle() { 
     138  public String FetchArticleComments() { 
    141139    try { 
    142       setTransformedArticle(fetchArticleService.getAnnotatedContent(articleURI)); 
     140      setCommonData(); 
     141      setAnnotations(annotationService.COMMENT_SET); 
     142 
     143    } catch (NoSuchArticleIdException e) { 
     144      messages.add("No article found for id: " + articleURI); 
     145      log.info("Could not find article: " + articleURI, e); 
     146      return ERROR; 
    143147    } catch (Exception e) { 
    144       log.error ("Could not get annotated article:" + articleURI, e); 
     148      messages.add(e.getMessage()); 
     149      log.error("Error retrieving article: " + articleURI, e); 
    145150      return ERROR; 
    146151    } 
     
    149154 
    150155  /** 
    151    * @return transformed output 
    152    */ 
    153   public String getTransformedArticle() { 
    154     return transformedArticle; 
    155   } 
    156  
    157   private void setTransformedArticle(final String transformedArticle) { 
    158     this.transformedArticle = transformedArticle; 
     156   * Fetch common data and article corrections 
     157   * @return "success" on succes, "error" on error 
     158   */ 
     159  @Transactional(readOnly = true) 
     160  public String FetchArticleCorrections() { 
     161    try { 
     162      setCommonData(); 
     163      setAnnotations(annotationService.CORRECTION_SET); 
     164 
     165    } catch (NoSuchArticleIdException e) { 
     166      messages.add("No article found for id: " + articleURI); 
     167      log.info("Could not find article: " + articleURI, e); 
     168      return ERROR; 
     169    } catch (Exception e) { 
     170      messages.add(e.getMessage()); 
     171      log.error("Error retrieving article: " + articleURI, e); 
     172      return ERROR; 
     173    } 
     174    return SUCCESS; 
     175  } 
     176 
     177  /** 
     178   * Fetches common data and nothing else 
     179   * @return "success" on succes, "error" on error 
     180   */ 
     181  @Transactional(readOnly = true) 
     182  public String FetchArticleRelated() { 
     183    try { 
     184      setCommonData(); 
     185 
     186    } catch (NoSuchArticleIdException e) { 
     187      messages.add("No article found for id: " + articleURI); 
     188      log.info("Could not find article: " + articleURI, e); 
     189      return ERROR; 
     190    } catch (Exception e) { 
     191      messages.add(e.getMessage()); 
     192      log.error("Error retrieving article: " + articleURI, e); 
     193      return ERROR; 
     194    } 
     195    return SUCCESS; 
     196  } 
     197 
     198  /** 
     199   * Sets up data used by the right hand column in the freemarker templates 
     200   * 
     201   * @throws ApplicationException when there is an error talking to the OTM 
     202   * @throws NoSuchArticleIdException when the article can not be found 
     203   */ 
     204  private void setCommonData() throws ApplicationException, NoSuchArticleIdException { 
     205    articleInfoX = browseService.getArticleInfo(URI.create(articleURI)); 
     206    averageRatings = ratingsService.getAverageRatings(articleURI); 
     207    journalList  = journalService.getJournalsForObject(URI.create(articleURI)); 
     208    isResearchArticle = articleOtmService.isResearchArticle(articleURI); 
     209    hasRated = ratingsService.hasRated(articleURI, getCurrentUser()); 
     210 
     211    ArticleAnnotation anns[] = annotationService.listAnnotations(articleURI, null); 
     212 
     213    //Tally the total number of each type of correction 
     214    for (ArticleAnnotation a : anns) { 
     215      if (a.getContext() == null) { 
     216        numDiscussions++; 
     217      } else { 
     218        if (a instanceof MinorCorrection) { 
     219          numMinorCorrections++; 
     220        } else if (a instanceof FormalCorrection) { 
     221          numFormalCorrections++; 
     222        } else if (a instanceof Retraction) { 
     223                numRetractions++; 
     224        } else { 
     225          numComments++; 
     226        } 
     227      } 
     228    } 
     229 
     230    Article artInfo = articleOtmService.getArticle(URI.create(articleURI)); 
     231    artInfo.getCategories(); 
     232 
     233    this.articleInfo = artInfo; 
     234 
     235    articleType = ArticleType.getDefaultArticleType(); 
     236    for (URI artTypeUri : artInfo.getArticleType()) { 
     237      if (ArticleType.getKnownArticleTypeForURI(artTypeUri)!= null) { 
     238        articleType = ArticleType.getKnownArticleTypeForURI(artTypeUri); 
     239        break; 
     240      } 
     241    } 
     242  } 
     243 
     244  /** 
     245   * Grabs annotations from the service tier 
     246   * @param annotationTypeClasses The type of annotation to grab. 
     247   */ 
     248  private void setAnnotations(Set<Class<? extends ArticleAnnotation>> annotationTypeClasses) { 
     249    WebAnnotation[] annotations = 
     250        annotationConverter.convert(annotationService.listAnnotations(articleURI, annotationTypeClasses), true, false); 
     251 
     252    commentary = new Commentary[annotations.length]; 
     253    Commentary com; 
     254 
     255    if (annotations.length > 0) { 
     256      for (int i = 0; i < annotations.length; i++) { 
     257        com = new Commentary(); 
     258        com.setAnnotation(annotations[i]); 
     259 
     260        try { 
     261          annotationConverter.convert(replyService.listAllReplies(annotations[i].getId(), 
     262                                                        annotations[i].getId()), com, false, 
     263                                                         false); 
     264        } catch (SecurityException t) { 
     265          // don't error if you can't list the replies 
     266          com.setNumReplies(0); 
     267          com.setReplies(null); 
     268        } 
     269        commentary[i] = com; 
     270      } 
     271      Arrays.sort(commentary, new Commentary.Sorter()); 
     272    } 
    159273  } 
    160274 
    161275  /** Set the fetch article service 
     276   * @param articleOtmService ArticleOtmService 
     277   */ 
     278  @Required 
     279  public void setArticleOtmService(ArticleOtmService articleOtmService) { 
     280    this.articleOtmService = articleOtmService; 
     281  } 
     282 
     283    /** Set the fetch article service 
    162284   * @param fetchArticleService fetchArticleService 
    163285   */ 
     
    167289  } 
    168290 
    169   /** Set the fetch article service 
    170    * @param articleOtmService ArticleOtmService 
    171    */ 
    172   @Required 
    173   public void setArticleOtmService(ArticleOtmService articleOtmService) { 
    174     this.articleOtmService = articleOtmService; 
    175   } 
     291  /** 
     292   * @param browseService The browseService to set. 
     293   */ 
     294  @Required 
     295  public void setBrowseService(BrowseService browseService) { 
     296    this.browseService = browseService; 
     297  } 
     298 
     299  @Required 
     300  public void setReplyService(final ReplyService replyService) { 
     301    this.replyService = replyService; 
     302  } 
     303 
     304  @Required 
     305  public void setAnnotationConverter(AnnotationConverter annotationConverter) { 
     306    this.annotationConverter = annotationConverter; 
     307  } 
     308 
     309  /** 
     310   * Set the ratings service. 
     311   * 
     312   * @param ratingsService the ratings service 
     313   */ 
     314  @Required 
     315  public void setRatingsService(final RatingsService ratingsService) { 
     316    this.ratingsService = ratingsService; 
     317  } 
     318 
     319  /** 
     320   * @param annotationService The annotationService to set. 
     321   */ 
     322  @Required 
     323  public void setAnnotationService(AnnotationService annotationService) { 
     324    this.annotationService = annotationService; 
     325  } 
     326 
     327  /** 
     328   * @param journalService The journalService to set. 
     329   */ 
     330  @Required 
     331  public void setJournalService(JournalService journalService) { 
     332    this.journalService = journalService; 
     333  } 
     334 
    176335 
    177336  /** 
     
    191350  } 
    192351 
    193   public ArrayList<String> getMessages() { 
    194     return messages; 
    195   } 
    196  
    197   /** 
    198    * @return Returns the annotationId. 
    199    */ 
    200   public String getAnnotationId() { 
    201     return annotationId; 
    202   } 
    203  
    204   /** 
    205    * @param annotationId The annotationId to set. 
    206    */ 
    207   public void setAnnotationId(String annotationId) { 
    208     this.annotationId = annotationId; 
    209   } 
    210  
    211   /** 
    212    * @return Returns the annotationService. 
    213    */ 
    214   public AnnotationService getAnnotationService() { 
    215     return annotationService; 
    216   } 
    217  
    218   /** 
    219    * @param annotationService The annotationService to set. 
    220    */ 
    221   public void setAnnotationService(AnnotationService annotationService) { 
    222     this.annotationService = annotationService; 
    223   } 
    224  
    225   /** 
    226    * @return Returns the numDiscussions. 
    227    */ 
    228   public int getNumDiscussions() { 
    229     return numDiscussions; 
    230   } 
    231  
    232   /** 
    233    * @return Returns the numComments. 
    234    */ 
    235   public int getNumComments() { 
    236     return numComments; 
    237   } 
    238  
    239   /** 
    240    * @return Returns the numMinorCorrections. 
    241    */ 
    242   public int getNumMinorCorrections() { 
    243     return numMinorCorrections; 
    244   } 
    245  
    246   /** 
    247    * @return Returns the numFormalCorrections. 
    248    */ 
    249   public int getNumFormalCorrections() { 
    250     return numFormalCorrections; 
    251   } 
    252  
    253   /** 
    254    * Zero if this Article has not been retracted.  One if this Article has been retracted. 
    255    * Having multiple Retractions for a single Article does not make sense. 
    256    * 
    257    * @return Returns the number of Retractions that have been associated to this Article. 
    258    */ 
    259   public int getNumRetractions() { 
    260     return numRetractions; 
    261   } 
    262  
    263   /** 
    264    * @return Returns the calculated number of notes. 
    265    */ 
    266   public int getNumNotes() { 
    267     return numComments + numMinorCorrections + numFormalCorrections + numRetractions; 
    268   } 
    269  
    270   /** 
    271    * @return Returns the total number of corrections. 
    272    */ 
    273   public int getNumCorrections() { 
    274     return numMinorCorrections + numFormalCorrections + numRetractions; 
     352  /** 
     353   * @return transformed output 
     354   */ 
     355  public String getTransformedArticle() { 
     356    return transformedArticle; 
    275357  } 
    276358 
     
    291373 
    292374  /** 
    293    * @return Returns the articleInfo. 
     375   * @return Returns the annotationId. 
     376   */ 
     377  public String getAnnotationId() { 
     378    return annotationId; 
     379  } 
     380 
     381  /** 
     382   * @param annotationId The annotationId to set. 
     383   */ 
     384  public void setAnnotationId(String annotationId) { 
     385    this.annotationId = annotationId; 
     386  } 
     387 
     388  /** 
     389   * Get the article object 
     390   * @return Returns article. 
    294391   */ 
    295392  public Article getArticleInfo() { 
     
    298395 
    299396  /** 
    300    * The article type displayed by article_content.ftl as per #693 
    301    * 
    302    * @return the article type heading 
    303    */ 
    304   public String getArticleTypeHeading() { 
    305     return articleTypeHeading; 
    306   } 
    307  
    308   /** 
    309    * @param articleInfo The articleInfo to set. 
    310    */ 
    311   private void setArticleInfo(Article articleInfo) { 
    312     this.articleInfo = articleInfo; 
    313   } 
    314  
    315   /** 
    316    * @param journalService The journalService to set. 
    317    */ 
    318   @Required 
    319   public void setJournalService(JournalService journalService) { 
    320     this.journalService = journalService; 
     397   * Gets the article Type 
     398   * @return Returns articleType 
     399   */ 
     400  public ArticleType getArticleType() { 
     401    return articleType; 
     402  } 
     403 
     404  public ArrayList<String> getMessages() { 
     405    return messages; 
    321406  } 
    322407 
     
    329414 
    330415  /** 
    331    * @param browseService The browseService to set. 
    332    */ 
    333   @Required 
    334   public void setBrowseService(BrowseService browseService) { 
    335     this.browseService = browseService; 
    336   } 
    337  
    338   public ArticleType getArticleType() { 
    339     return articleType; 
     416   * Tests if this article has been rated by the current user 
     417   * 
     418   * @return Returns the hasRated. 
     419   */ 
     420  public boolean getHasRated() { 
     421    return hasRated; 
     422  } 
     423 
     424  /** 
     425   * @return the isResearchArticle 
     426   */ 
     427  public boolean getIsResearchArticle() { 
     428    return isResearchArticle; 
     429  } 
     430 
     431  /* 
     432  * Gets averageRatings info 
     433  * 
     434  * @return returns averageRatings info 
     435  * */ 
     436  public RatingsService.AverageRatings getAverageRatings() 
     437  { 
     438    return averageRatings; 
     439  } 
     440 
     441  /** 
     442   * Get the total number of user comments 
     443   * @return total number of user comments 
     444   */ 
     445  public int getTotalComments() 
     446  { 
     447    return numDiscussions + numComments + numMinorCorrections + numFormalCorrections + numRetractions; 
     448  } 
     449 
     450  /** 
     451   * Zero if this Article has not been retracted.  One if this Article has been retracted. 
     452   * Having multiple Retractions for a single Article does not make sense. 
     453   * 
     454   * @return Returns the number of Retractions that have been associated to this Article. 
     455   */  
     456  public int getNumRetractions() { 
     457    return numRetractions; 
     458  } 
     459 
     460  /** 
     461   * @return Returns the numDiscussions. 
     462   */ 
     463  public int getNumDiscussions() { 
     464    return numDiscussions; 
     465  } 
     466 
     467  /** 
     468   * @return Returns the numComments. 
     469   */ 
     470  public int getNumComments() { 
     471    return numComments; 
     472  } 
     473 
     474  /** 
     475   * @return Returns the numMinorCorrections. 
     476   */ 
     477  public int getNumMinorCorrections() { 
     478    return numMinorCorrections; 
     479  } 
     480 
     481  /** 
     482   * @return Returns the numFormalCorrections. 
     483   */ 
     484  public int getNumFormalCorrections() { 
     485    return numFormalCorrections; 
     486  } 
     487 
     488  /** 
     489   * @return The commentary array 
     490   */ 
     491  public Commentary[] getCommentary() { 
     492    return commentary; 
    340493  } 
    341494} 
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/article/service/ArticleOtmService.java

    r7197 r7318  
    2727import java.util.Date; 
    2828import java.util.List; 
     29import java.util.Set; 
     30import java.util.Iterator; 
    2931 
    3032import javax.activation.DataSource; 
     
    3840import org.springframework.transaction.annotation.Transactional; 
    3941 
     42import org.topazproject.ambra.ApplicationException; 
     43import org.topazproject.ambra.cache.Cache; 
     44import org.topazproject.ambra.rating.action.ArticleRatingSummary; 
    4045import org.topazproject.ambra.models.Article; 
    4146import org.topazproject.ambra.models.ObjectInfo; 
    4247import org.topazproject.ambra.models.Representation; 
     48import org.topazproject.ambra.models.RatingSummary; 
     49import org.topazproject.ambra.models.Rating; 
     50import org.topazproject.ambra.models.UserAccount; 
     51import org.topazproject.ambra.models.Trackback; 
     52import org.topazproject.ambra.models.Category; 
     53import org.topazproject.ambra.model.article.ArticleType; 
    4354import org.topazproject.ambra.permission.service.PermissionsService; 
    4455import org.topazproject.otm.Session; 
    4556import org.topazproject.otm.Query; 
     57import org.topazproject.otm.OtmException; 
     58import org.topazproject.otm.criterion.Restrictions; 
     59import org.topazproject.otm.criterion.Order; 
    4660import org.topazproject.otm.query.Results; 
    4761 
     
    5367public class ArticleOtmService { 
    5468  private static final Log log = LogFactory.getLog(ArticleOtmService.class); 
     69  private static final String TRACK_BACKS_KEY = "Trackbacks-"; 
    5570 
    5671  private String smallImageRep; 
     
    6176  private Session session; 
    6277  private PermissionsService permissionsService; 
     78  private Cache articleAnnotationCache; 
    6379  private Configuration configuration; 
    6480 
     
    394410   * @param articleIds  list of article id's 
    395411   * @return <code>List&lt;Article&gt;</code> of articles requested 
    396    * @throws ParseException 
    397    */ 
    398   @Transactional(readOnly = true) 
    399   public List<Article> getArticles(List<String> articleIds) throws ParseException { 
     412   * @throws ParseException  when article ids are invalid 
     413   * @throws OtmException when session.get fails. 
     414   */ 
     415  @Transactional(readOnly = true) 
     416  public List<Article> getArticles(List<String> articleIds) throws OtmException,ParseException { 
    400417    List<Article> articleList = new ArrayList<Article>(); 
    401418    for (String id : articleIds) 
     
    466483    return convertedObjectInfos; 
    467484  } 
     485 
     486  /** 
     487   * Determines if the articleURI is of type researchArticle 
     488   * @param articleURI The URI of the article 
     489   * @return True if the article is a research article 
     490   * @throws ApplicationException if there was a problem talking to the OTM 
     491   * @throws NoSuchArticleIdException When the article does not exist 
     492   */ 
     493  public boolean isResearchArticle(String articleURI) 
     494    throws ApplicationException, NoSuchArticleIdException { 
     495    // resolve article type and supported properties 
     496    Article artInfo = getArticle(URI.create(articleURI)); 
     497    ArticleType articleType = ArticleType.getDefaultArticleType(); 
     498 
     499    for (URI artTypeUri : artInfo.getArticleType()) { 
     500      if (ArticleType.getKnownArticleTypeForURI(artTypeUri) != null) { 
     501        articleType = ArticleType.getKnownArticleTypeForURI(artTypeUri); 
     502        break; 
     503      } 
     504    } 
     505 
     506    if (articleType == null) { 
     507      throw new ApplicationException("Unable to resolve article type for: " + articleURI); 
     508    } 
     509    return ArticleType.isResearchArticle(articleType); 
     510  }   
    468511 
    469512  /** 
     
    513556  } 
    514557 
     558  /** 
     559   * Get rating summaries for the passed in articleURI  
     560   * 
     561   * @param articleURI articleURI to get rating summaries for 
     562   * @return List<RatingSummary> of rating Summaries 
     563   */ 
     564  @Transactional(readOnly = true) 
     565  public List<RatingSummary> getRatingSummaries(URI articleURI) { 
     566    /* assume if valid RatingsPEP.GET_RATINGS, OK to GET_STATS 
     567     * RatingSummary for this Article 
     568     */ 
     569    return session.createCriteria(RatingSummary.class).add( 
     570        Restrictions.eq("annotates", articleURI)).list(); 
     571  } 
     572 
     573  /** 
     574   * Get article rating summaries for the passed in articleURI 
     575   * 
     576   * @param articleURI articleURI to get rating summaries for 
     577   * @return List<ArticleRatingSummary> of rating Summaries 
     578   */ 
     579  @Transactional(readOnly = true) 
     580  public List<ArticleRatingSummary> getArticleRatingSummaries(URI articleURI) 
     581  { 
     582    List<ArticleRatingSummary> articleRatingSummaries = new ArrayList<ArticleRatingSummary>(); 
     583 
     584    List<Rating> articleRatings = session.createCriteria(Rating.class).add( 
     585        Restrictions.eq("annotates", articleURI)).addOrder(new Order("created", true)).list(); 
     586 
     587    // create ArticleRatingSummary(s) 
     588    for (Rating rating : articleRatings) { 
     589      ArticleRatingSummary summary = new ArticleRatingSummary(articleURI.toString(), null); 
     590      summary.setRating(rating); 
     591      summary.setCreated(rating.getCreated()); 
     592      summary.setArticleURI(articleURI.toString()); 
     593      summary.setCreatorURI(rating.getCreator()); 
     594 
     595      // get public 'name' for user 
     596      UserAccount ua = session.get(UserAccount.class, rating.getCreator()); 
     597      if (ua != null) { 
     598        summary.setCreatorName(ua.getProfile().getDisplayName()); 
     599      } else { 
     600        summary.setCreatorName("Unknown"); 
     601        log.error("Unable to look up UserAccount for " + rating.getCreator() + 
     602                  " for Rating " + rating.getId()); 
     603      } 
     604      articleRatingSummaries.add(summary); 
     605    } 
     606 
     607    return articleRatingSummaries; 
     608  } 
     609 
     610  /** 
     611   * Get track backs for a given trackbackId 
     612   * 
     613   * @param trackbackId 
     614   * @return List<Trackback> List of track backs 
     615   */ 
     616  @Transactional(readOnly = true) 
     617  public List<Trackback> getTrackbacks(String trackbackId) { 
     618    final String fTrackbackId = trackbackId; 
     619     
     620    List<String> ids = articleAnnotationCache.get(TRACK_BACKS_KEY  + trackbackId, -1, 
     621            new Cache.SynchronizedLookup<List<String>, OtmException>(trackbackId.intern()) { 
     622              public List<String> lookup() throws OtmException { 
     623                return getIds(fTrackbackId); 
     624              } 
     625            }); 
     626 
     627    List<Trackback> trackbackList = new ArrayList<Trackback>(ids.size()); 
     628 
     629    for (String id : ids) { 
     630      Trackback t = session.get(Trackback.class, id); 
     631      trackbackList.add(t); 
     632 
     633      t.getBlog_name(); // for lazy load 
     634    } 
     635 
     636    return trackbackList; 
     637  } 
     638 
     639  /** 
     640   * Return a list of track backs for a particular track back ID 
     641   * @param trackbackId The Trackback ID 
     642   * @return a list of IDs for track back records 
     643   * @throws OtmException When there is an error talking to the OTM 
     644   */ 
     645  private List<String> getIds(String trackbackId) throws OtmException { 
     646    if (log.isDebugEnabled()) 
     647      log.debug("retrieving trackbacks for: " + trackbackId); 
     648 
     649    List<String> ids = new ArrayList<String>(); 
     650    Results r = session.createQuery("select t.id, t.created created from Trackback t where " 
     651       + "t.annotates = :id order by created desc;").setParameter("id", trackbackId).execute(); 
     652 
     653    while (r.next()) 
     654      ids.add(r.getString(0)); 
     655 
     656    return ids; 
     657  } 
     658 
    515659  private SecondaryObject convert(final ObjectInfo objectInfo) { 
    516660    return new SecondaryObject(objectInfo, smallImageRep, mediumImageRep, largeImageRep); 
     
    577721  } 
    578722 
     723  /** 
     724   * @param articleAnnotationCache The Article(transformed)/ArticleInfo/Annotation/Citation cache 
     725   *   to use. 
     726   */ 
     727  @Required 
     728  public void setArticleAnnotationCache(Cache articleAnnotationCache) { 
     729    this.articleAnnotationCache = articleAnnotationCache; 
     730  } 
    579731 
    580732  private static class ByteArrayDataSource implements DataSource { 
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/AbstractRatingAction.java

    r7197 r7318  
    1919package org.topazproject.ambra.rating.action; 
    2020 
    21 import java.net.URI; 
    22  
    2321import org.apache.commons.logging.Log; 
    2422import org.apache.commons.logging.LogFactory; 
     
    2624import org.springframework.beans.factory.annotation.Required; 
    2725 
    28 import org.topazproject.ambra.ApplicationException; 
    2926import org.topazproject.ambra.action.BaseSessionAwareActionSupport; 
    3027import org.topazproject.ambra.article.service.ArticleOtmService; 
    31 import org.topazproject.ambra.article.service.NoSuchArticleIdException; 
    32 import org.topazproject.ambra.model.article.ArticleType; 
    33 import org.topazproject.ambra.models.Article; 
    3428 
    3529/** 
     
    4539 
    4640  /** 
     41   * Sets the article OTM service for any sub classes to call 
     42   *  
    4743   * @param articleOtmService the ArticleOtmService to set 
    4844   */ 
     
    5147    this.articleOtmService = articleOtmService; 
    5248  } 
    53  
    54   /** 
    55    * Determines if an article is a research type article. 
    56    * 
    57    * @param articleURI The URI of the article. 
    58    * @return true/false 
    59    * @throws NoSuchArticleIdException When no article resolvable for the articleURI.  
    60    * @throws ApplicationException When no article type is resolvable for the article. 
    61    */ 
    62   protected final boolean isResearchArticle(String articleURI) 
    63     throws ApplicationException, NoSuchArticleIdException { 
    64     // resolve article type and supported properties 
    65     Article artInfo = articleOtmService.getArticle(URI.create(articleURI)); 
    66     ArticleType articleType = ArticleType.getDefaultArticleType(); 
    67     for (URI artTypeUri : artInfo.getArticleType()) { 
    68       if (ArticleType.getKnownArticleTypeForURI(artTypeUri) != null) { 
    69         articleType = ArticleType.getKnownArticleTypeForURI(artTypeUri); 
    70         break; 
    71       } 
    72     } 
    73     if (articleType == null) 
    74       throw new ApplicationException("Unable to resolve article type for: " + articleURI); 
    75     return ArticleType.isResearchArticle(articleType); 
    76   } 
    7749} 
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/GetArticleRatingsAction.java

    r7197 r7318  
    22 * $Id$ 
    33 * 
    4  * Copyright (c) 2007-2008 by Topaz, Inc. 
     4 * Copyright (c) 2007-2009 by Topaz, Inc. 
    55 * http://topazproject.org 
    66 * 
     
    3535import org.topazproject.ambra.models.UserAccount; 
    3636import org.topazproject.ambra.rating.service.RatingsPEP; 
     37import org.topazproject.ambra.rating.service.RatingsService; 
     38import org.topazproject.ambra.rating.service.RatingsService.AverageRatings; 
    3739import org.topazproject.otm.Session; 
    3840import org.topazproject.otm.criterion.Order; 
     
    4951public class GetArticleRatingsAction extends AbstractRatingAction { 
    5052  protected static final Log log = LogFactory.getLog(GetArticleRatingsAction.class); 
    51  
    52   private Session                          session; 
    53   private String                           articleURI; 
    54   private String                           articleTitle; 
    55   private String                           articleDescription; 
    56   private boolean                          isResearchArticle; 
    57   private boolean                          hasRated = false; 
     53  private RatingsService ratingsService; 
     54 
     55  private Session session; 
     56  private String articleURI; 
     57  private String  articleTitle; 
     58  private String articleDescription; 
     59  private boolean isResearchArticle; 
     60  private AverageRatings averageRatings; 
    5861  private final List<ArticleRatingSummary> articleRatingSummaries = 
    5962                                             new ArrayList<ArticleRatingSummary>(); 
    60   private double                           articleOverall = 0; 
    61   private double                           articleSingleRating = 0; 
    62   private RatingsPEP                       pep; 
     63  private double articleOverall = 0; 
     64  private double articleSingleRating = 0; 
     65  private RatingsPEP pep; 
    6366 
    6467  private RatingsPEP getPEP() { 
     
    8992    articleTitle = article.getDublinCore().getTitle(); 
    9093    articleDescription = article.getDublinCore().getDescription(); 
    91  
    92     isResearchArticle = isResearchArticle(articleURI); 
     94    averageRatings = ratingsService.getAverageRatings(articleURI); 
     95 
     96    isResearchArticle = articleOtmService.isResearchArticle(articleURI); 
    9397 
    9498    // assume if valid RatingsPEP.GET_RATINGS, OK to GET_STATS 
     
    117121    // create ArticleRatingSummary(s) 
    118122    for (Rating rating : articleRatings) { 
    119       ArticleRatingSummary summary = new ArticleRatingSummary( 
    120           getArticleURI(), getArticleTitle()); 
     123      ArticleRatingSummary summary = new ArticleRatingSummary(getArticleURI(), getArticleTitle()); 
    121124      summary.setRating(rating); 
    122125      summary.setCreated(rating.getCreated()); 
     
    136139    } 
    137140 
    138     if(articleRatingSummaries.size() > 0) { 
    139       hasRated = true; 
    140     } 
    141  
    142141    if(log.isDebugEnabled()) { 
    143142      log.debug("created ArticleRatingSummaries, " + articleRatingSummaries.size() + 
     
    239238 
    240239  /** 
     240   * Set the ratings service. 
     241   * 
     242   * @param ratingsService the ratings service 
     243   */ 
     244  @Required 
     245  public void setRatingsService(final RatingsService ratingsService) { 
     246    this.ratingsService = ratingsService; 
     247  } 
     248 
     249  /** 
    241250   * Set the OTM session. Called by spring's bean wiring. 
    242251   * 
     
    249258 
    250259  /** 
    251    * Tests if this article has been rated. 
    252    * 
    253    * @return Returns the hasRated. 
    254    */ 
    255   public boolean isHasRated() { 
    256     return hasRated; 
    257   } 
    258  
    259   /** 
    260    * Sets a flag to indicate that an article has been rated. 
    261    * 
    262    * @param hasRated The hasRated to set. 
    263    */ 
    264   public void setHasRated(boolean hasRated) { 
    265     this.hasRated = hasRated; 
    266   } 
    267  
    268   /** 
    269260   * Gets all ratings for the Article. 
    270261   * 
     
    274265    return articleRatingSummaries; 
    275266  } 
     267 
     268  /* 
     269  * Gets averageRatings info 
     270  * 
     271  * @return returns averageRatings info 
     272  */ 
     273  public RatingsService.AverageRatings getAverageRatings() { 
     274    return averageRatings; 
     275  } 
     276 
     277 /** 
     278  * Has this article been rated? 
     279  * 
     280  * @return true if the article has been rated 
     281  */ 
     282  public boolean getHasRated() { 
     283    return (articleRatingSummaries.size() > 0); 
     284  } 
    276285} 
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/GetAverageRatingsAction.java

    r7197 r7318  
    22 * $Id$ 
    33 * 
    4  * Copyright (c) 2007-2008 by Topaz, Inc. 
     4 * Copyright (c) 2007-2009 by Topaz, Inc. 
    55 * http://topazproject.org 
    66 * 
     
    2121import org.springframework.beans.factory.annotation.Required; 
    2222import org.springframework.transaction.annotation.Transactional; 
    23  
    2423import org.topazproject.ambra.rating.service.RatingsService; 
    25 import org.topazproject.ambra.user.AmbraUser; 
     24import org.topazproject.ambra.rating.service.RatingsService.AverageRatings; 
    2625 
    2726/** 
     
    3231@SuppressWarnings("serial") 
    3332public class GetAverageRatingsAction extends AbstractRatingAction { 
    34   private RatingsService                  ratingsService; 
    35   private RatingsService.AverageRatings   avg; 
    36   private String                          articleURI; 
    37   private boolean                         isResearchArticle; 
    38   private boolean                         hasRated = false; 
     33  private RatingsService  ratingsService; 
     34  private AverageRatings averageRatings; 
     35  private String articleURI; 
     36  private boolean isResearchArticle; 
     37  private boolean hasRated = false; 
    3938 
    4039  /** 
     
    4645  @Transactional(readOnly = true) 
    4746  public String execute() throws Exception { 
    48     avg = ratingsService.getAverageRatings(articleURI); 
     47    averageRatings = ratingsService.getAverageRatings(articleURI); 
    4948    hasRated = ratingsService.hasRated(articleURI, getCurrentUser()); 
    50     isResearchArticle = isResearchArticle(articleURI); 
     49    isResearchArticle = articleOtmService.isResearchArticle(articleURI); 
    5150    return SUCCESS; 
    5251  } 
     
    8786  } 
    8887 
    89   /** 
    90    * Gets the insight ratings average. 
    91    * 
    92    * @return Returns the insightAverage. 
    93    */ 
    94   public double getInsightAverage() { 
    95     return avg.insight.average; 
    96   } 
    97  
    98   /** 
    99    * Gets the count of insight ratings. 
    100    * 
    101    * @return Returns the numInsightRatings. 
    102    */ 
    103   public int getNumInsightRatings() { 
    104     return avg.insight.count; 
    105   } 
    106  
    107   /** 
    108    * Gets the count of reliability ratings. 
    109    * 
    110    * @return Returns the numReliabilityRatings. 
    111    */ 
    112   public int getNumReliabilityRatings() { 
    113     return avg.reliability.count; 
    114   } 
    115  
    116   /** 
    117    * @return the numSingleRatingRatings 
    118    */ 
    119   public int getNumSingleRatingRatings() { 
    120     return avg.single.count; 
    121   } 
    122  
    123   /** 
    124    * Gets the count of style ratings. 
    125    * 
    126    * @return Returns the numStyleRatings. 
    127    */ 
    128   public int getNumStyleRatings() { 
    129     return avg.style.count; 
    130   } 
    131  
    132  
    133   /** 
    134    * Gets the overall average ratings. 
    135    * 
    136    * @return Returns the overallAverage. 
    137    */ 
    138   public double getOverallAverage() { 
    139     return avg.overall; 
    140   } 
    141  
    142   /** 
    143    * Gets the reliability ratings average. 
    144    * 
    145    * @return Returns the reliabilityAverage. 
    146    */ 
    147   public double getReliabilityAverage() { 
    148     return avg.reliability.average; 
    149   } 
    150  
    151   /** 
    152    * Gets the style ratings average. 
    153    * 
    154    * @return Returns the styleAverage. 
    155    */ 
    156   public double getStyleAverage() { 
    157     return avg.style.average; 
    158   } 
    159  
    160   /** 
    161    * @return the singleRatingAverage 
    162    */ 
    163   public double getSingleRatingAverage() { 
    164     return avg.single.average; 
    165   } 
    166  
    167  
    168   /** 
    169    * Gets the total on insight ratings. 
    170    * 
    171    * @return Returns the totalInsight. 
    172    */ 
    173   public double getTotalInsight() { 
    174     return avg.insight.total; 
    175   } 
    176  
    177   /** 
    178    * Gets the total on reliability ratings. 
    179    * 
    180    * @return Returns the totalReliability. 
    181    */ 
    182   public double getTotalReliability() { 
    183     return avg.reliability.total; 
    184   } 
    185  
    186   /** 
    187    * @return the totalSingleRating 
    188    */ 
    189   public double getTotalSingleRating() { 
    190     return avg.single.total; 
    191   } 
    192  
    193   /** 
    194    * Gets the total on style ratings. 
    195    * 
    196    * @return Returns the totalStyle. 
    197    */ 
    198   public double getTotalStyle() { 
    199     return avg.style.total; 
     88  /* 
     89  * Gets averageRatings info 
     90  * 
     91  * @return returns averageRatings info 
     92  * */ 
     93  public RatingsService.AverageRatings getAverageRatings() { 
     94    return averageRatings; 
    20095  } 
    20196 
     
    205100   * @return Returns the hasRated. 
    206101   */ 
    207   public boolean isHasRated() { 
     102  public boolean getHasRated() { 
    208103    return hasRated; 
    209104  } 
    210  
    211   /** 
    212    * Gets the rounded average on insight ratings. 
    213    * 
    214    * @return Returns the insightRoundedAverage. 
    215    */ 
    216   public double getInsightRoundedAverage() { 
    217     return avg.insight.rounded; 
    218   } 
    219  
    220   /** 
    221    * Gets the overall rounded average. 
    222    * 
    223    * @return Returns the overallRoundedAverage. 
    224    */ 
    225   public double getOverallRoundedAverage() { 
    226     return avg.roundedOverall; 
    227   } 
    228  
    229   /** 
    230    * Gets the rounded average on reliability ratings. 
    231    * 
    232    * @return Returns the reliabilityRoundedAverage. 
    233    */ 
    234   public double getReliabilityRoundedAverage() { 
    235     return avg.reliability.rounded; 
    236   } 
    237  
    238   /** 
    239    * @return the singleRatingRoundedAverage 
    240    */ 
    241   public double getSingleRatingRoundedAverage() { 
    242     return avg.single.rounded; 
    243   } 
    244  
    245   /** 
    246    * Gets the rounded average on style ratings. 
    247    * 
    248    * @return Returns the styleRoundedAverage. 
    249    */ 
    250   public double getStyleRoundedAverage() { 
    251     return avg.style.rounded; 
    252   } 
    253  
    254   /** 
    255    * Gets the number of users that rated. 
    256    * 
    257    * @return Number of users that rated. 
    258    */ 
    259   public int getNumUsersThatRated() { 
    260     return avg.numUsersThatRated; 
    261   } 
    262105} 
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/RateAction.java

    r7197 r7318  
    110110 
    111111    try { 
    112       isResearchArticle = isResearchArticle(articleURI); 
     112      isResearchArticle = articleOtmService.isResearchArticle(articleURI); 
    113113    } catch (Exception ae) { 
    114114      log.info("Could not get article info for: " + articleURI, ae); 
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/service/RatingsService.java

    r7197 r7318  
    22 * $Id$ 
    33 * 
    4  * Copyright (c) 2006-2008 by Topaz, Inc. 
     4 * Copyright (c) 2006-2009 by Topaz, Inc. 
    55 * http://topazproject.org 
    66 * 
     
    127127   * 
    128128   * @param ratingId Rating Id 
    129    * 
    130    * @param user 
     129   * @param user current ambra user 
    131130   * @return Rating 
    132131   */ 
     
    253252    private static final long serialVersionUID = -2890067268188424471L; 
    254253 
    255     public final double total; 
    256     public final int    count; 
    257     public final double average; 
    258     public final double rounded; 
     254    private final double total; 
     255    private final int    count; 
     256    private final double average; 
     257    private final double rounded; 
    259258 
    260259    Average(double total, int count) { 
     
    270269             ", rounded = " + rounded; 
    271270    } 
     271 
     272    public double getTotal() { 
     273      return total; 
     274    } 
     275 
     276    public int getCount() { 
     277      return count; 
     278    } 
     279 
     280    public double getAverage() { 
     281      return average; 
     282    } 
     283 
     284    public double getRounded() { 
     285      return rounded; 
     286    }     
    272287  } 
    273288 
     
    275290    private static final long serialVersionUID = -1666766336307635633L; 
    276291 
    277     public final Average style; 
    278     public final Average insight; 
    279     public final Average reliability; 
    280     public final Average single; 
    281     public final int     numUsersThatRated; 
    282     public final double  overall; 
    283     public final double  roundedOverall; 
     292    private final Average style; 
     293    private final Average insight; 
     294    private final Average reliability; 
     295    private final Average single; 
     296    private final int     numUsersThatRated; 
     297    private final double  overall; 
     298    private final double  roundedOverall; 
    284299 
    285300    AverageRatings() { 
     
    318333             ", roundedOverall = " + roundedOverall; 
    319334    } 
     335 
     336    public Average getStyle() { 
     337      return style; 
     338    } 
     339 
     340    public Average getInsight() { 
     341      return insight; 
     342    } 
     343 
     344    public Average getReliability() { 
     345      return reliability; 
     346    } 
     347 
     348    public Average getSingle() { 
     349      return single; 
     350    } 
     351 
     352    public int getNumUsersThatRated() { 
     353      return numUsersThatRated; 
     354    } 
     355 
     356    public double getOverall() { 
     357      return overall; 
     358    } 
     359 
     360    public double getRoundedOverall() 
     361    { 
     362      return roundedOverall; 
     363    }       
    320364  } 
    321365 
  • head/ambra/webapp/src/main/resources/struts.xml

    r7298 r7318  
    260260 
    261261    <default-action-ref name="pageNotFound" /> 
    262  
    263     <action name="getAverageRatingsForArticle" class="org.topazproject.ambra.rating.action.GetAverageRatingsAction"> 
    264       <interceptor-ref name="chain"> 
    265         <param name="excludes">targetSource, callbacks, exposeProxy</param> 
    266       </interceptor-ref> 
    267       <interceptor-ref name="ambraUserStack"/> 
    268       <result name="success" type="ambraFreemarker"> 
    269         <param name="templateFile">/article/article_body.ftl</param> 
    270         <param name="noCache">true</param> 
    271       </result> 
    272     </action> 
    273262    <action name="getAverageRatings" class="org.topazproject.ambra.rating.action.GetAverageRatingsAction"> 
    274263      <result name="success">/WEB-INF/pages/article/articleRatings.ftl</result> 
     
    346335    </action> 
    347336 
    348     <action name="getNumTrackbacksForArticle" class="org.topazproject.ambra.action.TrackbackAction" method="getTrackbackCount"> 
    349       <interceptor-ref name="chain"> 
    350         <param name="excludes">targetSource, callbacks, exposeProxy</param> 
    351       </interceptor-ref> 
    352       <interceptor-ref name="ambraUserStack"/> 
    353       <result type="chain"> 
    354         <param name="actionName">getAverageRatingsForArticle</param> 
    355         <param name="namespace">/rate</param> 
    356       </result> 
    357     </action> 
    358  
    359     <action name="fetchArticle" class="org.topazproject.ambra.article.action.FetchArticleAction"> 
    360       <result type="chain"> 
    361         <param name="actionName">getNumTrackbacksForArticle</param> 
    362         <param name="namespace">/article</param> 
     337    <action name="fetchArticle" class="org.topazproject.ambra.article.action.FetchArticleAction" method="FetchArticle"> 
     338      <result name="success" type="ambraFreemarker"> 
     339        <param name="templateFile">/article/article_body.ftl</param> 
     340      </result> 
     341    </action> 
     342 
     343    <action name="fetchArticleComments" class="org.topazproject.ambra.article.action.FetchArticleAction" method="FetchArticleComments"> 
     344      <result name="success" type="ambraFreemarker"> 
     345        <param name="templateFile">/article/article_comments.ftl</param> 
     346      </result> 
     347    </action> 
     348 
     349    <action name="fetchArticleCorrections" class="org.topazproject.ambra.article.action.FetchArticleAction" method="FetchArticleCorrections"> 
     350      <result name="success" type="ambraFreemarker"> 
     351        <param name="templateFile">/article/article_comments.ftl</param> 
     352      </result> 
     353    </action> 
     354 
     355    <action name="fetchRelatedArticle" class="org.topazproject.ambra.article.action.FetchArticleAction" method="FetchArticleRelated"> 
     356      <result name="success" type="ambraFreemarker"> 
     357        <param name="templateFile">/article/article_related.ftl</param> 
    363358      </result> 
    364359    </action> 
     
    398393    </action> 
    399394 
    400     <action name="fetchBody" class="org.topazproject.ambra.article.action.FetchArticleAction"> 
     395    <action name="fetchBody" class="org.topazproject.ambra.article.action.FetchArticleAction" method="fetchArticle"> 
    401396      <result name="success" type="ambraFreemarker"> 
    402397        <param name="location">/article/article_content.ftl</param> 
     
    405400    </action> 
    406401 
    407     <action name="fetchArticleRhc" class="org.topazproject.ambra.article.action.FetchArticleAction"> 
     402    <action name="fetchArticleRhc" class="org.topazproject.ambra.article.action.FetchArticleAction" method="fetchArticle"> 
    408403      <result name="success" type="ambraFreemarker"> 
    409404        <param name="location">/article/article_rhc_count.ftl</param> 
  • head/ambra/webapp/src/main/resources/viewnlm-v2.xsl

    r7298 r7318  
    20112011    <xsl:apply-templates select="label"/> 
    20122012  </xsl:element> 
    2013   <xsl:apply-templates select="caption/title"/> 
     2013  <!--xsl:apply-templates select="caption/title"/--> 
    20142014  </strong> 
    20152015 
  • head/ambra/webapp/src/main/webapp/article/article_body.ftl

    r6028 r7318  
    33  $Id$ 
    44   
    5   Copyright (c) 2007-2008 by Topaz, Inc. 
     5  Copyright (c) 2007-2009 by Topaz, Inc. 
    66  http://topazproject.org 
    77   
     
    1818  limitations under the License. 
    1919--> 
     20<#include "article_variables.ftl"> 
    2021<div id="content" class="article" style="visibility:visible;"> 
    2122<#include "article_rhc.ftl"> 
     
    3132<div style="visibility:hidden"> 
    3233<#include "/widget/annotation_add.ftl"> 
     34<#include "/widget/contextAction.ftl"> 
    3335<#include "/widget/commentDialog.ftl"> 
    3436<#include "/widget/ratingDialog.ftl"> 
  • head/ambra/webapp/src/main/webapp/article/article_content.ftl

    r7298 r7318  
    22  $HeadURL::                                                                            $ 
    33  $Id$ 
    4    
     4 
    55  Copyright (c) 2007-2009 by Topaz, Inc. 
    66  http://topazproject.org 
    7    
     7 
    88  Licensed under the Apache License, Version 2.0 (the "License"); 
    99  you may not use this file except in compliance with the License. 
    1010  You may obtain a copy of the License at 
    11    
     11 
    1212  http://www.apache.org/licenses/LICENSE-2.0 
    13    
     13 
    1414  Unless required by applicable law or agreed to in writing, software 
    1515  distributed under the License is distributed on an "AS IS" BASIS, 
     
    1818  limitations under the License. 
    1919--> 
    20 <#assign publisher=""/> 
    21 <#if Request[freemarker_config.journalContextAttributeKey]?exists> 
    22   <#assign journalContext = Request[freemarker_config.journalContextAttributeKey].journal> 
    23 <#else> 
    24   <#assign journalContext = ""> 
    25 </#if> 
    26 <#list journalList as jour> 
    27   <#if (articleInfo.eIssn = jour.eIssn) && (jour.key != journalContext) > 
    28     <#assign publisher = "Published in <em><a href=\"" + freemarker_config.getJournalUrl(jour.key) 
    29                          + "\">"+ jour.dublinCore.title + "</a></em>" /> 
    30     <#break/> 
    31   <#else> 
    32     <#if jour.key != journalContext>  
    33       <#assign jourAnchor = "<a href=\"" + freemarker_config.getJournalUrl(jour.key) + "\">"/> 
    34       <#if publisher?length gt 0> 
    35         <#assign publisher = publisher + ", " + jourAnchor + jour.dublinCore.title + "</a>" /> 
    36       <#else> 
    37         <#assign publisher = publisher + "Featured in " + jourAnchor + jour.dublinCore.title + "</a>" /> 
    38       </#if> 
    39     </#if> 
    40   </#if> 
    41 </#list> 
    42   <div id="researchArticle" class="content"> 
    43     <a id="top" name="top" toc="top" title="Top"></a> 
    44     <@s.url id="thisPageURL" includeParams="get" includeContext="true" encode="false"/> 
    45     <@s.url id="feedbackURL" includeParams="none" namespace="/" action="feedbackCreate" page="${thisPageURL?url}"/> 
    46     <div id="contentHeader"> 
    47       <p>Open Access</p> 
    48       <p id="articleType">${articleType.heading}</p> 
     20<@s.url id="createDiscussionURL" namespace="/annotation/secure" action="startDiscussion" includeParams="none" target="${articleURI}" /> 
     21<div id="researchArticle" class="content"> 
     22  <a id="top" name="top" toc="top" title="Top"></a> 
     23  <@s.url id="thisPageURL" includeParams="get" includeContext="true" encode="false"/> 
     24  <@s.url id="feedbackURL" includeParams="none" namespace="/" action="feedbackCreate" page="${thisPageURL?url}"/> 
     25  <div id="contentHeader" xpathLocation="noSelect"><p>Open Access</p><p id="articleType">${articleType.heading}</p></div> 
     26  <h1 xpathLocation="noSelect">${articleInfoX.title}</h1> 
     27  <#assign tab="article" /> 
     28  <#include "article_tabs.ftl"> 
     29        <div id="retractionHtmlId" class="retractionHtmlId" style="display:none;" xpathLocation="noSelect"> 
     30          <p class="retractionHtmlId"><strong> Retraction:</strong> This article has been <em>retracted</em> due to the following: 
     31            <span id="retractionlist" class="retractionHtmlId"></span> 
     32    </p> 
     33  </div>    
     34  <div id="fch" class="fch" style="display:none;" xpathLocation="noSelect"> 
     35    <p class="fch"><strong> Formal Correction:</strong> This article has been <em>formally corrected</em> to address the following errors.</p> 
     36    <ol id="fclist" class="fclist"></ol> 
     37  </div> 
     38  <div id="articleMenu" xpathLocation="noSelect"> 
     39    <div class="wrap"> 
     40      <ul> 
     41        <li class="annotation icon">To <strong>add a note</strong>, highlight some text. <a href="#" onclick="toggleAnnotation(this, 'public'); return false;" title="Click to turn notes on/off">Hide notes</a></li> 
     42        <li class="discuss icon"> 
     43          <#if Session[freemarker_config.userAttributeKey]?exists> 
     44            <a href="${createDiscussionURL}" class="discuss icon">Make a general comment</a> 
     45          <#else> 
     46            <a href="${freemarker_config.context}/user/secure/secureRedirect.action?goTo=${thisPage}">Make a general comment</a> 
     47          </#if> 
     48        </li> 
     49        </ul> 
     50      <p><strong>Jump to</strong></p> 
     51      <div id="sectionNavTop" class="tools"></div> 
    4952    </div> 
    50     <#if publisher != ""> 
    51       <div id="publisher"><p>${publisher}</p></div> 
    52     </#if> 
    53     <div id="retractionHtmlId" class="retractionHtmlId" style="display:none;"> 
    54       <p class="retractionHtmlId"><strong> Retraction:</strong> This article has been <em>retracted</em> due to the following: 
    55         <span id="retractionlist" class="retractionHtmlId"></span> 
    56       </p> 
    57     </div> 
    58     <div id="fch" class="fch" style="display:none;"> 
    59           <p class="fch"><strong> Formal Correction:</strong> This article has been <em>formally corrected</em> to address the following errors.</p> 
    60           <ol id="fclist" class="fclist"></ol> 
    61     </div> 
    62         <div id="articleMenu">  
    63                 <ul>  
    64                         <@s.url id="articleArticleRepXML"  namespace="/article" action="fetchObjectAttachment" includeParams="none" uri="${articleURI}">  
    65                                 <@s.param name="representation" value="%{'XML'}"/>  
    66                         </@s.url>  
    67                         <li><a href="${articleArticleRepXML}" class="xml" title="Download XML">Download Article XML</a></li>  
    68                         <#if articleType.heading != 'Issue Image'> 
    69                                 <@s.url id="articleArticleRepPDF"  namespace="/article" action="fetchObjectAttachment" includeParams="none" uri="${articleURI}">  
    70                                         <@s.param name="representation" value="%{'PDF'}"/>  
    71                                 </@s.url>  
    72                                 <li><a href="${articleArticleRepPDF}" class="pdf" title="Download PDF">Download Article PDF</a></li> 
    73                         </#if> 
    74                         <@s.url id="articleCitationURL"  namespace="/article" action="citationList" includeParams="none" articleURI="${articleURI}" />  
    75                         <li><@s.a href="%{articleCitationURL}"  cssClass="citation" title="Download Citation">Download Citation</@s.a></li>  
    76                         <@s.url id="emailArticleURL" namespace="/article" action="emailArticle" articleURI="${articleURI}"/>  
    77                         <li><@s.a href="%{emailArticleURL}"  cssClass="email" title="E-mail This Article to a Friend or Colleague">E-mail this Article</@s.a></li> 
    78                         <li><a href="#" onclick="window.print();return false;" class="print last" title="Print this article">Print this Article</a></li>  
    79                 </ul>  
    80         </div>  
    81     <@s.property value="transformedArticle" escape="false"/> 
    8253  </div> 
     54  <@s.property value="transformedArticle" escape="false"/> 
     55</div> 
  • head/ambra/webapp/src/main/webapp/article/article_rhc.ftl

    r7251 r7318  
    22  $HeadURL::                                                                            $ 
    33  $Id$ 
    4    
     4 
    55  Copyright (c) 2007-2009 by Topaz, Inc. 
    66  http://topazproject.org 
    7    
     7 
    88  Licensed under the Apache License, Version 2.0 (the "License"); 
    99  you may not use this file except in compliance with the License. 
    1010  You may obtain a copy of the License at 
    11    
     11 
    1212  http://www.apache.org/licenses/LICENSE-2.0 
    13    
     13 
    1414  Unless required by applicable law or agreed to in writing, software 
    1515  distributed under the License is distributed on an "AS IS" BASIS, 
     
    1919--> 
    2020<!-- begin : right hand column --> 
    21 <div id="rhc"> 
     21<@s.url id="articleArticleRepXML"  namespace="/article" action="fetchObjectAttachment" includeParams="none" uri="${articleURI}"> 
     22  <@s.param name="representation" value="%{'XML'}"/> 
     23</@s.url> 
     24<@s.url id="articleArticleRepPDF"  namespace="/article" action="fetchObjectAttachment" includeParams="none" uri="${articleURI}"> 
     25  <@s.param name="representation" value="%{'PDF'}"/> 
     26</@s.url> 
     27<@s.url id="articleCitationURL"  namespace="/article" action="citationList" includeParams="none" articleURI="${articleURI}" /> 
     28<@s.url id="emailArticleURL" namespace="/article" action="emailArticle" articleURI="${articleURI}"/> 
     29<@s.url id="relatedArticleURL" namespace="/article" action="fetchRelatedArticle" articleURI="${articleURI}"/> 
    2230 
    23 <div id="sideNav"> 
     31<div id="rhc" xpathLocation="noDialog"> 
     32  
     33  <div id="download" class="rhcBox_type1"> 
     34    <div class="wrap"> 
     35      <ul> 
     36        <li class="download icon"><strong>Download:</strong> <a href="${articleArticleRepPDF}">PDF</a> | <a href="${articleCitationURL}">Citation</a> | <a href="${articleArticleRepXML}">XML</a></li> 
     37        <li class="print icon"><a href="#" onclick="window.print();return false;"><strong>Print article</strong></a></li> 
     38      </ul> 
     39    </div> 
     40  </div> 
    2441 
    25         <#if articleInfoX?? && articleInfoX.relatedArticles?size gt 0> 
    26                 <dl class="related"> 
    27                         <dt>Related <em>${freemarker_config.orgName}</em> Articles</dt> 
    28                         <#list articleInfoX.relatedArticles as ra> 
    29                         <@s.url id="fetchArticleURL" action="fetchArticle" namespace="/article" articleURI="${ra.uri}" includeParams="none"/> 
    30                         <dd><@s.a href="%{fetchArticleURL}" title="Read Open Access Article">${ra.title}</@s.a></dd> 
    31                         </#list> 
    32                 </dl> 
    33         </#if> 
    34    
    35   <div id="floatMarker"></div> 
     42  <#if publisher != ""> 
     43    <div id="published" xpathLocation="noSelect" class="rhcBox_type2"> 
     44      <p>${publisher}</p> 
     45    </div> 
     46  </#if> 
    3647 
    37   <div id="postcomment"> 
    38     <div class="commentview"> 
    39       <h6>Start a discussion on this article</h6> 
    40       <ol> 
    41         <#if Session[freemarker_config.userAttributeKey]?exists> 
    42             <li><a href="#" id="addAnnotation" class="addannotation icon" title="First select text, then click here" onmousedown="createAnnotationOnMouseDown();">Add a note to the text</a></li> 
    43         <#else> 
    44             <li><a href="${freemarker_config.context}/user/secure/secureRedirect.action?goTo=${thisPage}" id="addAnnotation" class="addannotation icon">Add a note to the text</a></li> 
    45         </#if> 
    46  
    47         <!-- begin : expanded block --> 
    48         <!--  <fieldset> 
    49             <form> 
    50             <ol id="toggleAnnotations"> 
    51               <li>Yours  <div><input class="input" type="radio" title="Choose from one of the options" name="yours" value="On" checked> 
    52                     <label for="yours">On</label> 
    53                     <input class="input" type="radio" title="Choose from one of the options" name="yours" value="Off"> 
    54                     <label for="yours">Off</label></div> 
    55               </li> 
    56               <li>Authors  <div><input class="input" type="radio" title="Choose from one of the options" name="authors" value="On" checked> 
    57                     <label for="authors">On</label> 
    58                     <input class="input" type="radio" title="Choose from one of the options" name="authors" value="Off"> 
    59                     <label for="authors">Off</label></div> 
    60               </li> 
    61               <li>All Public 
    62                     <div><input class="input" type="radio" title="Choose from one of the options" name="public" value="On" checked> 
    63                     <label for="public">On</label> 
    64                     <input class="input" type="radio" title="Choose from one of the options" name="public" value="Off"> 
    65                     <label for="public">Off</label></div> 
    66               </li> 
    67             </ol> 
    68             </form> 
    69           </fieldset>--> 
    70         <!-- end : expanded block --> 
    71          
    72         <@s.url id="createDiscussionURL" namespace="/annotation/secure" action="startDiscussion" includeParams="none" target="${articleURI}" /> 
    73  
    74         <#if Session[freemarker_config.userAttributeKey]?exists> 
    75                 <li><a href="${createDiscussionURL}" class="discuss icon">Make a general comment</a></li> 
    76         <#else> 
    77             <li><a href="${freemarker_config.context}/user/secure/secureRedirect.action?goTo=${thisPage}" class="discuss icon">Make a general comment</a></li> 
    78         </#if> 
    79  
    80         <@s.url id="commentsURL" namespace="/annotation" action="getCommentary" includeParams="none" target="${articleURI}"/> 
    81         <li><a href="${commentsURL}" class="commentary icon">View/join ongoing discussions</a> 
    82           <ul id="dcCount1"> 
    83             <#include "/article/article_rhc_count.ftl"> 
    84           </ul> 
    85         </li> 
    86  
    87         <#if numCorrections gt 0> 
    88         <@s.url id="correctionsURL" namespace="/annotation" action="getCorrectionsCommentary" includeParams="none" target="${articleURI}"/> 
    89         <li><a href="${correctionsURL}" class="corrections icon">View all corrections</a></li> 
    90         </#if> 
    91          
    92         <li><a href="#" onclick="toggleAnnotation(this, 'public'); return false;" class="collapse tooltip" title="Click to turn notes on/off">Hide notes</a></li> 
    93  
    94         <@s.url id="trackbackURL" namespace="/article" action="listTrackbacks" includeParams="none" trackbackId="${articleURI}"/> 
    95         <li><a href="${trackbackURL}" class="trackback icon">Trackbacks (${trackbackList?size})</a></li> 
    96  
    97   <!-- show this if there is no commentary at all <li>Be the first to <a href="${createDiscussionURL}" class="discuss icon">start a discussion</a> or use the tools above to add your annotation!</li> --> 
    98       </ol> 
    99     </div> 
    100  
    101  
    102     <div class="commentview" id="ratingRhc1"> 
     48  <div id="impact" class="rhcBox_type2"> 
     49    <div id="ratingRhc1"> 
    10350      <#include "/article/article_rhc_rating.ftl"> 
    10451    </div> 
     52  </div> 
    10553 
    106     <div id="sectionNavTop" class="tools"></div> 
     54  <div id="related" class="rhcBox_type2"> 
     55    <h6>Related Content</h6> 
     56  <#if articleInfoX?? && articleInfoX.relatedArticles?size gt 0> 
     57    <dl class="related"> 
     58      <dt>Related <em>${freemarker_config.orgName}</em> Articles</dt> 
     59      <#list articleInfoX.relatedArticles as ra> 
     60      <@s.url id="fetchArticleURL" action="fetchArticle" namespace="/article" articleURI="${ra.uri}" includeParams="none"/> 
     61      <dd><@s.a href="%{fetchArticleURL}" title="Read Open Access Article">${ra.title}</@s.a></dd> 
     62      </#list> 
     63    </dl> 
     64  </#if> 
     65    <p><strong>Related subject categories</strong><br/> 
     66    <#list articleInfo.categories as cat> 
     67      <a href="browse.action?catName=${cat.mainCategory?url}">${cat.mainCategory}</a><#if cat_has_next>, </#if> 
     68    </#list></p> 
     69 
     70    <div class="more clearfix"><a href="${relatedArticleURL}">More</a></div> 
     71  </div> 
     72 
     73  <div id="share" class="rhcBox_type2"> 
     74    <h6>Share this Article <a href="#" class="info">info</a></h6> 
     75    <ul> 
     76      <li class="bookmarklets">Bookmark: 
     77 
     78          <#-- StumbleUpon --> 
     79          <a href="http://www.stumbleupon.com/submit?url=${jDocURL}" target="_new"> <img border=0 src="http://cdn.stumble-upon.com/images/16x16_su_solid.gif" alt="StumbleUpon" title="Add to StumbleUpon"></a> 
     80          <#-- for more info, see http://www.stumbleupon.com/buttons.php --> 
     81          <#-- Facebook --> 
     82          <script>function fbs_click() {u='${docURL}';t='${articleInfoX.title?url}';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a href="http://www.facebook.com/share.php?u=${docURL?url}" onclick="return fbs_click()"><img src="http://static.ak.fbcdn.net/images/share/facebook_share_icon.gif" alt="Facebook" title="Add to Facebook" /></a>       <!-- for mor info, see http://www.facebook.com/share_partners.php --> 
     83          <#-- Connotea --> 
     84          <script type="text/javascript"> 
     85            function bookmark_in_connotea(u) { 
     86                a=false; x=window; e=x.encodeURIComponent; d=document; 
     87                w=open('http://www.connotea.org/addpopup?continue=confirm&uri='+e(u), 
     88                    'add', 'width=600, height=400, scrollbars, resizable'); 
     89                void(x.setTimeout('w.focus()',200)); 
     90            } 
     91          </script> 
     92          <a style='cursor: pointer;' onclick='javascript:bookmark_in_connotea("${docURL}");'><img src='${freemarker_config.getContext()}/journals/plosJournals/images/icon_connotea_16x16.gif' alt="Connotea" title="Add to Connotea"/></a> 
     93          <#-- See: http://www.connotea.org/wiki/AddToConnoteaButton --> 
     94          <#-- Citeulike --> 
     95          <a href="http://www.citeulike.org/posturl?url=${docURL?url}&title=${articleInfoX.title?url}" target="_new"><img src='${freemarker_config.getContext()}/journals/plosJournals/images/icon_citeulike_16x16.gif' alt="CiteULike" title="Add to CiteULike" /></a> 
     96          <#-- For more info see http://www.citeulike.org/faq/all.adp --> 
     97          <#-- Digg 
     98            TODO:Eventually we should be passing the abstract as the bodytext to digg.  We could also switch up and 
     99            start figuring out and sending a topic as well 
     100            --> 
     101          <script type="text/javascript"> 
     102          digg_url = '${jDocURL}'; 
     103          digg_skin = 'icon'; 
     104          digg_title = '${articleInfoX.title?replace("'","\\'")}'; 
     105          digg_bodytext = ''; 
     106          digg_topic = ''; 
     107          digg_media = 'news'; 
     108          digg_window = 'new'; 
     109 
     110          </script> 
     111          <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script> 
     112          <#-- for more info see http://digg.com/tools/integrate --> 
     113 
     114      </li> 
     115      <li class="email icon"><a href="${emailArticleURL}">Email this article</a></li> 
     116      <li class="twitter icon"><a href="http://twitter.com/home/?status=${"Check+out+this+article%3A+" + docURL?url}" title="Tweet about this article">Tweet about this article</a></li> 
     117    </ul> 
    107118  </div> 
    108119</div> 
    109  
    110  
    111 </div> 
    112120<!-- end : right hand column --> 
  • head/ambra/webapp/src/main/webapp/article/article_rhc_rating.ftl

    r6001 r7318  
    33  $Id$ 
    44   
    5   Copyright (c) 2007-2008 by Topaz, Inc. 
     5  Copyright (c) 2007-2009 by Topaz, Inc. 
    66  http://topazproject.org 
    77   
     
    1818  limitations under the License. 
    1919--> 
    20             <#if numUsersThatRated != 1> 
     20            <#if (averageRatings.numUsersThatRated != 1)> 
    2121              <#assign char = "s"> 
    2222            <#else> 
     
    2424            </#if> 
    2525            <@s.url id="ratingsURL" namespace="/rate" action="getArticleRatings" includeParams="none" articleURI="${articleURI}"/> 
    26             <h6>Average Rating <a href="${ratingsURL}" class="rating">(${numUsersThatRated} User Rating${char})</a></h6> 
     26            <h6>Average Rating <a href="${ratingsURL}" class="rating">(${averageRatings.numUsersThatRated} User Rating${char})</a></h6> 
    2727            <ol> 
    2828              <li> 
    2929              <#if isResearchArticle == true> 
    3030                <ul class="star-rating rating inline-rating-rhc" title="overall"> 
    31                     <#assign overallPct = (20 * overallRoundedAverage)?string("##0")> 
    32                     <li class="current-rating overall-rating pct${overallPct}">Currently ${overallRoundedAverage?string("0.#")}/5 Stars.</li> 
     31                    <#assign overallPct = (20 * averageRatings.roundedOverall)?string("##0")> 
     32                    <li class="current-rating overall-rating pct${overallPct}">Currently ${averageRatings.roundedOverall?string("0.#")}/5 Stars.</li> 
    3333                </ul> 
    3434                <a href="javascript:void(0);" onclick="return ambra.domUtil.swapDisplayTextMode(this, 'ratingAverages', null, 'Hide all categories', 'See all categories');" class="rating catAvg">See all categories</a> 
    3535                <div id="ratingAverages"> 
    36                   <ol class="ratingAvgs"> 
     36                  <ol class="ratingaverageRatings."> 
    3737                    <li><label for="insight">Insight</label> 
    3838                      <ul class="star-rating rating" title="insight"> 
    39                         <#assign insightPct = (20 * insightRoundedAverage)?string("##0")> 
    40                         <li class="current-rating average pct${insightPct}">Currently ${insightAverage?string("0.#")}/5 Stars.</li> 
     39                        <#assign insightPct = (20 * averageRatings.insight.rounded)?string("##0")> 
     40                        <li class="current-rating average pct${insightPct}">Currently ${averageRatings.insight.average?string("0.#")}/5 Stars.</li> 
    4141                      </ul> 
    4242                    </li> 
    4343                    <li><label for="reliability">Reliability</label> 
    4444                      <ul class="star-rating rating" title="reliability"> 
    45                         <#assign reliabilityPct = (20 * reliabilityRoundedAverage)?string("##0")> 
    46                         <li class="current-rating average pct${reliabilityPct}">Currently ${reliabilityAverage?string("0.#")}/5 Stars.</li> 
     45                        <#assign reliabilityPct = (20 * averageRatings.reliability.rounded)?string("##0")> 
     46                        <li class="current-rating average pct${reliabilityPct}">Currently ${averageRatings.reliability.average?string("0.#")}/5 Stars.</li> 
    4747                      </ul> 
    4848                    </li> 
    4949                    <li><label for="style">Style</label> 
    5050                      <ul class="star-rating rating" title="style"> 
    51                         <#assign stylePct = (20 * styleRoundedAverage)?string("##0")> 
    52                         <li class="current-rating average pct${stylePct}">Currently ${styleAverage?string("0.#")}/5 Stars.</li> 
     51                        <#assign stylePct = (20 * averageRatings.style.rounded)?string("##0")> 
     52                        <li class="current-rating average pct${stylePct}">Currently ${averageRatings.style.average?string("0.#")}/5 Stars.</li> 
    5353                      </ul> 
    5454                    </li> 
     
    5757                <#else> 
    5858                <ul class="star-rating rating inline-rating-rhc" title="average"> 
    59                     <#assign averagePct = (20 * singleRatingRoundedAverage)?string("##0")> 
    60                     <li class="current-rating single-rating pct${averagePct}">Currently ${singleRatingRoundedAverage?string("0.#")}/5 Stars.</li> 
     59                    <#assign averagePct = (20 * averageRatings.single.rounded)?string("##0")> 
     60                    <li class="current-rating single-rating pct${averagePct}">Currently ${averageRatings.single.rounded?string("0.#")}/5 Stars.</li> 
    6161                </ul> 
    6262              </#if> 
    6363              <#if Session[freemarker_config.userAttributeKey]?exists> 
    64                 <#if hasRated> 
     64                <#if HasRated> 
    6565                  <a href="javascript:void(0);" onclick="return ambra.rating.show('edit');" class="rating">Edit My Rating</a> 
    6666                <#else> 
     
    7272              </li> 
    7373            </ol> 
     74             
  • head/ambra/webapp/src/main/webapp/article/browse.ftl

    r5578 r7318  
    7373          <span class="date">Published ${art.date?string("dd MMM yyyy")}</span> 
    7474          <@s.url id="fetchArticleURL" action="fetchArticle" namespace="/article" articleURI="${art.id}" includeParams="none"/> 
    75           <span class="article"><@s.a href="%{fetchArticleURL}" title="Read Open Access Article">${art.title}</@s.a></span> 
     75          <span class="article"><@s.a href="%{fetchArticleURL}" title="Read Open Access Article"><@articleFormat>${art.title}</@articleFormat></@s.a></span> 
    7676          <span class="authors"> 
    7777            <#list art.authors as auth><#if auth_index gt 0>, </#if>${auth}</#list> 
  • head/ambra/webapp/src/main/webapp/css/annotation.css

    r7298 r7318  
    33 * $Id$ 
    44 * 
    5  * Copyright (c) 2006-2008 by Topaz, Inc. 
     5 * Copyright (c) 2006-2009 by Topaz, Inc. 
    66 * http://topazproject.org 
    77 * 
     
    1818 * limitations under the License. 
    1919 */ 
    20 /*      ------------------------------------------------------------- 
    21  
    22         Annotation Style Sheet 
    23          
    24         CREATED ON      : 08-26-2006 
    25         MODIFIED ON     : 08-02-2007 
    26          
    27         CREATED BY      : MARGARET SHEAR 
    28         MODIFIED BY     : SEBASTIAN TOOMEY 
    29   
    30         ------------------------------------------------------------- */         
    3120 
    3221/* detail wraps annotation post details such as date and posting time and username */ 
     
    9685.annotate{ width: 42em; border: 3px solid #0bf; background: #fff url(../images/forms_bg.gif) repeat-x bottom; position:relative;} 
    9786 
     87div.contextActionDialog { padding:0;margin:0; } 
     88div.context div.tip { background:transparent url(../images/dialog_pb.gif) no-repeat 0px 0px; width:39px; height:22px; position:absolute; bottom: -22px; left:22px; } 
     89div.context div.tipu { background:transparent url(../images/dialog_pt.gif) no-repeat 0px 0px; width:39px; height:22px; position:absolute; top: -22px; left:22px; } 
     90 
     91div.context{ width:22em; border:3px solid #666; background:#fff url(../images/forms_bg.gif) repeat-x bottom; position:relative;} 
     92div.context div.contextActionContent { border:0px; margin:4px; line-height:1.1em; } 
     93div.context div.contextActionContent h5 { padding:0px 0px 3px 0px; margin:0px;} 
     94div.context div.contextActionContent ul { padding:5px 0px 0px 0px; margin:0px; list-style-type:dot;} 
     95div.context div.contextActionContent li { padding:0px; margin:0px 0px 0px 17px; } 
     96div.context div.contextActionContent input { padding:0px; margin:0px; float:right; } 
     97div.context div.contextActionContent form { padding-top:5px; } 
     98div.dijitTooltipContainer { border:0px; } 
     99 
    98100.loadingCycler { z-index: 99998 !important; } 
    99101.loadingCycler img { z-index: 99999 !important; } 
  • head/ambra/webapp/src/main/webapp/css/rating.css

    r6001 r7318  
    6969 
    7070/* Special for the inline overall rating appearing in the right-hand column widget */ 
    71 .inline-rating-rhc { float:left; margin-top:3px !important; position:static; }  
     71.inline-rating-rhc { float:left; position:static; }  
    7272.inline-rating-rhc .current-rating { float:none; position:static; } 
    7373.inline-rating-rhc .overall-rating { margin-left:0; } 
  • head/ambra/webapp/src/main/webapp/css/screen.css

    r7234 r7318  
    8282.noshow { display:block; height:0px; line-height:0em; } /* can be applied to elements that need to be present in the flow but not impact vertical spacing, e.g. in-page anchors */ 
    8383.clearer  { clear:both; line-height:0; height:0; display:none; } 
     84.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 
     85.clearfix { zoom:1; } /*zoom allows self-clearing floats to work in IE*/ 
    8486 
    8587/* Global : Icons and Links 
     
    110112 
    111113a.rating      { padding: 0 0 2px 5px; border: none; background: transparent; } 
    112 h6 a.rating { font-size: .9em; } 
    113114 
    114115/* portions of this icon set have been adapted Mark Jame's Silk icon set available under a Creative Commons Attribution 2.5 license at http://www.famfamfam.com/lab/icons/silk/ */ 
     
    194195#container                      { position: relative; } 
    195196#container, #hdr        { margin: 0 auto; min-width: 675px; max-width: 930px; } 
    196 #content                        { margin: 50px 4px 50px 22px; line-height: 1.8em; font-size: .9em; } 
     197#content                        { margin: 30px 4px 50px 22px; line-height: 1.8em; font-size: .9em; } 
    197198 
    198199/* Horizontal Advertising Banners : Top & Bottom Slots 
     
    329330----------------------------------------------------------= 
    330331*/ 
    331 div#rhc                 { float: right; width: 240px; position: relative; } 
     332 
     333/*TEMP STYLE: suppresses 2nd instance of research article title on the article page*/ 
     334div#articleMenu + h1 { display:none; } 
     335 
     336/* article page tabs */ 
     337div.horizontalTabs      { position:relative; border:0; margin-top:15px; padding:0; background:transparent; width:100%; } 
     338div.horizontalTabs:after  { content:"."; display: block; height:0; clear:left; visibility:hidden; } 
     339/*div#articleContainer div#researchArticle*/ ul#tabsContainer  { float:left;  margin:0!important; padding:0 0 0 10px!important; /* "!important" required for IE7 */ line-height:normal; background:transparent url("../images/tab_bg.gif") repeat-x bottom; width:640px; } 
     340ul#tabsContainer ul { margin:0; padding:10px 10px 0; } 
     341ul#tabsContainer li             { cursor:pointer; float:left; background:url("../images/tab_left.gif") no-repeat 0% 0%; margin:0 2px; padding:0 0 0 8px; list-style:none; font-size:.9em; font-weight:bold; color:#666; } 
     342ul#tabsContainer li a { display:block; float:left; background:url("../images/tab_right.gif") no-repeat 100% 0%;  padding:8px 16px 8px 8px!important; /* "!important" required for IE7 */ color:#666; text-decoration:none; } 
     343ul#tabsContainer li a:hover { color:#f60 } 
     344ul#tabsContainer li.active { background-position:0% -40px; } 
     345ul#tabsContainer li.active a { background-position:100% -40px; padding-bottom: 9px!important; } 
     346 
     347div#rhc                 { float: right; width: 240px; position: relative; margin-top:8px; } 
    332348div.browse div#rhc { padding:0; } 
    333349div.content     { margin-right: 255px; } 
     
    408424 
    409425/* Menu next to article title containing download links, print link, etc. */ 
    410 div#articleMenu { float:right; width:165px!important; margin:10px 0 20px 10px; padding:0 0 12px 10px; background:#fff; } 
    411 div#articleMenu ul { list-style-type:none; margin:0 15px 0 0; padding:0; background:none; position:static!important; } /* position:static fixes display issues in IE6 */ 
    412