Changeset 7318
- Timestamp:
- 03/02/09 10:43:14 (17 months ago)
- Location:
- head/ambra
- Files:
-
- 13 added
- 1 removed
- 26 modified
-
journals/journal-overlay/src/main/resources/struts/journals/overlayJournal/css/screen.css (modified) (29 diffs)
-
journals/journal-plosone/src/main/resources/struts/journals/plosone/article/article_content.ftl (deleted)
-
journals/journal-plosone/src/main/resources/struts/journals/plosone/article/browse.ftl (modified) (1 diff)
-
journals/journal-plosone/src/main/resources/struts/journals/plosone/global/global_topbanner.ftl (modified) (1 diff)
-
journals/journal-plosone/src/main/resources/struts/journals/plosone/images/button_info.png (added)
-
journals/journal-plosone/src/main/resources/struts/journals/plosone/images/dialog_pb.gif (modified) (previous)
-
journals/journal-plosone/src/main/resources/struts/journals/plosone/javascript/init_global.js (added)
-
libs/js/src/main/scripts/ambra/alm.js (added)
-
libs/js/src/main/scripts/ambra/displayAnnotationContext.js (added)
-
libs/js/src/main/scripts/ambra.profile.js (modified) (2 diffs)
-
libs/js/src/main/scripts/ambra/widget/ContextAction.js (added)
-
libs/js/src/main/scripts/ambra/widget/templates/ContextAction.html (added)
-
webapp/src/main/java/org/topazproject/ambra/article/action/FetchArticleAction.java (modified) (8 diffs)
-
webapp/src/main/java/org/topazproject/ambra/article/service/ArticleOtmService.java (modified) (8 diffs)
-
webapp/src/main/java/org/topazproject/ambra/rating/action/AbstractRatingAction.java (modified) (4 diffs)
-
webapp/src/main/java/org/topazproject/ambra/rating/action/GetArticleRatingsAction.java (modified) (9 diffs)
-
webapp/src/main/java/org/topazproject/ambra/rating/action/GetAverageRatingsAction.java (modified) (6 diffs)
-
webapp/src/main/java/org/topazproject/ambra/rating/action/RateAction.java (modified) (1 diff)
-
webapp/src/main/java/org/topazproject/ambra/rating/service/RatingsService.java (modified) (6 diffs)
-
webapp/src/main/resources/struts.xml (modified) (4 diffs)
-
webapp/src/main/resources/viewnlm-v2.xsl (modified) (1 diff)
-
webapp/src/main/webapp/article/article_body.ftl (modified) (3 diffs)
-
webapp/src/main/webapp/article/article_comments.ftl (added)
-
webapp/src/main/webapp/article/article_content.ftl (modified) (2 diffs)
-
webapp/src/main/webapp/article/article_related.ftl (added)
-
webapp/src/main/webapp/article/article_rhc.ftl (modified) (2 diffs)
-
webapp/src/main/webapp/article/article_rhc_rating.ftl (modified) (5 diffs)
-
webapp/src/main/webapp/article/article_tabs.ftl (added)
-
webapp/src/main/webapp/article/article_variables.ftl (added)
-
webapp/src/main/webapp/article/browse.ftl (modified) (1 diff)
-
webapp/src/main/webapp/css/annotation.css (modified) (3 diffs)
-
webapp/src/main/webapp/css/rating.css (modified) (1 diff)
-
webapp/src/main/webapp/css/screen.css (modified) (9 diffs)
-
webapp/src/main/webapp/javascript/init_article.js (modified) (8 diffs)
-
webapp/src/main/webapp/javascript/init_ratings.js (added)
-
webapp/src/main/webapp/javascript/init_related.js (added)
-
webapp/src/main/webapp/journals/plosJournals/article/article_body.ftl (modified) (3 diffs)
-
webapp/src/main/webapp/journals/plosJournals/article/article_content.ftl (modified) (2 diffs)
-
webapp/src/main/webapp/WEB-INF/urlrewrite.xml (modified) (1 diff)
-
webapp/src/main/webapp/widget/contextAction.ftl (added)
Legend:
- Unmodified
- Added
- Removed
-
head/ambra/journals/journal-overlay/src/main/resources/struts/journals/overlayJournal/css/screen.css
r7234 r7318 3 3 * $Id$ 4 4 * 5 * Copyright (c) 2006-200 8by Topaz, Inc.5 * Copyright (c) 2006-2009 by Topaz, Inc. 6 6 * http://topazproject.org 7 7 * … … 20 20 /* ------------------------------------------------------------- 21 21 22 GLOBAL STYLE SHEET FOR : OverlayJournal22 GLOBAL STYLE SHEET FOR : Ambra Journal 23 23 CREATED ON : 08-26-2006 24 24 CREATED BY : MARGARET SHEAR … … 31 31 32 32 html { 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;}33 body { font: 82.5% Verdana, Arial, Helvetica, sans-serif; color: #303030; margin: 0; border-bottom: 6px solid #202020; min-height: 100%; } 34 a:link { color: #c60; text-decoration: underline; } 35 a:visited { color: #a25100; } 36 a:hover { color: #f60; text-decoration: none;} 37 37 a:active { } 38 38 :active, :focus { outline-style: none; -moz-outline-style:none; } … … 65 65 dd { margin: 0; } 66 66 table { 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; }67 th { padding: 6px; background-color: #fdae7a; border: 4px solid #FFF; border-width: 0 3px 3px 0; font-weight: bold;} 68 td { padding: 6px; background-color: #fcd3b8; border: 4px solid #FFF; border-width: 0 3px 3px 0; } 69 69 /* Default Headings */ 70 70 h1, 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 */ } … … 80 80 ---------------------------------------------------------- 81 81 */ 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*/ 84 86 85 87 /* Global : Icons and Links … … 91 93 a.trackback:visited, 92 94 a.rating:visited, 93 a.annotation:visited, 95 a.annotation:visited, 94 96 a.user:visited, 95 97 a.instructions:visited, 96 98 a.addannotation:visited, 97 a.corrections:visited { color: # 369; }99 a.corrections:visited { color: #c60; } 98 100 99 101 a.tooltip, … … 110 112 111 113 a.rating { padding: 0 0 2px 5px; border: none; background: transparent; } 112 h6 a.rating { font-size: .9em; }113 114 114 115 /* 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/ */ … … 185 186 div.pane div.post a:hover { background-color: #393; } 186 187 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;} */ 188 189 189 190 /* Main Container: Main Menu : Elements … … 194 195 #container { position: relative; } 195 196 #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; } 197 198 198 199 /* Horizontal Advertising Banners : Top & Bottom Slots … … 215 216 div#hdr { height: 150px; position: relative; z-index: 997;} 216 217 #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; } 218 219 #hdr #logo a { width: 300px; height: 90px; display: block; position:relative; } 219 220 #hdr #logo span, … … 232 233 ul#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%; } 233 234 ul#nav li { float: left; position: relative; list-style-type: none; margin: 0; padding: 0; } 234 #nav li a, 235 #nav li a, 235 236 #nav li a:visited 236 237 { 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; } 237 238 #nav li li { width: 100%; position: relative; z-index: 802;} 238 239 #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 */ 240 242 /* Note that class li.over is dynamically written into html from init_navigation.js -SWT */ 241 243 #nav li.over a, 242 244 #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; } 244 246 #nav li.over ul, 245 247 #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;} 247 249 248 250 #nav li.over li a, 249 251 #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; } 251 253 252 254 #nav li.over ul li a:hover, 253 255 #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;} 255 257 #nav li.journalnav { float: right; margin-right: 14px;} 256 258 257 259 258 260 /* 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;} 260 262 #db fieldset { padding: 0; margin: 0; background-color: transparent; vertical-align: top; width: 327px; border: none; } 261 263 #db fieldset div{ position: relative; } … … 293 295 #user ul li { list-style-type: none;display: inline; } 294 296 #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; } 296 298 #user a:link, 297 #user a:visited { color: # 369!important; }299 #user a:visited { color: #c60!important; } 298 300 #hdr #user a:hover { text-decoration: underline; } 299 301 … … 317 319 div#ftr ul { margin: 0; padding: 0; list-style-type: none; } 318 320 div#ftr ul li { margin: 0 5px; display: inline; } 319 /*div#ftr ul a, div#ftr ul a:visited { color: #c00;}*/320 321 div#ftr img { margin: 0 10px -8px 10px; display: inline; } 321 322 div#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; }323 div#ftr p span { display: inline; background-color:#fff; padding: 8px 8px 8px 25px; } 323 324 div#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;} 324 325 div.powered a:link, 325 div.powered a:visited ,326 div.powered a:hover { color: #ccc; font-weight: bold;}326 div.powered a:visited { color: #fff; font-weight: bold; } 327 div.powered a:hover { text-decoration:none; } 327 328 328 329 /* Research Article : Elements 329 330 ----------------------------------------------------------= 330 331 */ 331 div#rhc { float: right; width: 240px; position: relative; } 332 333 /*TEMP STYLE: suppresses 2nd instance of research article title on the article page*/ 334 div#articleMenu + h1 { display:none; } 335 336 /* article page tabs */ 337 div.horizontalTabs { position:relative; border:0; margin-top:15px; padding:0; background:transparent; width:100%; } 338 div.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; } 340 ul#tabsContainer ul { margin:0; padding:10px 10px 0; } 341 ul#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; } 342 ul#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; } 343 ul#tabsContainer li a:hover { color:#f60 } 344 ul#tabsContainer li.active { background-position:0% -40px; } 345 ul#tabsContainer li.active a { background-position:100% -40px; padding-bottom: 9px!important; } 346 347 div#rhc { float: right; width: 240px; position: relative; margin-top:8px; } 348 div.browse div#rhc { padding:0; } 332 349 div.content { margin-right: 255px; } 333 350 … … 338 355 339 356 div.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;}357 div.search h1 { padding-top: 10px; border-top: 6px solid #f60; } 358 div.pageerror h1 { background-color: #f60; color:#fff; padding: 8px;} 342 359 div.pageerror p { margin-left: 8px; } 343 360 div.content h2 { /* article sub-title */ margin: 10px 0; font-style: italic; font-size: 1.5em; background: none; padding: 0;} … … 377 394 div.content dd p { margin:0; } 378 395 379 div#contentHeader { /* open access image */ position: relative; top:0; height:34px; margin:0; background:# 666url(../images/content_oa.gif) no-repeat 100% 0; }396 div#contentHeader { /* open access image */ position: relative; top:0; height:34px; margin:0; background:#c60 url(../images/content_oa.gif) no-repeat 100% 0; } 380 397 div#contentHeader p { margin: 0; padding:0; text-indent: -9999px; } 381 398 div#contentHeader p#articleType { text-transform:uppercase; text-indent:7px; margin-top:-13px; font-weight:bold; color:#fff; background-color:transparent; } 382 399 383 div#publisher { border-bottom:1px dashed # 369; background-color:#fff; } /* background color allows bottom border to display in IE6 */400 div#publisher { border-bottom:1px dashed #c60; background-color:#fff; } /* background color allows bottom border to display in IE6 */ 384 401 div#publisher p { margin:0 0 2px 0; } 385 402 div#publisher p a { font-weight:bold; font-style:italic; } … … 389 406 ol.references a.find { font-size: .9em; text-transform: uppercase; font-weight: bold; margin-left: 4px;} 390 407 391 p.oa-banner { margin: 0; padding: 5px 0;font-size: .85em; border-bottom: 8px solid # 069; color: #666; }408 p.oa-banner { margin: 0; padding: 5px 0;font-size: .85em; border-bottom: 8px solid #c60; color: #666; } 392 409 p.authors { margin: 10px 0 0 0; font-weight: bold; font-size: 1.1em; } 393 410 p.affiliations { font-size: .85em; margin: 0; } … … 401 418 div.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; } 402 419 span.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; }420 div.box { color: #000; padding: 10px; background-color: #fcd3b8; margin: 10px 0; } 404 421 div.content div.box h3, 405 422 div.content div.box h4 { margin:0; } … … 407 424 408 425 /* 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 */ 426 div.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; } 427 div.content div#articleMenu div.wrap { background:#fcd3b8 url(../images/articleMenu_top.gif) no-repeat top left; margin-bottom:8px; padding-top:8px; zoom:1; } 428 div.content div#articleMenu p { margin-bottom:0; padding:0 8px 0 23px; } 429 div.content div#articleMenu ul { margin:0; padding:0 8px 0 23px; position:static!important; } /* position:static fixes display issues in IE6 */ 430 div.content div#articleMenu ul li { background-image:none; padding:2px 0; line-height:1.5em; } 431 div.content div#articleMenu ul li.annotation, 432 div.content div#articleMenu ul li.discuss { background-position:0 2px; background-repeat:no-repeat; padding-left:18px; } 433 div.content div#articleMenu ul li.annotation { background-image: url(../images/icon_annotation.gif); } 434 div.content div#articleMenu ul li.discuss { background-image: url(../images/icon_discuss.gif); } 435 436 /* Related articles in right column on article pages */ 437 div#sideNav dl.related { margin:0 0 20px 0; padding:9px 0 .5em 0; border-bottom:1px solid #999; background-color:#fff; } 438 div#sideNav dl.related dt { font-size:1em; text-transform:uppercase; color:#303030; margin-bottom:.5em; } 439 div#sideNav dl.related dt em { text-transform:none; font-style:normal } 440 div#sideNav dl.related dd { line-height:1.2em; margin-bottom:.5em; } 441 div#sideNav dl.related dd a:link, 442 div#sideNav dl.related dd a:visited { font-size:.95em; text-decoration:none; } 443 div#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*/ 437 475 438 476 /* correction article type styles */ … … 441 479 /* correction note types, header, and associated page styles */ 442 480 div#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; } 481 div#discussionContainer div.corrections div.original div.hd h3 { text-indent:20px; color:#ff0000; } 444 482 445 483 div.corrections td.title a, … … 450 488 div.fch p.fch, 451 489 div.corrections td.title a, 490 a.corrections, 452 491 div#discussionContainer div.corrections div.original div.hd h3 { background:url(../images/icon_correction.gif) left 0% no-repeat; } 453 492 div.fch p.fch { margin:8px 8px 0; text-indent:20px; } … … 458 497 div.fch ol li p a:visited { font-weight:normal; color:#004e9c; } 459 498 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;} 499 div#ratingRhc1 { margin-bottom:5px;} 500 div#ratingRhc1 ol, 501 div#ratingRhc1 li { margin:0; padding:0; list-style-type: none; } 502 div#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*/ 503 div#ratingRhc1 div#ratingAverages li { font-weight: bold; position: relative; } 504 div#ratingRhc1 label { font-weight: normal; } 505 div#ratingRhc1 a.rating { white-space:nowrap; } 506 div#ratingRhc1 div#ratingAverages { background-color:#EEEEEE; border-color:#CCCCCC; border-style:solid; border-width:1px 0; margin:3px 0; padding:10px;} 490 507 491 508 ol.ratingAvgs { padding: 0; margin: 0; } 492 509 ol.ratingAvgs, 493 510 ol.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;} 511 ol.ratingAvgs li { padding: 0 0 0 10px; margin: 0; height: 2em;} 497 512 ol.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 512 513 513 514 div.buttons { margin: 6px 0; padding: 0; background: url(../images/buttons_bg.gif) no-repeat; background-position: 0 -32px; position: relative;} … … 520 521 521 522 522 div.figure { background-color: # efefef; padding: 10px; font-size: .85em; margin: 10px 0;}523 div.figure { background-color: #fcd3b8; padding: 10px; font-size: .85em; margin: 10px 0;} 523 524 div.figure:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 524 525 div.figure h5 { float:none; margin: 0; color: #000;} … … 526 527 #content div.figure img.thumbnail { margin: 0 10px 10px 0; float: left;} /* only thumbnails will float, not in-line images */ 527 528 div.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; }529 div.figure a:hover img { border: 2px solid #c60; } 529 530 530 531 span.equation { width: 100%; margin: 20px 0; font-weight: bold; font-size: .85em; text-align: right; padding: 0 10px; } … … 539 540 a.bug, 540 541 a:visited.bug { 541 position:relative; 542 position:relative; 542 543 top:-5px; 543 544 margin-right:2px; 544 545 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; 548 549 font-weight:bold; 549 550 background:url(../images/annotation_bug.gif) top right no-repeat; … … 595 596 596 597 /* ------ 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;}598 div#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;} 598 599 div.profile img { float: left; margin: 20px 0 0 20px;} 599 600 div.profile h1 { position: absolute; left: 120px; margin: 0; padding-bottom: 10px; padding-top: 10px;top: 60px;} 600 601 div.profile h2 { background-image: none; clear: left; } 601 602 div.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; }603 div.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; } 603 604 div.profile li em{ color: #555; font-size: .9em;} 604 605 div.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; }606 div.profile ol li input { width: 200px; border: 1px solid #fdae7a; padding: 2px; } 607 div.profile ol li .long-input { width: 324px; } 608 div.profile ol li select { width: 206px; border: 1px solid #fdae7a; padding: 2px; } 608 609 div.profile ol li .radio { width: 14px;} 609 610 div.profile ol li .checkbox { width: 14px;} 610 div.profile textarea {width: 324px; border: 1px solid # ACF1FF; }611 div.profile textarea {width: 324px; border: 1px solid #fdae7a; } 611 612 div.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; }620 613 621 614 /* ------ EdBoard Styles ----*/ 622 615 .edboard dl { text-align: right; margin: 0 240px 0 0; } 623 616 .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;} 630 620 631 621 /* ------ Search Styles ----*/ … … 643 633 div.source { padding: 0; font-size: 1.3em; font-weight:bold; margin: 10px 0; } 644 634 div.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; }635 div.source a:visited { color:#c60; } 636 div.source a:hover { color:#f60; text-decoration:underline; } 647 637 div.source a:hover span.inline-rating { text-decoration:none; background-color:#fff; } 648 638 /* span wraps original article label */ … … 681 671 682 672 /*--- 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; } 673 p#issueNav { margin:0; padding:0; position:relative; font-size:0.9em; } 674 p#issueNav a:link, 675 p#issueNav a:visited { text-decoration:none; } 676 p#issueNav a:hover { text-decoration:underline; } 677 div.toc div#rhc { margin-top:-9px; padding-top:0; } 685 678 div.toc div#rhc div#floatMarker { line-height:0; margin:0; padding:0; display:none; } /* see floatingMenu.js */ 686 679 div.toc h1, 687 div.archive h1 { width:99%; margin-bottom: 20px; padding-top: 10px; border-top: 6px solid # 666; }680 div.archive h1 { width:99%; margin-bottom: 20px; padding-top: 10px; border-top: 6px solid #f60; } 688 681 div#issueImage { margin:30px 0 15px 0; } 689 682 div#issueImage h4 { display:inline; font-size:0.9em; font-style:italic; font-family:Verdana, Arial, Helvetica, sans-serif; margin:0; padding:0; } … … 700 693 div.toc #search-results { margin-top:0; padding:0; } 701 694 div.toc h2, 702 div.archive h2 { margin:15px 0 0 0; font-size:170%; font-style:normal; border-bottom:1px solid # 666}695 div.archive h2 { margin:15px 0 0 0; font-size:170%; font-style:normal; border-bottom:1px solid #c60 } 703 696 div.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 */ 704 697 div.toc h3, … … 712 705 div.toc dl.related dt, 713 706 div.toc dl.related dd { margin-bottom:.2em; font-size:.9em; line-height:1.5em; } 714 div.toc dl.related dt { color:#666 }707 div.toc dl.related dt { float:none; color:#666 } 715 708 div.toc dl.related dt em { font-style:normal } 716 709 -
head/ambra/journals/journal-plosone/src/main/resources/struts/journals/plosone/article/browse.ftl
r5568 r7318 101 101 <span class="date">Published ${art.date?string("dd MMM yyyy")}</span> 102 102 <@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> 104 104 <span class="authors"> 105 105 <#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 38 38 <!-- begin : left banner slot --> 39 39 <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"> 41 41 </iframe> 42 42 </div> -
head/ambra/libs/js/src/main/scripts/ambra.profile.js
r6338 r7318 11 11 "dijit.layout.TabContainer", 12 12 "dojox.data.dom", 13 "ambra.alm", 13 14 "ambra.general", 14 15 "ambra.domUtil", … … 22 23 "ambra.annotation", 23 24 "ambra.corrections", 25 "ambra.displayAnnotationContext", 24 26 "ambra.displayComment", 25 27 "ambra.responsePanel", -
head/ambra/webapp/src/main/java/org/topazproject/ambra/article/action/FetchArticleAction.java
r7298 r7318 19 19 package org.topazproject.ambra.article.action; 20 20 21 import java.net.URI; 22 import java.util.ArrayList; 23 import java.util.Set; 21 import org.topazproject.ambra.action.BaseSessionAwareActionSupport; 22 import org.topazproject.ambra.model.article.ArticleInfo; 23 import org.topazproject.ambra.model.article.ArticleType; 24 import org.topazproject.ambra.rating.service.RatingsService; 25 import org.topazproject.ambra.article.service.BrowseService; 26 import org.topazproject.ambra.article.service.ArticleOtmService; 27 import org.topazproject.ambra.article.service.NoSuchArticleIdException; 28 import org.topazproject.ambra.article.service.FetchArticleService; 29 import org.topazproject.ambra.journal.JournalService; 30 import org.topazproject.ambra.models.Journal; 31 import org.topazproject.ambra.models.Article; 32 import org.topazproject.ambra.models.Retraction; 33 import org.topazproject.ambra.models.ArticleAnnotation; 34 import org.topazproject.ambra.models.MinorCorrection; 35 import org.topazproject.ambra.models.FormalCorrection; 36 import org.topazproject.ambra.ApplicationException; 37 import org.topazproject.ambra.annotation.service.AnnotationService; 38 import org.topazproject.ambra.annotation.service.WebAnnotation; 39 import org.topazproject.ambra.annotation.service.AnnotationConverter; 40 import org.topazproject.ambra.annotation.service.ReplyService; 41 import org.topazproject.ambra.annotation.Commentary; 42 import org.springframework.beans.factory.annotation.Required; 43 import org.springframework.transaction.annotation.Transactional; 24 44 25 45 import org.apache.commons.logging.Log; 26 46 import org.apache.commons.logging.LogFactory; 27 47 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; 48 import java.net.URI; 49 import java.util.Set; 50 import java.util.ArrayList; 51 import java.util.Arrays; 46 52 47 53 import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator; 48 54 49 55 /** 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 * 51 75 */ 52 @SuppressWarnings("serial") 53 public class FetchArticleAction extends BaseActionSupport { 76 public class FetchArticleAction extends BaseSessionAwareActionSupport { 77 private static final Log log = LogFactory.getLog(FetchArticleAction.class); 78 private final ArrayList<String> messages = new ArrayList<String>(); 79 54 80 private String articleURI; 81 private String transformedArticle; 55 82 private String annotationId = ""; 56 83 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; 64 94 private Article articleInfo; 65 95 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; 70 101 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 */ 82 114 @Transactional(readOnly = true) 83 public String execute() {115 public String FetchArticle() { 84 116 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 121 121 } catch (NoSuchArticleIdException e) { 122 122 messages.add("No article found for id: " + articleURI); … … 132 132 133 133 /** 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 138 136 */ 139 137 @Transactional(readOnly = true) 140 public String displayAnnotatedArticle() {138 public String FetchArticleComments() { 141 139 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; 143 147 } 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); 145 150 return ERROR; 146 151 } … … 149 154 150 155 /** 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 } 159 273 } 160 274 161 275 /** 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 162 284 * @param fetchArticleService fetchArticleService 163 285 */ … … 167 289 } 168 290 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 176 335 177 336 /** … … 191 350 } 192 351 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; 275 357 } 276 358 … … 291 373 292 374 /** 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. 294 391 */ 295 392 public Article getArticleInfo() { … … 298 395 299 396 /** 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; 321 406 } 322 407 … … 329 414 330 415 /** 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; 340 493 } 341 494 } -
head/ambra/webapp/src/main/java/org/topazproject/ambra/article/service/ArticleOtmService.java
r7197 r7318 27 27 import java.util.Date; 28 28 import java.util.List; 29 import java.util.Set; 30 import java.util.Iterator; 29 31 30 32 import javax.activation.DataSource; … … 38 40 import org.springframework.transaction.annotation.Transactional; 39 41 42 import org.topazproject.ambra.ApplicationException; 43 import org.topazproject.ambra.cache.Cache; 44 import org.topazproject.ambra.rating.action.ArticleRatingSummary; 40 45 import org.topazproject.ambra.models.Article; 41 46 import org.topazproject.ambra.models.ObjectInfo; 42 47 import org.topazproject.ambra.models.Representation; 48 import org.topazproject.ambra.models.RatingSummary; 49 import org.topazproject.ambra.models.Rating; 50 import org.topazproject.ambra.models.UserAccount; 51 import org.topazproject.ambra.models.Trackback; 52 import org.topazproject.ambra.models.Category; 53 import org.topazproject.ambra.model.article.ArticleType; 43 54 import org.topazproject.ambra.permission.service.PermissionsService; 44 55 import org.topazproject.otm.Session; 45 56 import org.topazproject.otm.Query; 57 import org.topazproject.otm.OtmException; 58 import org.topazproject.otm.criterion.Restrictions; 59 import org.topazproject.otm.criterion.Order; 46 60 import org.topazproject.otm.query.Results; 47 61 … … 53 67 public class ArticleOtmService { 54 68 private static final Log log = LogFactory.getLog(ArticleOtmService.class); 69 private static final String TRACK_BACKS_KEY = "Trackbacks-"; 55 70 56 71 private String smallImageRep; … … 61 76 private Session session; 62 77 private PermissionsService permissionsService; 78 private Cache articleAnnotationCache; 63 79 private Configuration configuration; 64 80 … … 394 410 * @param articleIds list of article id's 395 411 * @return <code>List<Article></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 { 400 417 List<Article> articleList = new ArrayList<Article>(); 401 418 for (String id : articleIds) … … 466 483 return convertedObjectInfos; 467 484 } 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 } 468 511 469 512 /** … … 513 556 } 514 557 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 515 659 private SecondaryObject convert(final ObjectInfo objectInfo) { 516 660 return new SecondaryObject(objectInfo, smallImageRep, mediumImageRep, largeImageRep); … … 577 721 } 578 722 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 } 579 731 580 732 private static class ByteArrayDataSource implements DataSource { -
head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/AbstractRatingAction.java
r7197 r7318 19 19 package org.topazproject.ambra.rating.action; 20 20 21 import java.net.URI;22 23 21 import org.apache.commons.logging.Log; 24 22 import org.apache.commons.logging.LogFactory; … … 26 24 import org.springframework.beans.factory.annotation.Required; 27 25 28 import org.topazproject.ambra.ApplicationException;29 26 import org.topazproject.ambra.action.BaseSessionAwareActionSupport; 30 27 import 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;34 28 35 29 /** … … 45 39 46 40 /** 41 * Sets the article OTM service for any sub classes to call 42 * 47 43 * @param articleOtmService the ArticleOtmService to set 48 44 */ … … 51 47 this.articleOtmService = articleOtmService; 52 48 } 53 54 /**55 * Determines if an article is a research type article.56 *57 * @param articleURI The URI of the article.58 * @return true/false59 * @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 properties65 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 }77 49 } -
head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/GetArticleRatingsAction.java
r7197 r7318 2 2 * $Id$ 3 3 * 4 * Copyright (c) 2007-200 8by Topaz, Inc.4 * Copyright (c) 2007-2009 by Topaz, Inc. 5 5 * http://topazproject.org 6 6 * … … 35 35 import org.topazproject.ambra.models.UserAccount; 36 36 import org.topazproject.ambra.rating.service.RatingsPEP; 37 import org.topazproject.ambra.rating.service.RatingsService; 38 import org.topazproject.ambra.rating.service.RatingsService.AverageRatings; 37 39 import org.topazproject.otm.Session; 38 40 import org.topazproject.otm.criterion.Order; … … 49 51 public class GetArticleRatingsAction extends AbstractRatingAction { 50 52 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; 58 61 private final List<ArticleRatingSummary> articleRatingSummaries = 59 62 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; 63 66 64 67 private RatingsPEP getPEP() { … … 89 92 articleTitle = article.getDublinCore().getTitle(); 90 93 articleDescription = article.getDublinCore().getDescription(); 91 92 isResearchArticle = isResearchArticle(articleURI); 94 averageRatings = ratingsService.getAverageRatings(articleURI); 95 96 isResearchArticle = articleOtmService.isResearchArticle(articleURI); 93 97 94 98 // assume if valid RatingsPEP.GET_RATINGS, OK to GET_STATS … … 117 121 // create ArticleRatingSummary(s) 118 122 for (Rating rating : articleRatings) { 119 ArticleRatingSummary summary = new ArticleRatingSummary( 120 getArticleURI(), getArticleTitle()); 123 ArticleRatingSummary summary = new ArticleRatingSummary(getArticleURI(), getArticleTitle()); 121 124 summary.setRating(rating); 122 125 summary.setCreated(rating.getCreated()); … … 136 139 } 137 140 138 if(articleRatingSummaries.size() > 0) {139 hasRated = true;140 }141 142 141 if(log.isDebugEnabled()) { 143 142 log.debug("created ArticleRatingSummaries, " + articleRatingSummaries.size() + … … 239 238 240 239 /** 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 /** 241 250 * Set the OTM session. Called by spring's bean wiring. 242 251 * … … 249 258 250 259 /** 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 /**269 260 * Gets all ratings for the Article. 270 261 * … … 274 265 return articleRatingSummaries; 275 266 } 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 } 276 285 } -
head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/GetAverageRatingsAction.java
r7197 r7318 2 2 * $Id$ 3 3 * 4 * Copyright (c) 2007-200 8by Topaz, Inc.4 * Copyright (c) 2007-2009 by Topaz, Inc. 5 5 * http://topazproject.org 6 6 * … … 21 21 import org.springframework.beans.factory.annotation.Required; 22 22 import org.springframework.transaction.annotation.Transactional; 23 24 23 import org.topazproject.ambra.rating.service.RatingsService; 25 import org.topazproject.ambra. user.AmbraUser;24 import org.topazproject.ambra.rating.service.RatingsService.AverageRatings; 26 25 27 26 /** … … 32 31 @SuppressWarnings("serial") 33 32 public 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; 39 38 40 39 /** … … 46 45 @Transactional(readOnly = true) 47 46 public String execute() throws Exception { 48 av g= ratingsService.getAverageRatings(articleURI);47 averageRatings = ratingsService.getAverageRatings(articleURI); 49 48 hasRated = ratingsService.hasRated(articleURI, getCurrentUser()); 50 isResearchArticle = isResearchArticle(articleURI);49 isResearchArticle = articleOtmService.isResearchArticle(articleURI); 51 50 return SUCCESS; 52 51 } … … 87 86 } 88 87 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; 200 95 } 201 96 … … 205 100 * @return Returns the hasRated. 206 101 */ 207 public boolean isHasRated() {102 public boolean getHasRated() { 208 103 return hasRated; 209 104 } 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 singleRatingRoundedAverage240 */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 }262 105 } -
head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/RateAction.java
r7197 r7318 110 110 111 111 try { 112 isResearchArticle = isResearchArticle(articleURI);112 isResearchArticle = articleOtmService.isResearchArticle(articleURI); 113 113 } catch (Exception ae) { 114 114 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 2 2 * $Id$ 3 3 * 4 * Copyright (c) 2006-200 8by Topaz, Inc.4 * Copyright (c) 2006-2009 by Topaz, Inc. 5 5 * http://topazproject.org 6 6 * … … 127 127 * 128 128 * @param ratingId Rating Id 129 * 130 * @param user 129 * @param user current ambra user 131 130 * @return Rating 132 131 */ … … 253 252 private static final long serialVersionUID = -2890067268188424471L; 254 253 255 p ublicfinal double total;256 p ublicfinal int count;257 p ublicfinal double average;258 p ublicfinal double rounded;254 private final double total; 255 private final int count; 256 private final double average; 257 private final double rounded; 259 258 260 259 Average(double total, int count) { … … 270 269 ", rounded = " + rounded; 271 270 } 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 } 272 287 } 273 288 … … 275 290 private static final long serialVersionUID = -1666766336307635633L; 276 291 277 p ublicfinal Average style;278 p ublicfinal Average insight;279 p ublicfinal Average reliability;280 p ublicfinal Average single;281 p ublicfinal int numUsersThatRated;282 p ublicfinal double overall;283 p ublicfinal 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; 284 299 285 300 AverageRatings() { … … 318 333 ", roundedOverall = " + roundedOverall; 319 334 } 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 } 320 364 } 321 365 -
head/ambra/webapp/src/main/resources/struts.xml
r7298 r7318 260 260 261 261 <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>273 262 <action name="getAverageRatings" class="org.topazproject.ambra.rating.action.GetAverageRatingsAction"> 274 263 <result name="success">/WEB-INF/pages/article/articleRatings.ftl</result> … … 346 335 </action> 347 336 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> 363 358 </result> 364 359 </action> … … 398 393 </action> 399 394 400 <action name="fetchBody" class="org.topazproject.ambra.article.action.FetchArticleAction" >395 <action name="fetchBody" class="org.topazproject.ambra.article.action.FetchArticleAction" method="fetchArticle"> 401 396 <result name="success" type="ambraFreemarker"> 402 397 <param name="location">/article/article_content.ftl</param> … … 405 400 </action> 406 401 407 <action name="fetchArticleRhc" class="org.topazproject.ambra.article.action.FetchArticleAction" >402 <action name="fetchArticleRhc" class="org.topazproject.ambra.article.action.FetchArticleAction" method="fetchArticle"> 408 403 <result name="success" type="ambraFreemarker"> 409 404 <param name="location">/article/article_rhc_count.ftl</param> -
head/ambra/webapp/src/main/resources/viewnlm-v2.xsl
r7298 r7318 2011 2011 <xsl:apply-templates select="label"/> 2012 2012 </xsl:element> 2013 < xsl:apply-templates select="caption/title"/>2013 <!--xsl:apply-templates select="caption/title"/--> 2014 2014 </strong> 2015 2015 -
head/ambra/webapp/src/main/webapp/article/article_body.ftl
r6028 r7318 3 3 $Id$ 4 4 5 Copyright (c) 2007-200 8by Topaz, Inc.5 Copyright (c) 2007-2009 by Topaz, Inc. 6 6 http://topazproject.org 7 7 … … 18 18 limitations under the License. 19 19 --> 20 <#include "article_variables.ftl"> 20 21 <div id="content" class="article" style="visibility:visible;"> 21 22 <#include "article_rhc.ftl"> … … 31 32 <div style="visibility:hidden"> 32 33 <#include "/widget/annotation_add.ftl"> 34 <#include "/widget/contextAction.ftl"> 33 35 <#include "/widget/commentDialog.ftl"> 34 36 <#include "/widget/ratingDialog.ftl"> -
head/ambra/webapp/src/main/webapp/article/article_content.ftl
r7298 r7318 2 2 $HeadURL:: $ 3 3 $Id$ 4 4 5 5 Copyright (c) 2007-2009 by Topaz, Inc. 6 6 http://topazproject.org 7 7 8 8 Licensed under the Apache License, Version 2.0 (the "License"); 9 9 you may not use this file except in compliance with the License. 10 10 You may obtain a copy of the License at 11 11 12 12 http://www.apache.org/licenses/LICENSE-2.0 13 13 14 14 Unless required by applicable law or agreed to in writing, software 15 15 distributed under the License is distributed on an "AS IS" BASIS, … … 18 18 limitations under the License. 19 19 --> 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> 49 52 </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"/>82 53 </div> 54 <@s.property value="transformedArticle" escape="false"/> 55 </div> -
head/ambra/webapp/src/main/webapp/article/article_rhc.ftl
r7251 r7318 2 2 $HeadURL:: $ 3 3 $Id$ 4 4 5 5 Copyright (c) 2007-2009 by Topaz, Inc. 6 6 http://topazproject.org 7 7 8 8 Licensed under the Apache License, Version 2.0 (the "License"); 9 9 you may not use this file except in compliance with the License. 10 10 You may obtain a copy of the License at 11 11 12 12 http://www.apache.org/licenses/LICENSE-2.0 13 13 14 14 Unless required by applicable law or agreed to in writing, software 15 15 distributed under the License is distributed on an "AS IS" BASIS, … … 19 19 --> 20 20 <!-- 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}"/> 22 30 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> 24 41 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> 36 47 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"> 103 50 <#include "/article/article_rhc_rating.ftl"> 104 51 </div> 52 </div> 105 53 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> 107 118 </div> 108 119 </div> 109 110 111 </div>112 120 <!-- end : right hand column --> -
head/ambra/webapp/src/main/webapp/article/article_rhc_rating.ftl
r6001 r7318 3 3 $Id$ 4 4 5 Copyright (c) 2007-200 8by Topaz, Inc.5 Copyright (c) 2007-2009 by Topaz, Inc. 6 6 http://topazproject.org 7 7 … … 18 18 limitations under the License. 19 19 --> 20 <#if numUsersThatRated != 1>20 <#if (averageRatings.numUsersThatRated != 1)> 21 21 <#assign char = "s"> 22 22 <#else> … … 24 24 </#if> 25 25 <@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> 27 27 <ol> 28 28 <li> 29 29 <#if isResearchArticle == true> 30 30 <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> 33 33 </ul> 34 34 <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> 35 35 <div id="ratingAverages"> 36 <ol class="rating Avgs">36 <ol class="ratingaverageRatings."> 37 37 <li><label for="insight">Insight</label> 38 38 <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> 41 41 </ul> 42 42 </li> 43 43 <li><label for="reliability">Reliability</label> 44 44 <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> 47 47 </ul> 48 48 </li> 49 49 <li><label for="style">Style</label> 50 50 <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> 53 53 </ul> 54 54 </li> … … 57 57 <#else> 58 58 <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> 61 61 </ul> 62 62 </#if> 63 63 <#if Session[freemarker_config.userAttributeKey]?exists> 64 <#if hasRated>64 <#if HasRated> 65 65 <a href="javascript:void(0);" onclick="return ambra.rating.show('edit');" class="rating">Edit My Rating</a> 66 66 <#else> … … 72 72 </li> 73 73 </ol> 74 -
head/ambra/webapp/src/main/webapp/article/browse.ftl
r5578 r7318 73 73 <span class="date">Published ${art.date?string("dd MMM yyyy")}</span> 74 74 <@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> 76 76 <span class="authors"> 77 77 <#list art.authors as auth><#if auth_index gt 0>, </#if>${auth}</#list> -
head/ambra/webapp/src/main/webapp/css/annotation.css
r7298 r7318 3 3 * $Id$ 4 4 * 5 * Copyright (c) 2006-200 8by Topaz, Inc.5 * Copyright (c) 2006-2009 by Topaz, Inc. 6 6 * http://topazproject.org 7 7 * … … 18 18 * limitations under the License. 19 19 */ 20 /* -------------------------------------------------------------21 22 Annotation Style Sheet23 24 CREATED ON : 08-26-200625 MODIFIED ON : 08-02-200726 27 CREATED BY : MARGARET SHEAR28 MODIFIED BY : SEBASTIAN TOOMEY29 30 ------------------------------------------------------------- */31 20 32 21 /* detail wraps annotation post details such as date and posting time and username */ … … 96 85 .annotate{ width: 42em; border: 3px solid #0bf; background: #fff url(../images/forms_bg.gif) repeat-x bottom; position:relative;} 97 86 87 div.contextActionDialog { padding:0;margin:0; } 88 div.context div.tip { background:transparent url(../images/dialog_pb.gif) no-repeat 0px 0px; width:39px; height:22px; position:absolute; bottom: -22px; left:22px; } 89 div.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 91 div.context{ width:22em; border:3px solid #666; background:#fff url(../images/forms_bg.gif) repeat-x bottom; position:relative;} 92 div.context div.contextActionContent { border:0px; margin:4px; line-height:1.1em; } 93 div.context div.contextActionContent h5 { padding:0px 0px 3px 0px; margin:0px;} 94 div.context div.contextActionContent ul { padding:5px 0px 0px 0px; margin:0px; list-style-type:dot;} 95 div.context div.contextActionContent li { padding:0px; margin:0px 0px 0px 17px; } 96 div.context div.contextActionContent input { padding:0px; margin:0px; float:right; } 97 div.context div.contextActionContent form { padding-top:5px; } 98 div.dijitTooltipContainer { border:0px; } 99 98 100 .loadingCycler { z-index: 99998 !important; } 99 101 .loadingCycler img { z-index: 99999 !important; } -
head/ambra/webapp/src/main/webapp/css/rating.css
r6001 r7318 69 69 70 70 /* 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; } 72 72 .inline-rating-rhc .current-rating { float:none; position:static; } 73 73 .inline-rating-rhc .overall-rating { margin-left:0; } -
head/ambra/webapp/src/main/webapp/css/screen.css
r7234 r7318 82 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 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*/ 84 86 85 87 /* Global : Icons and Links … … 110 112 111 113 a.rating { padding: 0 0 2px 5px; border: none; background: transparent; } 112 h6 a.rating { font-size: .9em; }113 114 114 115 /* 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/ */ … … 194 195 #container { position: relative; } 195 196 #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; } 197 198 198 199 /* Horizontal Advertising Banners : Top & Bottom Slots … … 329 330 ----------------------------------------------------------= 330 331 */ 331 div#rhc { float: right; width: 240px; position: relative; } 332 333 /*TEMP STYLE: suppresses 2nd instance of research article title on the article page*/ 334 div#articleMenu + h1 { display:none; } 335 336 /* article page tabs */ 337 div.horizontalTabs { position:relative; border:0; margin-top:15px; padding:0; background:transparent; width:100%; } 338 div.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; } 340 ul#tabsContainer ul { margin:0; padding:10px 10px 0; } 341 ul#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; } 342 ul#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; } 343 ul#tabsContainer li a:hover { color:#f60 } 344 ul#tabsContainer li.active { background-position:0% -40px; } 345 ul#tabsContainer li.active a { background-position:100% -40px; padding-bottom: 9px!important; } 346 347 div#rhc { float: right; width: 240px; position: relative; margin-top:8px; } 332 348 div.browse div#rhc { padding:0; } 333 349 div.content { margin-right: 255px; } … … 408 424 409 425 /* 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
