diff --git a/modules/webstyle/css/invenio.css b/modules/webstyle/css/invenio.css index b327fb5af..52a0addc0 100644 --- a/modules/webstyle/css/invenio.css +++ b/modules/webstyle/css/invenio.css @@ -1,3190 +1,3194 @@ /* * -*- mode: text; coding: utf-8; -*- $Id$ This file is part of CDS Invenio. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. CDS Invenio is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. CDS Invenio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with CDS Invenio; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ body { color: #000; background: #fff; margin: 0px; padding: 0px; font-family: sans-serif; } h1 { font-size: 173%; font-weight: 700; margin-top: 5px; margin-left: 0px; color: #36c; background: transparent; } .h1 { font-size: 173%; font-weight: 700; margin-left: 0px; color: #36c; background: transparent; } h2 { font-size: 144%; font-weight: 700; margin-left: 0px; color: #36c; background: transparent; } h3 { font-size: 120%; font-weight: 600; font-variant: small-caps; margin-top: 40px; margin-left: 0px; margin-bottom: 10px; color: #36c; background: transparent; border-bottom: dotted 2px #36c; width: 50%; } h4 { font-size: 110%; font-weight: 600; font-style: italic; color: #36c; margin-left: 0px; background: transparent; } h5 { font-size: 110%; font-weight: 400; color: #36c; margin-left: 0px; background: transparent; } h6 { font-size: 110%; font-weight: 200; font-style: italic; color: #36c; margin-left: 0px; background: transparent; } a:link { color: #00c; background: transparent; } a:visited { color: #006; background: transparent; } a:active { color: #00c; background: transparent; } a:hover { color: #00c; background: transparent; } a.moreinfo:link { color: #060; background: transparent; } a.moreinfo:visited { color: #060; background: transparent; } a.moreinfo:active { color: #060; background: transparent; } a.moreinfo:hover { color: #060; background: transparent; } a.examplequery:link { color: #00c; background: transparent; } a.examplequery:visited { color: #006; background: transparent; } a.examplequery:active { color: #00c; background: transparent; } a.examplequery:hover { color: #00c; background: transparent; } a.img:hover { color: #00c; background: transparent; } a.img:active { color: #00c; background: transparent; font-weight: normal; } a.note:link { color: #666; background: transparent; } a.note:visited { color: #666; background: transparent; } a.note:active { color: #666; background: transparent; } a.note:hover { color: #666; background: transparent; } a.nodecoration:link { color: #000; text-decoration: none; } a.nodecoration:visited { color: #000; text-decoration: none; } a.nodecoration:active { color: #000; text-decoration: none; } a.nodecoration:hover { color: #000; text-decoration: underline; } th.searchboxheader a:link { color: #000; text-decoration: none; } th.searchboxheader a:visited { color: #000; text-decoration: none; } th.searchboxheader a:active { color: #000; text-decoration: none; } th.searchboxheader a:hover { color: #000; } a.searchoptionlink:link { padding:3px; border: 1px solid transparent; color: #6E5907; text-decoration:none; } a.searchoptionlink:visited { padding:3px; border: 1px solid transparent; color: #6E5907; text-decoration:none; } a.searchoptionlink:hover { padding:3px; border: 1px dotted #CBA50E; color: #6E5907; text-decoration:underline; } a.searchoptionlink:active, a.searchoptionlink:visited:active { padding:3px; border: 1px solid #CBA50E; background-color: #D4D4A0; color: #6E5907; text-decoration:none; } a.searchoptionlinkselected:link { border: 1px solid #CBA50E; padding:3px; background-color: #D4D4A0; text-decoration:none; color: #6E5907; } a.searchoptionlinkselected:visited { border: 1px solid #CBA50E; padding:3px; background-color: #D4D4A0; text-decoration:none; color: #6E5907; } a.searchoptionlinkselected:hover { border: 1px solid #CBA50E; padding:3px; background-color: #D4D4A0; text-decoration:none; color: #6E5907; } a.searchoptionlinkselected:active, a.searchoptionlinkselected:visited:active{ border: 1px dotted #CBA50E; padding:3px; background-color: transparent; text-decoration:none; color: #6E5907; } .headerbox { color: #000; /*background: transparent;*/ width: 100%; padding: 0px; margin-top: 0px; margin-bottom: 0px; /*border-collapse: collapse;*/ background-color: #E6E6FA; -webkit-background-clip:padding; /* background-color: #f00;*/ } .headerlogo { /*background-color: #79d;*/ /*background-color: #36c;*/ /*background-color: #369;*/ /*background-color: #E6E6FA;*/ /*background-image: url(header_background.gif);*/ } .headerboxbody { color: #000; padding: 5px 0px 0px 0px; margin: 0px; } .headerboxbodylogo a, .headerboxbodylogo a:visited{ padding-left: 40px; background: transparent url(atlantis_logo_small.gif) no-repeat top left; color: #36c; font-size: 20px; font-weight: bold; font-variant: small-caps; letter-spacing: 3px; padding-bottom: 6px; float: left; clear: none; margin-top: 5px; margin-bottom: 5px; text-decoration: none; } .home .headerboxbodylogo a, .home .headerboxbodylogo a:visited{ margin-left: 5px; padding-left: 90px; background: transparent url(atlantis_logo.gif) no-repeat top left; height: 75px; line-height: 3em; font-size: 26px; letter-spacing: 2px; text-decoration: none; } .headermodulebox { color: #fff; background: transparent; border-spacing: 0px; margin: 0px; padding: 0px; } .headermoduleboxbody { color: #000; background: #f6f6fa; font-size: x-small; font-weight: bold; text-align: center; border-left: 2px solid #79d; border-right: 2px solid #79d; border-top: 2px solid #79d; margin: 0px; padding: 2px 10px; width: 75px; border-bottom: 2px solid #36c; } .headermoduleboxbody:hover { background: #fff; } .headermoduleboxbodyblank { width: 12px; padding: 2px 5px; margin: 0px; border-bottom: 2px solid #36c; } .headermoduleboxbodyblanklast { padding: 0px; margin: 0px; width:100%; border-bottom: 2px solid #36c; } .headermoduleboxbodyselected { color: #36c; background: #fff; font-size: x-small; font-weight: bold; text-align: center; /*border-bottom: 2px solid #fff;*/ border-left: 2px solid #36c; border-right: 2px solid #36c; border-top: 2px solid #36c; margin: 5px; padding: 2px 10px; width: 75px; } a.header:link { color: #68d; text-decoration: none; white-space: nowrap; } a.header:visited { color: #68d; text-decoration: none; white-space: nowrap; } a.header:active { color: #68d; text-decoration: none; white-space: nowrap; } a.header:hover { color: #36c; text-decoration: underline; white-space: nowrap; } a.headerselected:link { color: #36c; text-decoration: none; font-weight: bold; white-space: nowrap; } a.headerselected:visited { color: #36c; text-decoration: none; font-weight: bold; white-space: nowrap; } a.headerselected:active { color: #36c; text-decoration: none; font-weight: bold; white-space: nowrap; } a.headerselected:hover { color: #36c; text-decoration: none; font-weight: bold; white-space: nowrap; } .navtrailbox { color: #36c; background: #fff; padding: 0px; margin-top: 7px; border-spacing: 0px; border-collapse: collapse; font-size: x-small; } .navtrailboxbody { color: #36c; padding: 0px 0px 0px 10px; border-spacing: 0px; background: #fff; font-size: x-small; } a.navtrail:link { color: #36c; background: transparent; } a.navtrail:visited { color: #36c; background: transparent; } a.navtrail:active { color: #36c; background: transparent; } a.navtrail:hover { color: #36c; background: transparent; } .info { color: #060; background: transparent; } .snapshot { color: #000; background: transparent; border: 2px solid #999; margin: 10px 10px 0px 40px; } .pageheader { color: #999; font-size: x-small; background: transparent; padding: 0px; margin: 0px; width: 100%; } .pagebody { color: #000; background: transparent; margin:0px; padding: 20px; } .pagebodystripeleft { color: #000; background: #fff; font-size: x-small; width: 120px; margin: 0px; padding-left: 10px; float: left; } .pagebodystripemiddle { color: #000; background: #fff; padding: 0px; margin: 0px; } .pagebodystriperight { color: #000; background: #fff; font-size: x-small; width: 120px; float: right; } .pageboxlefttop { color: #000; background: transparent; font-size: x-small; } .pageboxlefttopadd { color: #000; background: transparent; font-size: x-small; } .pageboxleftbottom { color: #000; background: transparent; font-size: x-small; } .pageboxleftbottomadd { color: #000; background: transparent; font-size: x-small; } .pageboxrighttop { color: #000; background: transparent; font-size: x-small; } .pageboxrighttopadd { color: #000; background: transparent; font-size: x-small; } .pageboxrightbottom { color: #000; background: transparent; font-size: x-small; } .pageboxrightbottomadd { color: #000; background: transparent; font-size: x-small; } .pagefooter { color: #666; background: #fff; font-size: x-small; margin-top: 50px; padding: 0px; border-top: 1px solid #666; width: 100%; clear: both; } .pagefooterstripeleft { color: #666; background: #fff; font-size: x-small; margin-left: 5px; width: 60%; float: left; text-align: left; } .pagefooterstriperight { color: #666; background: #fff; margin-right: 5px; font-size: x-small; text-align: right; } a.footer:link { color: #666; background: transparent; } a.footer:visited { color: #666; background: transparent; } a.footer:active { color: #666; background: transparent; } a.footer:hover { color: #666; background: transparent; } .errorbox { color: #000; background: #ffcccc; padding: 1px; margin: 5px 30px 5px 30px; border-collapse: collapse; border: 2px solid #900; } .errorboxheader { color: #000; background: #ffcccc; padding: 3px; border-spacing: 0px; font-weight: bold; text-align: left; } .errorboxbody { color: #000; background: #ffcccc; padding: 3px; } .searchbox { color: #000; background: #fff; padding: 1px; margin: 5px 0px 5px 0px; border-collapse: collapse; /*border-top: 1px solid #36c;*/ } .home .searchbox { margin-top: 20px; margin-bottom: 10px; } .lightsearch input.formbutton{ font-size: medium; } .searchboxheader { color: #000; /*background: #f1f1f1; padding: 3px;*/ border-spacing: 0px; font-size: small; text-align: left; } .searchboxbody { color: #000; background: #fff; padding: 3px; } .narrowsearchbox { color: #000; background: #fff; padding: 1px; margin: 20px 20px 5px 0px; border-collapse: collapse; /*border-top: 1px solid #36c;*/ } .narrowsearchboxheader { color: #000; /*background: #f1f1f1;*/ padding: 3px; border-spacing: 0px; font-size: small; text-align: left; } .narrowsearchboxbody { color: #000; /*background: #fff;*/ padding: 3px; } .focusonsearchbox { color: #000; /*background: #f0f8ff;*/ padding: 1px; margin: 20px 20px 5px 0px; border-collapse: collapse; /*border-top: 1px solid #36c;*/ } .focusonsearchboxheader { color: #000; /*background: #e6e6fa;*/ padding: 3px; border-spacing: 0px; font-size: small; text-align: left; } .focusonsearchboxbody { color: #000; /*background: #f0f8ff;*/ padding: 3px; } .searchalsosearchbox { color: #000; /*background: #fffbf5;*/ padding: 1px; margin: 20px 20px 5px 0px; border-collapse: collapse; /*border-top: 1px solid #36c;*/ } .searchalsosearchboxheader { color: #000; /*background: #ffeacc;*/ padding: 3px; border-spacing: 0px; font-size: small; text-align: left; } .searchalsosearchboxbody { color: #444; /*background: #fffbf5;*/ padding: 3px; } .latestadditionsbox { color: #000; background: #fff; padding: 5px; margin: 5px 20px 5px 0px; border-spacing: 5px; } .latestadditionsboxtimebody { color: #000; background: #fff; padding: 3px; white-space: nowrap; text-align: right; vertical-align: top; font-size: xx-small; } .latestadditionsboxrecordbody { color: #000; background: #fff; padding: 3px; text-align: left; vertical-align: top; font-size: small; } .portalbox { color: #000; background: #fff; margin: 0px 0px 15px 0px; border-collapse: collapse; border-top: 1px solid #abb; font-size: small; width: 100%; } .portalboxheader { color: #000; background: #f1f1f1; padding: 2px; border-spacing: 0px; border-bottom: 1px solid #999; text-align: left; font-size: small; } .portalboxbody { color: #000; background: #fff; padding: 2px; font-size: small; } .admin_wvar, .admin_w200, .admin_wvar_nomargin { color: #000; background: white; padding: 1px; margin: 0px 0px 5px 20px; border-spacing: 0px; border-top: 1px solid #36c; } .admin_w200 { width: 250px; } .admin_wvar_nomargin { margin: 0px; } .adminlabel { width: 100px; font-size: small; background: #f1f1f1; vertical-align: top; } .adminheader, .adminheaderleft, .adminheadercenter, .adminheaderright { color: #000; background: #f1f1f1; border-spacing: 0px; font-size: small; padding: 3px 5px; text-align: center; } .adminheaderleft { text-align: left; } .adminheaderright { text-align: right; } .adminbutton { color: #fff; background: #36c; font-weight: bold; margin: 5px 10px 5px 10px; border-collapse: collapse; border-top: 1px solid #36c; } .admintd, .admintdleft, .admintdright { font-size: small; padding: 0px 10px; text-align: center; vertical-align: top; } .admintdleft { text-align: left; } .admintdright { text-align: right; } a.google:link { color: #333; background: transparent; } a.google:visited { color: #333; background: transparent; } a.google:active { color: #333; background: transparent; } a.google:hover { color: #333; background: transparent; } .googlebox { color: #333; background: #fff; text-align: left; margin-left: auto; margin-right: auto; margin-top: 50px; padding: 10px; font-size: small; border-collapse: collapse; border-top: 1px solid #fc0; } .googleboxheader { color: #333; background: #ffc; font-weight: normal; font-size: small; vertical-align: top; } .googleboxbody { color: #333; background: #fff; padding: 0px 5px 0px 5px; font-size: small; text-align: left; vertical-align: top; } .youraccountbox { color: #000; background: #fff; padding: 1px; margin: 5px 0px 5px 0px; border-collapse: collapse; border-top: 1px solid #fc0; } .youraccountheader { color: #333; background: #ffc; font-weight: normal; font-size: small; vertical-align: top; text-align: left; } .youraccountbody { color: #333; background: #fff; padding: 0px 5px 0px 5px; margin-bottom:5px; font-size: small; text-align: left; vertical-align: top; } th.youraccountheader a:link, th.youraccountheader a:visited { color:#000000; text-decoration:none; } th.youraccountheader a:hover { text-decoration:underline; } .adminbox { color: #000; background: #f1f1f1; margin: 0px; padding: 0px; width: 120px; } .adminboxheader { color: #000; background: #f1f1f1; font-size: x-small; text-align: left; } .adminboxbody { color: #000; background: #f1f1f1; font-size: x-small; } .formbutton { color: #fff; background: #36c; font-weight: bold; } .headline { color: #36c; background: transparent; } .quicknote { color: #603; background: transparent; } .important { color: #f00; background: transparent; } .popupselected { color: #fff; background: #006; } .searchresultsbox { color: #000; background: #ffe; padding: 0px; margin-top: 15px; border-collapse: collapse; border-top: 1px solid #fc0; width: 100%; } .searchresultsboxheader { color: #000; background: #ffc; padding: 2px; border-spacing: 0px; text-align: left; font-weight: normal; } .searchresultsboxbody { color: #000; background: #ffe; border-top: 1px dotted #fc0; border-bottom: 1px dotted #fc0; padding: 2px; } .searchresultsboxrecords { color: #000; background: transparent; margin-left: 0px; margin-right: 20px; } .nearesttermsbox { color: #603; background: #ffe; padding: 0px; border-collapse: collapse; } .nearesttermsboxheader { color: #603; background: #ffc; padding: 0px; border-spacing: 0px; text-align: left; font-weight: normal; } .nearesttermsboxbody { color: #603; background: #fff; padding: 0px; } a.nearestterms:link { color: #603; background: transparent; } a.nearestterms:visited { color: #603; background: transparent; } a.nearestterms:active { color: #603; background: transparent; } a.nearestterms:hover { color: #603; background: transparent; } .nearesttermsboxbodyselected { color: #999; background: #fff; padding: 0px; } a.nearesttermsselected:link { color: #999; background: transparent; } a.nearesttermsselected:visited { color: #999; background: transparent; } a.nearesttermsselected:active { color: #999; background: transparent; } a.nearesttermsselected:hover { color: #999; background: transparent; } .moreinfo { color: #060; font-size: small; background: transparent; } .examplequery { color: #060; font-size: x-small; background: transparent; } .rankscoreinfo { color: #666; font-size: x-small; background: transparent; } .userinfobox { color: #039; font-size: x-small; width: 150px; margin-bottom: 15px; } .userinfoboxheader { color: #039; font-size: x-small; font-weight: bold; border-top: 1px solid #060; border-bottom: 1px solid #060; } .userinfoboxbody { color: #039; padding: 5px 5px 2px 0px; font-size: 11px; font-weight: normal; float: right; clear: none; } a.userinfo:link { color: #039; background: transparent; } a.userinfo:visited { color: #039; background: transparent; } a.userinfo:active { color: #039; background: transparent; } a.userinfo:hover { color: #039; background: transparent; } a.langinfo:link { color: #666; background: transparent; } a.langinfo:visited { color: #666; background: transparent; } a.langinfo:active { color: #666; background: transparent; } a.langinfo:hover { color: #666; background: transparent; } .faq { margin-left: 12%; margin-right: 3%; } .faqq { margin-left: 18%; margin-right: 3%; } .exampleleader { color: #060; background: transparent; } .example { color: #039; background: transparent; } .blocknote { color: #000; background: #ccc; } .blocknotebis { color: #000; background: #999; } .devel { color: #600; background: #fff; border-color: #600; border-left-width: medium; border-left-style: solid; font-size: 90%; } .normal { color: #000; background: #fff; } .address { font-style: normal; font-size: x-small; } .note { color: #666; background: transparent; } .warning { color: #603; background: transparent; } .light { color: #ccc; background: transparent; } .nbdoccoll { color: #666; background: transparent; } hr { width: 100%; height: 1px; color: #999; background-color: #999; border-width: 0; } input,select { color: #000; background: #fff; } +input[disabled], input[disabled="true"]{ + /* <http://reference.sitepoint.com/css/attributeselector#compatibilitysection> */ + color: #666; +} .wsactionbutton { width: 150px; height: 25px; color: #039; margin: 0px; background-color: #fff; border: 2px solid #039; vertical-align: middle; font-size: small; padding: 5px 5px 0px 5px; } .wsactionbuttonh { width: 150px; height: 25px; color: #039; margin: 0px; background-color: #9cf; border: 2px solid #039; vertical-align: middle; font-size: small; padding: 5px 5px 0px 5px; } .textbutton { color: #039; font-weight: bold; text-decoration: none; } .submitBody { color: #000; background: #9cf; } .submitHeader { color: #fff; background: #006; } .submitCurrentPage { color: #000; background: #9cf; border-top: 1px solid #039; border-left: 1px solid #039; border-right: 1px solid #039; } .submitEmptyPage { color: #fff; background: #fff; border-bottom: 1px solid #039; } .submitPage { color: #000; background: #fff; border-top: 1px solid #039; border-left: 1px solid #039; border-right: 1px solid #039; } .mycdscell { border-right: 1px solid #fff; } .guideimg { border: 2px dotted #777; padding: 5px; margin: 5px; } .guideheader { font-size: 120%; font-weight: 600; font-variant: small-caps; color: #36c; margin-left: 10px; background: transparent; } .recordlastmodifiedbox { text-align: left; font-size: small; color: #603; background: #fff; } .commentbox { /*color: #000;*/ width: 100%; padding: 0px 10px 10px 10px; border-left: 2px solid #36c; margin-left: 10px; } /* Write comment */ #comment-write { border:1px solid #ccc; margin-top:30px; margin-right:50px; padding:25px 20px 5px ; /* 25 20 20 */ position:relative; clear:right; } #comment-write h2 { background:#fff; font-size:1.4em; font-weight:400; left:40px; padding:0 5px; position:absolute; top:-32px; } #comment-write .submit-area { margin:20px 0 0 -5px; } /* Subscribe to comment*/ .comment-subscribe { /*color:#f00;*/ /*font-size:0.94em;*/ overflow:hidden; padding:7px 0 5px 5px; position:relative; width:95%; background:#dfe6f2; /*border:1px solid #ccc;*/ } .warninggreen { color: #060; background: transparent; } .warningred { color: #f00; background: transparent; } .reportabuse { color: #000; background: #fff; font-size: small; vertical-align: bottom; } /* WebMessage module */ .mailbox{ border-collapse: collapse; color: #000; margin-top: 15px; padding: 0px; width: auto; } .mailboxheader tr{ background: #ffc; } .inboxheader { text-align:center; padding: 5px 30px 5px 30px; border-top: 1px solid #fc0; border-bottom: 1px solid #fc0; } .messageheader{ width: 100%; padding: 0px; border: 0px; } .mailboxinput{ width: 100%; } .mailboxlabel{ white-space: nowrap; padding-right: 15px; } .mailboxbody{ background: #ffe; } .mailboxrecord{ /* each record */ } .mailboxrecord td{ /* each cell of a record */ padding: 4px 30px 4px 30px; border-top: 1px dashed #fff; } .mailboxfooter{ background-color: #fff; } .mailboxfooter td{ padding: 10px 0px 0px 0px; border-top: 1px solid #fc0; border-bottom: none; border-left: none; border-right: none; } .mailboxsearch td { padding-top: 10px; padding-bottom: 10px; } .mailboxresults td { padding-bottom: 5px; border-bottom: 1px solid #fc0; } .nonsubmitbutton { color: #000; background: #fc0; font-weight: bold; } .confirmoperation{ margin: auto; width: 400px; height: 100px; background-color: #ddf; } .confirmmessage{ font-weight: bold; text-align: center; } .infobox{ background-color: #ffc; padding: 7px; border-collapse: collapse; border: 1px solid #fc0; } .warningbox{ background-color: #cff; padding: 7px; border-collapse: collapse; border: 1px solid #ccff00; } .quotabox{ background-color: #ffc; width: 200px; height: 15px; border: 1px solid #fc0; margin: 3px 0px 3px 0px; } .quotabar{ background-color: #fc0; border: 0px none black; height: 15px; } /* WebBasket module */ #bskcontainer{ /* float: left;*/ background: transparent; width: 100%; } ul.bsk_export_as_list{ list-style-image: url(arrow_link-icon-15x11-right.gif) ; padding-left: 1em; margin:0.05em; } .bsk_export_as_list, .bsk_export_as_list a{ text-decoration:none; color:#555; font-weight:700; font-size:small; } /*START The search box container*/ #bskcontainersearch{ width: 100%; } /*END The search box container*/ /*START The directory box container*/ #bskcontainerdirectory{ width: 100%; } .bsk_directory_box{ width: 100%; } .bsk_directory_box_tabs{ width: 100%; } .bsk_directory_box_tab_separator{ width: 1px; border-bottom: 1px solid #fc0; } .bsk_directory_box_tab_separator_end{ width: 100%; border-bottom: 1px solid #fc0; } .bsk_directory_box_tab_content{ border: 1px solid #fc0; background: #fda; padding: 5px; white-space: nowrap; } .bsk_directory_box_tab_content a, .bsk_directory_box_tab_content a:link, .bsk_directory_box_tab_content a:visited, .bsk_directory_box_tab_content a:active{ text-decoration: none; font-weight: bold; color: #444; } .bsk_directory_box_tab_content a:hover{ text-decoration: underline; font-weight: bold; color: #000; } .bsk_directory_box_tab_content_selected{ border-top: 1px solid #fc0; border-right: 1px solid #fc0; border-left: 1px solid #fc0; background: #ffc; padding: 5px; white-space: nowrap; } .bsk_directory_box_tab_content_selected a, .bsk_directory_box_tab_content_selected a:link, .bsk_directory_box_tab_content_selected a:visited, .bsk_directory_box_tab_content_selected a:active{ text-decoration: none; font-weight: bold; color: #000; } .bsk_directory_box_tab_content_selected a:hover{ text-decoration: underline; font-weight: bold; color: #000; } .bsk_directory_box_tab_content_inactive{ border: 1px solid #fc0; background: #ffd; padding: 5px; white-space: nowrap; font-weight: bold; color: #d3d3d3; } .bsk_directory_box_nav_tab_content{ width: 100%; border-bottom: 1px solid #fc0; border-top: 1px solid #fc0; border-left: 1px solid #fc0; background: #ffc; padding: 5px; white-space: nowrap; } .bsk_directory_box_nav_tab_content a, .bsk_directory_box_nav_tab_content a:link, .bsk_directory_box_nav_tab_content a:visited, .bsk_directory_box_nav_tab_content a:active{ text-decoration: none; font-weight: bold; color: #000; } .bsk_directory_box_nav_tab_content a:hover{ text-decoration: underline; font-weight: bold; color: #000; } .bsk_directory_box_nav_tab_options{ border-bottom: 1px solid #fc0; border-top: 1px solid #fc0; border-right: 1px solid #fc0; background: #ffc; padding: 5px; white-space: nowrap; } .bsk_directory_box_nav_tab_options img{ vertical-align: middle; margin-right: 3px; border: none; } .bsk_directory_box_nav_tab_options a, .bsk_directory_box_nav_tab_options a:link, .bsk_directory_box_nav_tab_options a:visited, .bsk_directory_box_nav_tab_options a:active{ text-decoration: none; color: #000; font-size: small; } .bsk_directory_box_nav_tab_options a:hover{ text-decoration: underline; color: #000; font-size: small; } .bsk_directory_box_content{ width: 100%; } .bsk_directory_box_content_list_topics_groups{ width: 100%; text-align: center; border-left: 1px solid #fc0; border-right: 1px solid #fc0; border-bottom: 1px solid #fc0; background: #ffc; padding: 5px; } .bsk_directory_box_content_list_baskets{ width: 100%; text-align: center; border-left: 1px solid #fc0; border-right: 1px solid #fc0; border-bottom: 1px solid #fc0; background: #fff; padding: 5px; } .bsk_directory_box_content_list_cell{ text-align: left; white-space: nowrap; padding: 5px; vertical-align: top; } .bsk_directory_box_content_list_cell a, .bsk_directory_box_content_list_cell a:link, .bsk_directory_box_content_list_cell a:visited, .bsk_directory_box_content_list_cell a:active{ text-decoration: none; color: #444; } .bsk_directory_box_content_list_cell a:hover{ text-decoration: underline; color: #000; } .bsk_directory_box_content_list_number_of{ color: #808080; } /*END The directory box container*/ /*START List public baskets*/ .bsk_list_public_baskets{ margin-bottom: 20px; border-collapse: collapse; border: 1px solid #fc0; background-color:white; } .bsk_list_public_baskets_header{ background-color: #ffc; padding: 10px; border-bottom: 1px solid #fc0; border-collapse: collapse; vertical-align: top; white-space: nowrap; font-weight: bold; } .bsk_list_public_baskets_header a, .bsk_list_public_baskets_header a:link, .bsk_list_public_baskets_header a:visited, .bsk_list_public_baskets_header a:active{ text-decoration: none; color: #000; } .bsk_list_public_baskets_header a:hover{ text-decoration: underline; color: #000; } .bsk_list_public_baskets_header img{ border: none; vertical-align: bottom; } .bsk_list_public_baskets_footer{ background-color: #ffc; padding: 10px; border-top: 1px solid #fc0; border-collapse: collapse; vertical-align: bottom; font-size: small; } .bsk_list_public_baskets_footer a, .bsk_list_public_baskets_footer a:link, .bsk_list_public_baskets_footer a:visited, .bsk_list_public_baskets_footer a:active{ text-decoration: none; color: #000; } .bsk_list_public_baskets_footer a:hover{ text-decoration: underline; color: #000; } .bsk_list_public_baskets_footer img{ border: none; vertical-align: bottom; } .bsk_list_public_baskets_basket_left{ padding-top: 5px; padding-bottom: 5px; padding-right: 15px; padding-left: 10px; text-align: left; border-right: 1px solid #fc0; } .bsk_list_public_baskets_basket_right{ padding-top: 5px; padding-bottom: 5px; padding-right: 10px; padding-left: 15px; text-align: right; border-right: 1px solid #fc0; } /*END List public baskets*/ /*START The content container*/ #bskcontainercontent{ width: 100%; } #bskcontent{ float: left; width: 100%; border-collapse: collapse; background: #ffe; border: none; } .bsktopic{ white-space: nowrap; font-weight: bold; } .bsktopic a{ font-weight: normal; text-decoration: none; color: #000; } .bsktopic a:hover{ text-decoration: underline; } .bsktopic_{ white-space: nowrap; font-weight: bold; } .bsktopic_ a{ font-weight: normal; text-decoration: none; color: #000; } .bsktopic_ a:hover{ text-decoration: underline; } #bskbaskets{ padding: 10px; } #bskinfos{ background-color: transparent; } .bskbasket{ margin-bottom: 20px; border-collapse: collapse; border: 1px solid #fc0; background-color:white; } .bskbasketheader{ background-color: #ffc; padding: 5px; border-bottom: 1px solid #fc0; border-collapse: collapse; vertical-align: top; } .bskbasketheadertitle{ width: 100%; border: none; } .bskbasketheaderoptions{ text-align: right; vertical-align: top; white-space: nowrap; border: none; font-size: small; } .bskbasketheaderoptions a, .bskbasketheaderoptions a:link, .bskbasketheaderoptions a:visited, .bskbasketheaderoptions a:active{ text-decoration: none; color: black; } .bskbasketheaderoptions a:hover{ text-decoration: underline; color: black; } .bskbasketheaderoptions img{ vertical-align: middle; margin-right: 3px; border: none; } .bskbasketfooter{ background-color: #ffc; padding: 5px; border-top: 1px solid #fc0; border-collapse: collapse; vertical-align: bottom; } .bskbasketfootertitle{ width: 100%; border: none; vertical-align: bottom; text-align: left; } .bskbasketfooteroptions{ text-align: right; vertical-align: bottom; white-space: nowrap; border: none; font-size: small; } .bskbasketfooteroptions a, .bskbasketfooteroptionsoptions a:link, .bskbasketfooteroptionsoptions a:visited, .bskbasketfooteroptionsoptions a:active{ text-decoration: none; color: black; } .bskbasketfooteroptions a:hover{ text-decoration: underline; color: black; } .bskbasketfootertitle a, .bskbasketfootertitleoptions a:link, .bskbasketfootertitleoptions a:visited, .bskbasketfootertitleoptions a:active{ text-decoration: underline; color: black; } .bskbasketfootertitle a:hover{ text-decoration: underline; color: black; } .bskbasketfooter img{ vertical-align: middle; margin-right: 3px; border: none; } /*START Notes header, content and footer*/ .bsknotesheadertitle{ width: 100%; border: none; } .bsknotesheaderoptions{ text-align: right; vertical-align: bottom; white-space: nowrap; border: none; font-size: small; } .bsknotesheaderoptions a, .bsknotesheaderoptions a:link, .bsknotesheaderoptions a:visited, .bsknotesheaderoptions a:active{ text-decoration: none; color: black; } .bsknotesheaderoptions a:hover{ text-decoration: underline; color: black; } .bsknotesheaderoptions img{ vertical-align: middle; margin-right: 3px; border: none; } .bsknotesfootertitle{ width: 100%; border: none; vertical-align: top; text-align: left; } .bsknotesfooteroptions{ text-align: right; vertical-align: top; white-space: nowrap; border: none; font-size: small; } .bsknotesfooteroptions a, .bsknotesfooteroptions a:link, .bsknotesfooteroptions a:visited, .bsknotesfooteroptions a:active{ text-decoration: none; color: black; } .bsknotesfooteroptions a:hover{ text-decoration: underline; color: black; } .bsknotesfooteroptions img{ vertical-align: middle; margin-right: 3px; border: none; } .bsknotescontent { width: 100%; padding-left: 20px; padding-top: 20px; padding-right: 20px; } .bsknotescontent a, .bsknotescontent a:link, .bsknotescontent a:visited, .bsknotescontent a:active{ text-decoration: none; color: black; } .bsknotescontent a:hover{ text-decoration: underline; color: black; } .bsknotescontent img{ margin-right: 3px; border: none; } .bsknotescontentnote { width: 100%; } .bsknotescontentaddnote { width: 100%; } .bsknotescontentaddform { width: 100%; } .bsknotescontenttitle { width: 100%; border-top: 1px solid #ddd; border-left: 1px solid #ddd; border-right: 1px solid #ddd; font-size: small; } .bsknotescontentbody { width: 100%; border-bottom: 1px solid #ddd; border-left: 1px solid #ddd; border-right: 1px solid #ddd; font-size: small; } .bsknotescontentoptions { width: 100%; font-size: small; text-align: right; padding: 3px; } .bskcomment { margin-bottom:20px; margin-left:30px; background:#F9F9F9; border:1px solid #DDD; font-size:small; width: 90%; } .bskcommentheader { background-color:#EEE; padding:2px; } /*END Notes header, content and footer*/ .bskbasketheaderactions{ text-align: center; white-space: nowrap; } .bskbasketheaderactions td{ border: none; } .bskbasketheaderactions img{ border: 0px; margin: 2px; } .bskbasketheaderactions a{ font-size: small; color: #000; } .bskcontentcount{ text-align: right; white-space: nowrap; vertical-align: top; padding-top: 5px; padding-left: 5px; padding-bottom: 5px; } .bskcontentoptions{ text-align: right; white-space: nowrap; vertical-align: top; padding-left: 5px; } .bskcontentoptions img{ border: none; padding-right: 5px; } .bskactions{ text-align: center; white-space: nowrap; } .bskactions td{ border: none; } .bskactions img{ border: 0px; margin: 5px; } .bskactions a{ font-size: x-small; } .bsktitle { width: 100%; } .bskcmtcol{ white-space: nowrap; text-align: right; } .bskcontentcol{ padding-top: 5px; padding-right: 5px; width: 100%; } .bskcontentcol a{ font-size: small; } .bsk_create_link{ padding-top: 5px; padding-bottom: 10px; background-color: transparent; } .bsk_create_link a{ color: black; } .bsk_create_link img{ border: none; } dd{ margin-bottom: 10px; } .cmtsubround { margin: 5px 15px 5px; border-bottom: 1px dashed #bbb; } .cmtfilesblock{ background-color:#f5f5f5; border-top:1px solid #eee; padding:2px; } .cmtfilesblock a{ background:url(file-icon-text-12x16.gif) no-repeat; padding-left: 14px; margin-left: 2px; } /* end of WebBasket module */ /* WebSubmit module */ form.hyperlinkform { /* used in form tag for a form that should be hidden, but contains a button styled like a hyperlink */ display: inline; padding: 0; margin: 0; height: 0; width: 0; } input.hyperlinkformHiddenInput { /* used in a hidden input tag for a form that should be hidden, but contains a button styled like a hyperlink */ display: inline; padding: 0; margin: 0; height: 0; width: 0; } input.hyperlinkformSubmitButton { /* used in a submit input tag for a form that should be hidden, but contains a button styled like a hyperlink */ display: inline; padding: 0; margin: 0; border: 0; background-color: transparent; font-size: 1em; line-height: 1em; text-decoration: underline; cursor: pointer; color: blue; } /* end of WebSubmit module */ /* BibEdit module */ /* BibEdit - old interface */ .bibEditTable{ background: #ececec; border: 0px; padding: 0px; border-collapse: collapse; } .bibEditTable th{ background: #ccc; text-align: left; padding: 5px; } .bibEditCellRight{ font-size: small; text-align: right; padding: 0px; } .bibEditCellTag{ font-size: small; text-align: right; vertical-align: top; padding: 2px 5px 2px 5px; font-weight: bold; } .bibEditHistView{ float: left; margin: 0px 10px 5px 0px; width: 70%; } .bibEditHistCompare{ float: left; margin: 0px 10px 5px 0px; font-size: small; width: 70%; } .bibEditHistForms{ margin: 5px 0px 5px 10px; } /* BibEdit - new interface */ .bibEditBtnBold { font-weight: bold } #bibEditMenu { width: 136px; position: fixed; top: 220px; left: 20px; margin-bottom: 20px; font-size: 0.8em; } #bibEditMenu .bibEditMenuSection { margin-bottom: 10px; } #bibEditMenu .bibEditMenuSectionHeader { font-weight: bold; } #bibEditMenu .bibEditMenuSection table { width: 100%; } #bibEditMenu form { margin: 0px; } #bibEditMenu .bibEditImgExpandMenuSection, #bibEditMenu .bibEditImgCompressMenuSection { margin: 0px; text-align: left; vertical-align: bottom; } #bibEditMenu a, #bibEditMenu button, #bibEditMenu input, #bibEditMenu select { font-size: 0.8em; } #bibEditMenu a, #bibEditMenu button, #bibEditMenu img, #bibEditMenu input, #bibEditMenu select { margin: 1px; } #bibEditMenu button, #bibEditMenu input, #bibEditMenu select { width: 100%; } #bibEditMenu .bibEditImgCtrlEnabled { cursor: pointer; opacity: 1.0; vertical-align: bottom; } #bibEditMenu .bibEditImgCtrlDisabled { cursor: default; opacity: 0.4; vertical-align: bottom; } #bibEditContent { min-height: 300px; margin-left: 150px; } #bibEditTable { background-color: rgb(255, 255, 255); border: 1px solid #A1A1A1; border-collapse: collapse; width: 100%; } .bibEditColFieldBox { min-width: 14px; max-width: 14px; width: 14px; } #bibEditColFieldTag { min-width: 48px; max-width: 100px; width: 48px; border-right: 1px solid #A1A1A1; } #bibEditColSubfieldTag { width: 28px; min-width: 28px; max-width: 80px; border-right: 1px solid #A1A1A1; } #bibEditColSubfieldAdd { width: 16px; min-width: 16px; max-width: 16px; } #bibEditTable .bibEditCellContent:hover, #bibEditTable .bibEditCellContentProtected:hover{ background: lightyellow; } #bibEditTable .bibEditFieldColored { background-color: rgb(235, 235, 235); border: 1px solid #A1A1A1; } #bibEditTable .bibEditSelected { background: lightblue; } #bibEditTable .bibEditVolatileSubfield { color: grey; } #bibEditTable td { padding: 1px 1px; font-size: 0.8em; } #bibEditTable .bibEditCellField, #bibEditTable .bibEditCellFieldTag, #bibEditTable .bibEditCellSubfield, #bibEditTable .bibEditCellSubfieldTag { vertical-align: top; } #bibEditTable .bibEditCellFieldTag { font-weight: bold; } #bibEditTable .bibEditCellContentProtected { font-weight: bold; } #bibEditTable textarea { min-height: 36px; } #bibEditTable .bibEditCellAddSubfields { vertical-align: bottom; } #bibEditTable img { cursor: pointer; } #bibEditTable .bibEditBtnMoveSubfieldUp { float: left; } #bibEditTable .bibEditBtnMoveSubfieldDown { float: right; } #bibEditTable input[type="text"]:not(.bibEditInputError){ border: 2px inset grey; } #bibEditTable input[type="checkbox"] { margin: 1px 0px 0px; padding: 0px; } #bibEditTable .bibEditBtnClear { margin-left: 20px; } #bibEditTable .bibEditTxtTag { width: 34px; } #bibEditTable .bibEditTxtInd { width: 14px; } #bibEditTable .bibEditCellAddSubfieldCode { text-align: right; } #bibEditTable .bibEditTxtSubfieldCode { width: 14px; } #bibEditTable .bibEditTxtValue { width: 100%; } #bibEditTable .bibEditInputError { border: 2px solid red; } #bibEditMessage { background: rgb(250, 209, 99); } .bibEditAddFieldManipulationsBar { display: table; } .bibEditAddFieldFormSelectTemplate { display: table-cell; width: 400px; } .bibEditAddFieldFormCreateSimilar { display: table-cell; } .bibeditscrollArea { width: 200px; height: 75px; padding-left: 5px; padding-right: 5px; border-color: #6699CC; border-width: 1px; border-style: solid; float: left; overflow: auto; } .bibeditscrollArea ul { margin-top: 0px; margin-bottom: 0px; list-style: none; margin-left: 0; padding-left: 0; } /* end of BibEdit module */ /* BibMerge module */ #bibMergePanel { background: white; width: 173px; position: fixed; top: 220px; left: 5px; margin-bottom: 20px; font-size: 0.7em; } .bibMergeMenuSectionHeader { font-weight: bold; font-size: 1.2em !important; } .bibMergeImgCompressMenuSection { margin: 0px; text-align: left; vertical-align: bottom; } #bibMergePanel button { font-size: 0.8em; font-weight: bold; } .bibMergeRecNumInput { width: 75px; } a.bibMergeImgClickable img { border: 0px; } a:hover.bibMergeImgClickable img { background: orange; } #bibMergeSearchInput { width: 130px; } #bibMergeSelectList option{ border-bottom: 1px solid grey; color: blue; text-decoration: underline; cursor:pointer; width: 130px; } .bibMergeSelectListSelected { background: blue !important; color: white !important; } #bibMergeMessage { border-style: solid; border-width: 4px 1px 1px 1px; padding: 1px; } #bibMergeContent { min-height: 300px; font-size:0.8em; margin-left:160px; } #bibMergeContent a:hover img { background: orange; } #bibMergeContent img { border: 0px; } .bibMergeFieldGroupDiv { width: 100%; margin-bottom: 4px; } .bibMergeFieldGroupHeaderDiv { width: 150px; font-size:1.2em; background-color: #6699CC; border-bottom: 3px solid #FFCC99; color: #FFFFFF; padding: 1px 1px; } .bibMergeFieldGroupHeaderDiv > * { color: inherit !important; } .bibMergeFieldTable { border: 0.5px solid #FFCC99; border-top: 2.5px solid #6699CC; border-left: 2.5px solid #6699CC; border-right: 2.5px solid #6699CC; border-bottom: 2.5px solid #6699CC; border-collapse:collapse; width:100%; table-layout: fixed; } .bibMergeColHeaderLeft span, .bibMergeColHeaderRight span { font-weight: bold; } .bibMergeFieldTable td { border: 0.5px solid #FFCC99; word-wrap:break-word; } .bibMergeFieldTable td div { overflow:auto; } .bibMergeColSubfieldTag { border-left: 1px solid #FFCC99; min-width: 30px; max-width: 30px; width: 25px; } .bibMergeColContent { border-left: 1px solid #FFCC99; width: 50%; } .bibMergeColDiff { border-left: 1px solid #FFCC99; min-width: 30px; max-width: 30px; width: 20px; } .bibMergeColContentLeft { background:#FFFCF9;} .bibMergeColContentRight { background:#F1F1F1;} .bibMergeColHeaderLeft { background:#FFCC99;} .bibMergeColHeaderRight { background:#BDD5DD;} .bibMergeColHeaderLeft a { float:right; } .bibMergeColHeaderRight a { float:left; } .bibMergeColActions { border-left: 1px solid #FFCC99; min-width: 60px; max-width: 60px; width: 60px; } .bibMergeFieldTable td { vertical-align:top; } .bibMergeCellSimilarityRed { color: red; border-right: 5px solid red; } .bibMergeCellSimilarityGreen { color: green; border-right: 5px solid green; } .bibMergeDiffSpanSame { } .bibMergeDiffSpanIns { background:#BDD5DD; } .bibMergeDiffSpanDel { background:#FFCC99; } .bibMergeDiffSpanSub { background:Pink; } .bibMergeDiffHighlight { background:Yellow; } /* end of BibMerge module */ /* WebAlert module */ .alrtTable{ border: 1px solid black; width: 100%; padding: 0px; border-collapse: collapse; } .alrtTable td{ border: 1px solid black; padding: 3px; } /* end of WebAlert module */ /* BibClassify module */ .tagCloud { margin: auto; clear: both; } .tagCloud span { font-family: Arial, Helvetica, sans-serif; text-decoration: none; margin-right: 6px; margin-top: 6px; margin-bottom: 6px; padding: 0; } .tagCloud a { text-decoration: none; } .tagCloud a:hover { text-decoration: underline; } /* end of BibClassify module */ /* externalcollections */ .externalcollectionsbox { color: #333; background: #fffbf5; text-align: left; margin-left: auto; margin-right: auto; margin-top: 50px; padding: 10px; font-size: small; border-collapse: collapse; border-top: 1px solid #fc0; } .externalcollectionsboxheader { color: #333; background: #ffeacc; font-weight: normal; font-size: small; vertical-align: top; } .externalcollectionsboxbody { color: #333; background: #fffbf5; padding: 0px 5px 0px 5px; font-size: small; text-align: left; vertical-align: top; } .externalcollectionsresultsbox { color: #000; background: #fffbf5; padding: 0px; margin-top: 15px; border-collapse: collapse; border-top: 1px solid #fc0; width: 100%; } .externalcollectionsresultsboxheader { color: #000; background: #ffeacc; padding: 2px; border-spacing: 0px; text-align: left; font-weight: normal; } .externalcollectionsresultsboxbody { color: #000; background: #fffbf5; border-top: 1px dotted #fc0; border-bottom: 1px dotted #fc0; padding: 2px; } .externalcollectionsresultsboxrecords { color: #000; background: transparent; margin-left: 0px; margin-right: 20px; } /* Start 'detailed record' boxes*/ div.detailedrecordbox, div.detailedrecordminipanel { width:90%; margin:auto; position:relative; max-width: 1280px; } div.detailedrecordbox img, div.detailedrecordminipanel img{ border:none; } div.detailedrecordtabs{ border-bottom: 2px solid #36c; position:relative; } div.detailedrecordtabs div { width:100%; margin:0 auto; position:relative; z-index:1; width:100%; padding:0; bottom:-2px; } div.detailedrecordbox div.detailedrecordboxcontent{ border-bottom: 2px solid #36c; border-right: 2px solid #36c; border-left: 2px solid #36c; padding-bottom:3px; padding-top:1px; /* Needed, otherwise tabs with paperclip get messed up, but created a small gap at top of box. Override with !important if needed*/ } div.detailedrecordminipanel{ border: 1px solid #ddd; padding-top:3px; padding-bottom:3px; } div.detailedrecordminipanel{ background-color:#f7f7f7; } .notopgap { margin: 0; height:0;} .nobottomgap { margin-bottom: 0; height:0;} .top-left-folded { height: 10px; } * html .top-left-folded, * html .top-right-folded{ /*IE6 hack*/ display:none } /* tabs as used in detailed record pages */ ul.detailedrecordtabs{ margin-top:0px; margin-bottom:0px; list-style-type:none; margin-left:0; padding-left:0; width:100%; text-align:center; } .detailedrecordtabs li{ display:block; margin:0; float: left; } * html .detailedrecordtabs li{ /*IE 6 hack*/ width:1%; white-space: nowrap; } *html #tabsSpacer { /*IE 6 hack*/ display: none; } .detailedrecordtabs li a{ border-top: 2px solid #79D; border-right: 2px solid #79D; border-bottom: 2px solid #36c; border-left: 2px solid #79D; margin-right:10px; background-color: #FFF; padding:4px; color: #79d; font-size:x-small; font-weight:bold; text-decoration:none; position:relative; display:block; height:100%; zoom:100%; /*We loose CSS validity here, but necessary because of ie7*/ } .detailedrecordtabs li a:hover{ text-decoration:underline; } .detailedrecordtabs li.on a{ color:#36c; border-bottom: 2px solid #fff; border-top: 2px solid #36c; border-right: 2px solid #36c; border-left: 2px solid #36c; } .detailedrecordtabs li.on a:hover, .detailedrecordtabs li.disabled a:hover{ text-decoration:none; } .detailedrecordtabs li.disabled a{ color:#ccf; cursor:default; border-top: 2px solid #ccf; border-right: 2px solid #ccf; border-left: 2px solid #ccf; } .detailedrecordtabs li.first a{ border-left: 2px solid #79d; } .detailedrecordtabs li.first.on a{ border-left: 2px solid #36c; } /* Actions in mini-panel of detailed record view*/ ul.detailedrecordactions{ list-style-image: url(arrow_link-icon-15x11-right.gif) ; padding-left: 1em; text-align:left; margin:0.05em; } .detailedrecordactions, .detailedrecordactions a{ text-decoration:none; color:#555; font-weight:700; font-size:small; } /* Grading stars for mini-panel in detailed record view*/ #detailedrecordminipanelreview div.star a{ text-indent:-9000px; /*Hide text*/ height:30px; width:30px; float:left; } #detailedrecordminipanelreview div.star{ height:30px !important; float:left; clear:none; width:auto; text-align:left; background:url(star_empty-icon-30x30.gif) no-repeat; } #detailedrecordminipanelreview div.star:hover{ background-image:url(star-icon-30x30.gif) !important; } #detailedrecordminipanelreview:hover div.full, #detailedrecordminipanelreview:hover div.half{ background-image:url(star_empty-icon-30x30.gif) ; } #detailedrecordminipanelreview div.full{ background-image:url(star-icon-30x30.gif) ; } #detailedrecordminipanelreview div.half{ background-image:url(star_half-icon-30x30.gif) ; } /* Short reminder displayed as sheet of paper in detailed record pages */ #detailedrecordshortreminder { background: #fff url(paper-texture-128x128.gif) repeat top left; margin: 10px 10px 0px 10px; padding:4px; border-bottom: 1px solid #CCC; border-right: 1px solid #CCC; border-top: 1px solid #DDD; border-left: 1px solid #DDD; } #detailedrecordshortreminder #clip { position:relative; clear:none; float:left; left: -45px; top:-15px; height:72px; width:72px; background: transparent url(paper_clip-72x72.gif) no-repeat top left; } #detailedrecordshortreminder #HB{ position:relative; left: -50px; } /* end detailed record page*/ /* definitions for webjournal module */ .webjournalBoxList{ /*list-style-image:url("star_dot-icon-30x30.gif");*/ } .webjournalBoxList a:visited, .webjournalBoxList a:link, .webjournalBoxList a:active{ text-decoration: none; } .webjournalBoxList a:hover{ text-decoration:underline; } /* cite summary output */ #citesummary td { padding-left: 30px; } /*Table columns*/ .oddtablecolumn { background-color: #f0f0ff; } .pairtablecolumn { background-color: #fafaff; } .scrollableframe { overflow-y: auto; min-height: 10px; max-height: 300px; height: auto; width: 900px; } .normalframe { width: 600px; } .brtable { width: 100%; } /* BibCirculation CSS */ #bibcircmenu h2 { display:none } #bibcircmenu ul { list-style:none; margin:0; padding:0 0 0 4px; } #bibcircmenu { clear:both; width:100%; border-bottom:2px solid #36c; border-top:2px solid #36c; height:auto; padding:0; position:relative; padding-bottom:9px; } #bibcircmenu ul { padding-top:9px; position:relative; } * html #bibcircmenu ul { /* Needed for ie < 7 ONLY That's why the star hack is used */ width:99%; } #bibcircmenu li.on a, #bibcircmenu li.on a:hover, #bibcircmenu li.on a:visited{ text-decoration:none; color:#555; } #bibcircmenu li { display:block; float:left; text-decoration:none; padding: 5px 5px 5px 7px; height:100%; padding-right:5px; margin-right:10px; background: transparent url(list_sep_blue.gif) no-repeat left center; } #bibcircmenu li.hassubmenu{ position:relative; } #bibcircmenu li.hassubmenu a{ padding-right:12px; background: transparent url(drop_down_menu_arrow_down.gif) no-repeat right center; } #bibcircmenu li.on.hassubmenu a{ background: transparent url(drop_down_menu_arrow_down_w.gif) no-repeat right center; } #bibcircmenu li.on { background: #eee url(list_sep_grey.gif) no-repeat left center; height:100%; } #bibcircmenu li a img { vertical-align:middle; } #bibcircmenu li img{ border:none; } #bibcircmenu li.right { float:right; margin-right:2px; padding-right:0; padding-left:0; margin-left:0; background-image:none; } #bibcircmenu li a{ white-space:nowrap; text-decoration:none; margin:0; padding:3px 6px; } #bibcircmenu li ul.subsubmenu { display:none; position: absolute; background-image:none; top: 1em; left: 0; } #bibcircmenu li ul.subsubmenu li { background:#FFFFFF none repeat scroll 0 0; border-bottom:1px solid #3366CC; border-left:1px solid #3366CC; border-right:1px solid #3366CC; display:list-item !important; float:none !important; position:relative; z-index:50; } #bibcircmenu li ul.subsubmenu li a, #bibcircmenu li ul.subsubmenu li a:hover, #bibcircmenu li ul.subsubmenu li a:visited{ background:transparent none; display:block; color:#36c; } #bibcircmenu li ul.subsubmenu li a:hover{ text-decoration:underline } #bibcircmenu li:hover ul { display:block; position: absolute; } div.bibcircbottom { clear:both; width:100%; border-bottom:2px solid #36c; height:auto; padding:0; position:relative; padding-bottom:9px; } .bibcirctable { font-size: 82%; width:100%; margin:auto; max-width: 1280px; } .bibcirctable_contents { color: #79d; font-size: small; width:90%; margin:auto; max-width: 300px; } .bibcirctableheader { color: #79d; font-size: small; font-weight: bold; font-variant: small-caps; } .bibcircwarning { color: #f11010; } .bibcircpending { color: #f16f10; } .bibcircok { color: #060; } .bibcirccontent { color: black; } .formbutton { color: #fff; background: #36c; font-weight: bold; } .bibcircbutton { background-color:#fff; border:1px solid; border-color:#cdcdcd; } .bibcircbuttonover { background-color:#cadff5; border:1px solid; border-color:#cdcdcd; } div.title { width: 600px; padding-left: 5px; color: #36c; font-size: 20px; font-weight: bold; font-variant: small-caps; padding-bottom:2px; } div.subtitle { width: 600px; padding-left: 5px; color: #36c; font-size: 16px; font-variant: small-caps; padding-bottom:2px; } .bibcircnotes { border-width: 0px; border-spacing: 1px; border-style: none; border-color: #cfcfcf; border-collapse: collapse; background-color: white; } .bibcircnotes th { border-width: 1px; padding: 2px; border-style: solid; border-color: #cfcfcf; background-color: white; -moz-border-radius: 0px; } .bibcircnotes td { border-width: 1px; padding: 2px; border-style: solid; border-color: #cfcfcf; background-color: white; -moz-border-radius: 0px; } .infoboxsuccess{ background-color: #dcfdc1; padding: 20px; color: #3e5e25; border-collapse: collapse; border: 1px solid #88d04d; text-align: left; width: 50%; } .infoboxmsg{ background-color: #cadff5; padding: 20px; color: #336598; border-collapse: collapse; border: 1px solid #336598; text-align: left; width: 50%; } .clear { clear:both; line-height:1px; } /* Rollover menus */ .menu ul { list-style:none; margin:0; padding:0 0 0 0px; } .menu li { display:block; float:left; text-decoration:none; padding: 7px; height:100%; margin-right:10px; /*/*//*/ display : none; /* */ } .menu .hassubmenu { position:relative; } .menu .hassubmenu a { display: inline-block; /* Necessary on IE */ padding-right:12px; background: transparent url(drop_down_menu_arrow_down_b.gif) no-repeat right center; } .menu .on.hassubmenu a { background: transparent url(drop_down_menu_arrow_down_b.gif) no-repeat right center; } .menu .on { height:100%; } .menu a img { vertical-align:middle; } .menu img { border:none; } .menu .right { float:right; margin-right:2px; padding-right:0; padding-left:0; margin-left:0; background-image:none; } .menu a { white-space:nowrap; text-decoration:none; margin:0; padding:0px 6px; } .menu ul.subsubmenu { display:none; position: absolute; background-image:none; top: 1em; left: 0; z-index: 99; text-align: left; } .menu ul.subsubmenu li { display:list-item !important; float: none !important; position: relative; border-bottom: 1px solid #36c; border-left: 1px solid #36c; border-right: 1px solid #36c; background-color:#fff; background-image:none !important; } .menu ul.subsubmenu li a, .menu div ul.subsubmenu li a:hover, .menu div ul.subsubmenu li a:visited { background-color:transparent; background-image:none !important; display:block; text-transform:capitalize; color: #36c; } .menu ul.subsubmenu li a:hover { text-decoration:underline } .menu :hover ul { display:block; position: absolute; } /* Override/Customize rollover menus in some cases*/ .menu .headermoduleboxbody .hassubmenu a { /*background: transparent url(drop_down_menu_arrow_down_lb.gif) no-repeat right center;*/ background-image:url(drop_down_menu_arrow_down_lb.gif) } .menu .headermoduleboxbody .hassubmenu a.header:hover { /*background: transparent url(drop_down_menu_arrow_down_b.gif) no-repeat right center;*/ background-image:url(drop_down_menu_arrow_down_b.gif) } .bibeditHPCorrection{ border-width: 1px; background-color: #FAEBD7; font-size: smaller; border-style: groove; display: inline-block; border-color: RosyBrown; margin:5px 3px 3px 5px; padding: 2px; } #bibeditHPChanges{ overflow-y: auto; overflow-x: hidden; max-height: 150px; } .bibeditHPHiddenElement{ visibility: hidden; display: none; } .bibeditHPPanelEntry{ border-width: 1px; border-style: dotted; display: table; background-color: #feffff; border-color: #cbcccc; margin-bottom: 5px; } .bibeditHPContentPreviewBox { position: absolute; z-index:0; border-style: dotted; border-width: 1px; background-color: #fefeff; top: 0px; height: 500px; overflow: auto; width: 500px; } .bibeditHPControl{ display:table-cell; width:20%; margin:0px; } .bibeditHPEntryNumber{ display: table-cell; width: 80%; } .bibeditHPEntryDateSection{ font-size: smaller; width: 60%; margin: 0px; display: table-cell; } .bibeditHPDetailsOpener{ display: table-cell; width: 20%; } .bibeditHPInformationsSection{ } .bibeditHPDetailsOpener{ display: table-cell; } .bibeditHPEntryControlsPanel{ display: table-row; } .bibeditHPEntryRow1{ display: table-row; } .bibeditHPEntryRow2{ display: table-row; } .bibeditHPEntryCol1{ display: table-cell; } .bibeditHPEntryCol2{ display: table-cell; max-width: 28px; min-width: 28px; margin: 0px; } .bibeditHPPanelEntryDisabled { background-color: #eeeeee; color: #BBBBBB; } .snippetbox { margin-left:10px; color: #000000; background: #cccccc; border: solid 1px #000000; } .bibEditRevHistorySelectedEntry{ background-color: #cccccc; display: table-row; } .bibEditRevHistoryEntry{ background-color: #efefef; display: table-row; } .bibEditRevHistoryEntryContent{ display: table-cell; font-size: 80%; } .bibEditRevHistoryEntryControls{ display: table-cell; } .bibEditRevHistoryLink{ display: table-cell; border-style: none; } .bibEditRevHistoryLinkImg{ border-width: 0px; border-style: none; } .bibEditRevHistoryMenuSection{ max-height: 200px; overflow-y: auto; overflow-x: hidden; } /* end of invenio.css */ .bibEditHiddenElement { display: none; } .bibEditURPreviewBox { border-color: #dddddd; border-style: dotted; } .bibEditURPairRow { background-color: white; } .bibEditUROddRow { background-color: #eeeeee; } .bibEditURPreviewHeader{ font-weight: bolder; } .bibEditURDescHeader{ font-weight: bolder; } .bibEditURDescEmptyCell{ width:20px; } .bibEditURDescChar{ font-style: italic; } .bibEditURDescVal{ } .bibEditURMenuSection{ display: table-row; width: 138px; max-width: 138px; overflow: visible; } .bibEditURDetailsSection{ display: table-cell; max-width: 64px; width: 64px; } .bibEditURPreviewBox{ max-width: 138px; width: 138px; } .bibEditURDescEntry { max-width: 138px; width: 138px; max-height: 20px; overflow: visible; } .bibEditURDescEntryDetails { position: relative; left: 138px; top: -20px; overflow: visible; background-color: white; border-style: dotted; border-width: 1px; width: 300px; } .bibEditURDescEntrySelected{ background-color: #aaaaaa; } /* end of cds.css */ diff --git a/modules/websubmit/lib/websubmit_templates.py b/modules/websubmit/lib/websubmit_templates.py index a81ab7ffb..9e95d66a3 100644 --- a/modules/websubmit/lib/websubmit_templates.py +++ b/modules/websubmit/lib/websubmit_templates.py @@ -1,3087 +1,3087 @@ ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. __revision__ = "$Id$" import urllib import cgi import re import operator from invenio.config import CFG_SITE_URL, \ CFG_SITE_LANG from invenio.messages import gettext_set_language from invenio.dateutils import convert_datetext_to_dategui, convert_datestruct_to_dategui from invenio.urlutils import create_html_link from invenio.webmessage_mailutils import email_quoted_txt2html from invenio.htmlutils import escape_html from websubmit_config import \ CFG_WEBSUBMIT_CHECK_USER_LEAVES_SUBMISSION class Template: # Parameters allowed in the web interface for fetching files files_default_urlargd = { 'version': (str, ""), # version "" means "latest" 'docname': (str, ""), # the docname (optional) 'format' : (str, ""), # the format 'verbose' : (int, 0), # the verbosity 'subformat' : (str, ""), # the subformat } def tmpl_submit_home_page(self, ln, catalogues): """ The content of the home page of the submit engine Parameters: - 'ln' *string* - The language to display the interface in - 'catalogues' *string* - The HTML code for the catalogues list """ # load the right message language _ = gettext_set_language(ln) return """ <script type="text/javascript" language="Javascript1.2"> var allLoaded = 1; </script> <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(document_types)s:</th> </tr> <tr> <td class="portalboxbody"> <br /> %(please_select)s: <br /><br /> <table width="100%%"> <tr> <td width="50%%" class="narrowsearchboxbody"> %(catalogues)s </td> </tr> </table> </td> </tr> </table>""" % { 'document_types' : _("Document types available for submission"), 'please_select' : _("Please select the type of document you want to submit"), 'catalogues' : catalogues, 'ln' : ln, } def tmpl_submit_home_catalog_no_content(self, ln): """ The content of the home page of submit in case no doctypes are available Parameters: - 'ln' *string* - The language to display the interface in """ # load the right message language _ = gettext_set_language(ln) out = "<h3>" + _("No document types available.") + "</h3>\n" return out def tmpl_submit_home_catalogs(self, ln, catalogs): """ Produces the catalogs' list HTML code Parameters: - 'ln' *string* - The language to display the interface in - 'catalogs' *array* - The catalogs of documents, each one a hash with the properties: - 'id' - the internal id - 'name' - the name - 'sons' - sub-catalogs - 'docs' - the contained document types, in the form: - 'id' - the internal id - 'name' - the name There is at least one catalog """ # load the right message language _ = gettext_set_language(ln) # import pprint # out = "<pre>" + pprint.pformat(catalogs) out = "" for catalog in catalogs: out += "\n<ul>" out += self.tmpl_submit_home_catalogs_sub(ln, catalog) out += "\n</ul>\n" return out def tmpl_print_warning(self, msg, type, prologue, epilogue): """Prints warning message and flushes output. Parameters: - 'msg' *string* - The message string - 'type' *string* - the warning type - 'prologue' *string* - HTML code to display before the warning - 'epilogue' *string* - HTML code to display after the warning """ out = '\n%s<span class="quicknote">' % (prologue) if type: out += '%s: ' % type out += '%s</span>%s' % (msg, epilogue) return out def tmpl_submit_home_catalogs_sub(self, ln, catalog): """ Recursive function that produces a catalog's HTML display Parameters: - 'ln' *string* - The language to display the interface in - 'catalog' *array* - A catalog of documents, with the properties: - 'id' - the internal id - 'name' - the name - 'sons' - sub-catalogs - 'docs' - the contained document types, in the form: - 'id' - the internal id - 'name' - the name """ # load the right message language _ = gettext_set_language(ln) if catalog['level'] == 1: out = "<li><font size=\"+1\"><strong>%s</strong></font>\n" % catalog['name'] else: if catalog['level'] == 2: out = "<li>%s\n" % cgi.escape(catalog['name']) else: if catalog['level'] > 2: out = "<li>%s\n" % cgi.escape(catalog['name']) if len(catalog['docs']) or len(catalog['sons']): out += "<ul>\n" if len(catalog['docs']) != 0: for row in catalog['docs']: out += self.tmpl_submit_home_catalogs_doctype(ln, row) if len(catalog['sons']) != 0: for row in catalog['sons']: out += self.tmpl_submit_home_catalogs_sub(ln, row) if len(catalog['docs']) or len(catalog['sons']): out += "</ul></li>" else: out += "</li>" return out def tmpl_submit_home_catalogs_doctype(self, ln, doc): """ Recursive function that produces a catalog's HTML display Parameters: - 'ln' *string* - The language to display the interface in - 'doc' *array* - A catalog of documents, with the properties: - 'id' - the internal id - 'name' - the name """ # load the right message language _ = gettext_set_language(ln) return """<li>%s</li>""" % create_html_link('%s/submit' % CFG_SITE_URL, {'doctype' : doc['id'], 'ln' : ln}, doc['name']) def tmpl_action_page(self, ln, uid, guest, pid, now, doctype, description, docfulldesc, snameCateg, lnameCateg, actionShortDesc, indir, statustext): """ Recursive function that produces a catalog's HTML display Parameters: - 'ln' *string* - The language to display the interface in - 'guest' *boolean* - If the user is logged in or not - 'pid' *string* - The current process id - 'now' *string* - The current time (security control features) - 'doctype' *string* - The selected doctype - 'description' *string* - The description of the doctype - 'docfulldesc' *string* - The title text of the page - 'snameCateg' *array* - The short names of all the categories of documents - 'lnameCateg' *array* - The long names of all the categories of documents - 'actionShortDesc' *array* - The short names (codes) for the different actions - 'indir' *array* - The directories for each of the actions - 'statustext' *array* - The names of the different action buttons """ # load the right message language _ = gettext_set_language(ln) out = "" out += """ <script language="JavaScript" type="text/javascript"> var checked = 0; function tester() { """ if (guest): out += "alert(\"%(please_login_js)s\");return false;\n" % { 'please_login_js' : _("Please log in first.") + '\\n' + _("Use the top-right menu to log in.") } out += """ if (checked == 0) { alert ("%(select_cat)s"); return false; } else { return true; } } function clicked() { checked=1; } function selectdoctype(nb) { document.forms[0].act.value = docname[nb]; } </script> <form method="get" action="/submit"> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="indir" /> <input type="hidden" name="access" value="%(now)i_%(pid)s" /> <input type="hidden" name="act" /> <input type="hidden" name="startPg" value="1" /> <input type="hidden" name="mainmenu" value="/submit?doctype=%(doctype)s&ln=%(ln)s" /> <input type="hidden" name="ln" value="%(ln)s" /> <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(docfulldesc)s</th> </tr> <tr> <td class="portalboxbody">%(description)s <br /> <script language="JavaScript" type="text/javascript"> var nbimg = document.images.length + 1; </script> <br /> <table align="center" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"> """ % { 'select_cat' : _("Please select a category"), 'doctype' : doctype, 'now' : now, 'pid' : pid, 'docfulldesc' : docfulldesc, 'description' : description, 'ln' : ln, } if len(snameCateg) : out += """<td align="right">""" for i in range(0, len(snameCateg)): out += """<label for="combo%(shortname)s">%(longname)s</label><input type="radio" name="combo%(doctype)s" id="combo%(shortname)s" value="%(shortname)s" onclick="clicked();" /> <br />""" % { 'longname' : lnameCateg[i], 'doctype' : doctype, 'shortname' : snameCateg[i], } - out += "</td>" + out += "</td><td>" else: - out += "<script>checked=1;</script>" - out += """<td> </td> + out += '<td><script type="text/javascript">checked=1;</script>' + out += """ </td> <td> <table><tr><td> """ #display list of actions for i in range(0, len(actionShortDesc)): out += """<input type="submit" class="adminbutton" value="%(status)s" onclick="if (tester()) { document.forms[0].indir.value='%(indir)s';document.forms[0].act.value='%(act)s';document.forms[0].submit();}; return false;" /><br />""" % { 'status' : statustext[i], 'indir' : indir[i], 'act' : actionShortDesc[i] } out += """ </td></tr></table> </td> </tr> </table> <br />""" if len(snameCateg) : out += """<strong class="headline">%(notice)s:</strong><br /> %(select_cat)s""" % { 'notice' : _("Notice"), 'select_cat' : _("Select a category and then click on an action button."), } out += """ <br /><br /> </td> </tr> </table> </form> <form action="/submit"><hr /> <font color="black"><small>%(continue_explain)s</small></font> <table border="0" bgcolor="#CCCCCC" width="100%%"><tr> <td width="100%%"> <small>Access Number: <input size="15" name="AN" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="ln" value="%(ln)s" /> <input class="adminbutton" type="submit" value=" %(go)s " /> </small> </td></tr> </table> <hr /> </form> """ % { 'continue_explain' : _("To continue with a previously interrupted submission, enter an access number into the box below:"), 'doctype' : doctype, 'go' : _("GO"), 'ln' : ln, } return out def tmpl_warning_message(self, ln, msg): """ Produces a warning message for the specified text Parameters: - 'ln' *string* - The language to display the interface in - 'msg' *string* - The message to display """ # load the right message language _ = gettext_set_language(ln) return """<center><font color="red">%s</font></center>""" % msg def tmpl_page_interface(self, ln, docname, actname, curpage, nbpages, nextPg, access, nbPg, doctype, act, fields, javascript, mainmenu): """ Produces a page with the specified fields (in the submit chain) Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The document type - 'docname' *string* - The document type name - 'actname' *string* - The action name - 'act' *string* - The action - 'curpage' *int* - The current page of submitting engine - 'nbpages' *int* - The total number of pages - 'nextPg' *int* - The next page - 'access' *string* - The submission number - 'nbPg' *string* - ?? - 'fields' *array* - the fields to display in the page, with each record having the structure: - 'fullDesc' *string* - the description of the field - 'text' *string* - the HTML code of the field - 'javascript' *string* - if the field has some associated javascript code - 'type' *string* - the type of field (T, F, I, H, D, S, R) - 'name' *string* - the name of the field - 'rows' *string* - the number of rows for textareas - 'cols' *string* - the number of columns for textareas - 'val' *string* - the default value of the field - 'size' *string* - the size for text fields - 'maxlength' *string* - the maximum length for text fields - 'htmlcode' *string* - the complete HTML code for user-defined fields - 'typename' *string* - the long name of the type - 'javascript' *string* - the javascript code to insert in the page - 'mainmenu' *string* - the url of the main menu """ # load the right message language _ = gettext_set_language(ln) # top menu out = """ <form method="post" action="/submit" enctype="multipart/form-data" onsubmit="return tester();" accept-charset="UTF-8"> <center><table cellspacing="0" cellpadding="0" border="0"> <tr> <td class="submitHeader"><b>%(docname)s </b></td> <td class="submitHeader"><small> %(actname)s </small></td> <td valign="bottom"> <table cellspacing="0" cellpadding="0" border="0" width="100%%"> <tr><td class="submitEmptyPage"> </td> """ % { 'docname' : docname, 'actname' : actname, } for i in range(1, nbpages+1): if i == int(curpage): out += """<td class="submitCurrentPage"><small> page: %s </small></td>""" % curpage else: out += """<td class="submitPage"><small> <a href='' onclick="if (tester2() == 1){document.forms[0].curpage.value=%s;user_must_confirm_before_leaving_page = false;document.forms[0].submit();return false;} else { return false; }">%s</a> </small></td>""" % (i, i) out += """ <td class="submitEmptyPage"> </td></tr></table> </td> <td class="submitHeader" align="right"> <a href="" onclick="window.open('/submit/summary?doctype=%(doctype)s&act=%(act)s&access=%(access)s&ln=%(ln)s','summary','scrollbars=yes,menubar=no,width=500,height=250');return false;"><font color="white"><small>%(summary)s(2)</small></font></a> </td> </tr> <tr><td colspan="5" class="submitHeader"> <table border="0" cellspacing="0" cellpadding="15" width="100%%" class="submitBody"><tr><td> <br /> <input type="hidden" name="nextPg" value="%(nextPg)s" /> <input type="hidden" name="access" value="%(access)s" /> <input type="hidden" name="curpage" value="%(curpage)s" /> <input type="hidden" name="nbPg" value="%(nbPg)s" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="act" value="%(act)s" /> <input type="hidden" name="mode" value="U" /> <input type="hidden" name="step" value="0" /> <input type="hidden" name="ln" value="%(ln)s" /> """ % { 'summary' : _("SUMMARY"), 'doctype' : cgi.escape(doctype), 'act' : cgi.escape(act), 'access' : cgi.escape(access), 'nextPg' : cgi.escape(nextPg), 'curpage' : cgi.escape(curpage), 'nbPg' : cgi.escape(nbPg), 'ln' : cgi.escape(ln), } for field in fields: if field['javascript']: out += """<script language="JavaScript1.1" type="text/javascript"> %s </script> """ % field['javascript'] # now displays the html form field(s) out += "%s\n%s\n" % (field['fullDesc'], field['text']) out += javascript out += "<br /> <br /> </td></tr></table></td></tr>\n" # Display the navigation cell # Display "previous page" navigation arrows out += """<tr><td colspan="5"><table border="0" cellpadding="0" cellspacing="0" width="100%%"><tr>""" if int(curpage) != 1: out += """ <td class="submitHeader" align="left"> <a href='' onclick="if (tester2() == 1) {document.forms[0].curpage.value=%(prpage)s;user_must_confirm_before_leaving_page = false;document.forms[0].submit();return false;} else { return false; }"> <img src="%(images)s/left-trans.gif" alt="%(prevpage)s" border="0" /> <strong><font color="white">%(prevpage)s</font></strong> </a> </td> """ % { 'prpage' : int(curpage) - 1, 'images' : CFG_SITE_URL + '/img', 'prevpage' : _("Previous page"), } else: out += """ <td class="submitHeader"> </td>""" # Display the submission number out += """ <td class="submitHeader" align="center"><small>%(submission)s: %(access)s</small></td>\n""" % { 'submission' : _("Submission number") + '(1)', 'access' : cgi.escape(access), } # Display the "next page" navigation arrow if int(curpage) != int(nbpages): out += """ <td class="submitHeader" align="right"> <a href='' onclick="if (tester2()){document.forms[0].curpage.value=%(nxpage)s;user_must_confirm_before_leaving_page = false;document.forms[0].submit();return false;} else {return false;}; return false;"> <strong><font color="white">%(nextpage)s</font></strong> <img src="%(images)s/right-trans.gif" alt="%(nextpage)s" border="0" /> </a> </td> """ % { 'nxpage' : int(curpage) + 1, 'images' : CFG_SITE_URL + '/img', 'nextpage' : _("Next page"), } else: out += """ <td class="submitHeader"> </td>""" out += """</tr></table></td></tr></table></center></form> <br /> <br /> <a href="%(mainmenu)s" onclick="if (%(check_not_already_enabled)s){return confirm('%(surequit)s')}"> <img src="%(images)s/mainmenu.gif" border="0" alt="%(back)s" align="right" /></a> <br /><br /> <hr /> <small>%(take_note)s</small><br /> <small>%(explain_summary)s</small><br /> """ % { 'surequit' : _("Are you sure you want to quit this submission?"), 'check_not_already_enabled': CFG_WEBSUBMIT_CHECK_USER_LEAVES_SUBMISSION and 'false' or 'true', 'back' : _("Back to main menu"), 'mainmenu' : cgi.escape(mainmenu), 'images' : CFG_SITE_URL + '/img', 'take_note' : '(1) ' + _("This is your submission access number. It can be used to continue with an interrupted submission in case of problems."), 'explain_summary' : '(2) ' + _("Mandatory fields appear in red in the SUMMARY window."), } return out def tmpl_submit_field(self, ln, field): """ Produces the HTML code for the specified field Parameters: - 'ln' *string* - The language to display the interface in - 'field' *array* - the field to display in the page, with the following structure: - 'javascript' *string* - if the field has some associated javascript code - 'type' *string* - the type of field (T, F, I, H, D, S, R) - 'name' *string* - the name of the field - 'rows' *string* - the number of rows for textareas - 'cols' *string* - the number of columns for textareas - 'val' *string* - the default value of the field - 'size' *string* - the size for text fields - 'maxlength' *string* - the maximum length for text fields - 'htmlcode' *string* - the complete HTML code for user-defined fields - 'typename' *string* - the long name of the type """ # load the right message language _ = gettext_set_language(ln) # If the field is a textarea if field['type'] == 'T': ## Field is a textarea: text = "<textarea name=\"%s\" rows=\"%s\" cols=\"%s\">%s</textarea>" \ % (field['name'], field['rows'], field['cols'], cgi.escape(str(field['val']), 1)) # If the field is a file upload elif field['type'] == 'F': ## the field is a file input: text = """<input type="file" name="%s" size="%s"%s />""" \ % (field['name'], field['size'], "%s" \ % ((field['maxlength'] in (0, None) and " ") or (""" maxlength="%s\"""" % field['maxlength'])) ) # If the field is a text input elif field['type'] == 'I': ## Field is a text input: text = """<input type="text" name="%s" size="%s" value="%s"%s />""" \ % (field['name'], field['size'], field['val'], "%s" \ % ((field['maxlength'] in (0, None) and " ") or (""" maxlength="%s\"""" % field['maxlength'])) ) # If the field is a hidden input elif field['type'] == 'H': text = "<input type=\"hidden\" name=\"%s\" value=\"%s\" />" % (field['name'], field['val']) # If the field is user-defined elif field['type'] == 'D': text = field['htmlcode'] # If the field is a select box elif field['type'] == 'S': text = field['htmlcode'] # If the field type is not recognized else: text = "%s: unknown field type" % field['typename'] return text def tmpl_page_interface_js(self, ln, upload, field, fieldhtml, txt, check, level, curdir, values, select, radio, curpage, nbpages, returnto): """ Produces the javascript for validation and value filling for a submit interface page Parameters: - 'ln' *string* - The language to display the interface in - 'upload' *array* - booleans if the field is a <input type="file"> field - 'field' *array* - the fields' names - 'fieldhtml' *array* - the fields' HTML representation - 'txt' *array* - the fields' long name - 'check' *array* - if the fields should be checked (in javascript) - 'level' *array* - strings, if the fields should be filled (M) or not (O) - 'curdir' *array* - the current directory of the submission - 'values' *array* - the current values of the fields - 'select' *array* - booleans, if the controls are "select" controls - 'radio' *array* - booleans, if the controls are "radio" controls - 'curpage' *int* - the current page - 'nbpages' *int* - the total number of pages - 'returnto' *array* - a structure with 'field' and 'page', if a mandatory field on antoher page was not completed """ # load the right message language _ = gettext_set_language(ln) nbFields = len(upload) # if there is a file upload field, we change the encoding type out = """<script language="JavaScript1.1" type="text/javascript"> """ for i in range(0,nbFields): if upload[i] == 1: out += "document.forms[0].encoding = \"multipart/form-data\";\n" break # we don't want the form to be submitted if the user enters 'Return' # tests if mandatory fields are well filled out += """function tester(){ return false; } function tester2() { """ for i in range(0,nbFields): if re.search("%s\[\]" % field[i],fieldhtml[i]): fieldname = "%s[]" % field[i] else: fieldname = field[i] out += " el = document.forms[0].elements['%s'];\n" % fieldname # If the field must be checked we call the checking function if check[i] != "": out += """if (%(check)s(el.value) == 0) { el.focus(); return 0; } """ % { 'check' : check[i] } # If the field is mandatory, we check a value has been selected if level[i] == 'M': if select[i] != 0: # If the field is a select box out += """if ((el.selectedIndex == -1)||(el.selectedIndex == 0)){ alert("%(field_mandatory)s"); return 0; } """ % { 'field_mandatory' : _("The field %s is mandatory.") % txt[i] + '\\n' + _("Please make a choice in the select box") } elif radio[i] != 0: # If the field is a radio buttonset out += """var check=0; for (var j = 0; j < el.length; j++) { if (el.options[j].checked){ check++; } } if (check == 0) { alert("%(press_button)s"); return 0; }""" % { 'press_button':_("Please press a button.") } else: # If the field is a text input out += """if (el.value == '') { alert("%(field_mandatory)s"); return 0; }""" % { 'field_mandatory' : _("The field %s is mandatory. Please fill it in.") % txt[i] } out += """ return 1; } <!-- Fill the fields in with the previous saved values--> """ # # # # # # # # # # # # # # # # # # # # # # # # # # Fill the fields with the previously saved values # # # # # # # # # # # # # # # # # # # # # # # # # for i in range(0,nbFields): if re.search("%s\[\]"%field[i],fieldhtml[i]): fieldname = "%s[]" % field[i] else: fieldname = field[i] text = values[i] if text != '': if select[i] != 0: # If the field is a SELECT element vals = text.split("\n") tmp="" for val in vals: if tmp != "": tmp = tmp + " || " tmp = tmp + "el.options[j].value == \"%s\" || el.options[j].text == \"%s\"" % (val,val) if tmp != "": out += """ <!--SELECT field found--> el = document.forms[0].elements['%(fieldname)s']; for (var j = 0; j < el.length; j++){ if (%(tmp)s){ el.options[j].selected = true; } }""" % { 'fieldname' : fieldname, 'tmp' : tmp, } elif radio[i] != 0: # If the field is a RADIO element out += """<!--RADIO field found--> el = document.forms[0].elements['%(fieldname)s']; if (el.value == "%(text)s"){ el.checked=true; }""" % { 'fieldname' : fieldname, 'text' : cgi.escape(str(text)).replace('"', '\\"'), } elif upload[i] == 0: text = text.replace('"','\"') text = text.replace("\n","\\n") # If the field is not an upload element out += """<!--input field found--> el = document.forms[0].elements['%(fieldname)s']; el.value="%(text)s"; """ % { 'fieldname' : fieldname, 'text' : cgi.escape(str(text)).replace('"', '\\"'), } out += """<!--End Fill in section--> """ # JS function finish # This function tests each mandatory field in the whole submission and checks whether # the field has been correctly filled in or not # This function is called when the user presses the "End # Submission" button if int(curpage) == int(nbpages): out += """function finish() { """ if returnto: out += """alert ("%(msg)s"); document.forms[0].curpage.value="%(page)s"; user_must_confirm_before_leaving_page = false; document.forms[0].submit(); } """ % { 'msg' : _("The field %(field)s is mandatory.") + '\n' \ + _("Going back to page") \ + str(returnto['page']), 'page' : returnto['page'] } else: out += """ if (tester2()) { document.forms[0].action="/submit"; document.forms[0].step.value=1; user_must_confirm_before_leaving_page = false; document.forms[0].submit(); } else { return false; } }""" out += """</script>""" return out def tmpl_page_do_not_leave_submission_js(self, ln, enabled=CFG_WEBSUBMIT_CHECK_USER_LEAVES_SUBMISSION): """ Code to ask user confirmation when leaving the page, so that the submission is not interrupted by mistake. All submission functions should set the Javascript variable 'user_must_confirm_before_leaving_page' to 'false' before programmatically submitting the submission form. Parameters: - 'ln' *string* - The language to display the interface in - 'enabled' *bool* - If the check applies or not """ # load the right message language _ = gettext_set_language(ln) out = ''' <script language="JavaScript"> var user_must_confirm_before_leaving_page = %s; window.onbeforeunload = confirmExit; function confirmExit() { if (user_must_confirm_before_leaving_page) return "%s"; } </script> ''' % (enabled and 'true' or 'false', _('Your modifications will not be saved.').replace('"', '\\"')) return out def tmpl_page_endaction(self, ln, nextPg, startPg, access, curpage, nbPg, nbpages, doctype, act, docname, actname, mainmenu, finished, function_content, next_action): """ Produces the pages after all the fields have been submitted. Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The document type - 'act' *string* - The action - 'docname' *string* - The document type name - 'actname' *string* - The action name - 'curpage' *int* - The current page of submitting engine - 'startPg' *int* - The start page - 'nextPg' *int* - The next page - 'access' *string* - The submission number - 'nbPg' *string* - total number of pages - 'nbpages' *string* - number of pages (?) - 'mainmenu' *string* - the url of the main menu - 'finished' *bool* - if the submission is finished - 'function_content' *string* - HTML code produced by some function executed - 'next_action' *string* - if there is another action to be completed, the HTML code for linking to it """ # load the right message language _ = gettext_set_language(ln) out = """ <form ENCTYPE="multipart/form-data" action="/submit" onsubmit="user_must_confirm_before_leaving_page=false;" method="post" accept-charset="UTF-8"> <input type="hidden" name="nextPg" value="%(nextPg)s" /> <input type="hidden" name="startPg" value="%(startPg)s" /> <input type="hidden" name="access" value="%(access)s" /> <input type="hidden" name="curpage" value="%(curpage)s" /> <input type="hidden" name="nbPg" value="%(nbPg)s" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="act" value="%(act)s" /> <input type="hidden" name="fromdir" value="" /> <input type="hidden" name="mainmenu" value="%(mainmenu)s" /> <input type="hidden" name="mode" value="U" /> <input type="hidden" name="step" value="1" /> <input type="hidden" name="deleted" value="no" /> <input type="hidden" name="file_path" value="" /> <input type="hidden" name="userfile_name" value="" /> <input type="hidden" name="ln" value="%(ln)s" /> <center><table cellspacing="0" cellpadding="0" border="0"><tr> <td class="submitHeader"><b>%(docname)s </b></td> <td class="submitHeader"><small> %(actname)s </small></td> <td valign="bottom"> <table cellspacing="0" cellpadding="0" border="0" width="100%%"> <tr><td class="submitEmptyPage"> </td> """ % { 'nextPg' : cgi.escape(nextPg), 'startPg' : cgi.escape(startPg), 'access' : cgi.escape(access), 'curpage' : cgi.escape(curpage), 'nbPg' : cgi.escape(nbPg), 'doctype' : cgi.escape(doctype), 'act' : cgi.escape(act), 'docname' : docname, 'actname' : actname, 'mainmenu' : cgi.escape(mainmenu), 'ln' : cgi.escape(ln), } if finished == 1: out += """<td class="submitCurrentPage">%(finished)s</td> <td class="submitEmptyPage"> </td> </tr></table> </td> <td class="submitEmptyPage" align="right"> </td> """ % { 'finished' : _("finished!"), } else: for i in range(1, nbpages + 1): out += """<td class="submitPage"><small> <a href='' onclick="document.forms[0].curpage.value=%s;document.forms[0].action='/submit';document.forms[0].step.value=0;user_must_confirm_before_leaving_page = false;document.forms[0].submit();return false;">%s</a> </small></td>""" % (i,i) out += """<td class="submitCurrentPage">%(end_action)s</td><td class="submitEmptyPage"> </td></tr></table></td> <td class="submitHeader" align="right"> <a href='' onclick="window.open('/submit/summary?doctype=%(doctype)s&act=%(act)s&access=%(access)s&ln=%(ln)s','summary','scrollbars=yes,menubar=no,width=500,height=250');return false;"><font color="white"><small>%(summary)s(2)</small></font></a> </td>""" % { 'end_action' : _("end of action"), 'summary' : _("SUMMARY"), 'doctype' : cgi.escape(doctype), 'act' : cgi.escape(act), 'access' : cgi.escape(access), 'ln' : cgi.escape(ln), } out += """</tr> <tr> <td colspan="5" class="submitBody"> <small><br /><br /> %(function_content)s %(next_action)s <br /><br /> </td> </tr> <tr class="submitHeader"> <td class="submitHeader" colspan="5" align="center">""" % { 'function_content' : function_content, 'next_action' : next_action, } if finished == 0: out += """<small>%(submission)s</small>²: <small>%(access)s</small>""" % { 'submission' : _("Submission no"), 'access' : cgi.escape(access), } else: out += " \n" out += """ </td> </tr> </table> </center> </form> <br /> <br />""" # Add the "back to main menu" button if finished == 0: out += """ <a href="%(mainmenu)s" onclick="if (%(check_not_already_enabled)s){return confirm('%(surequit)s')}"> <img src="%(images)s/mainmenu.gif" border="0" alt="%(back)s" align="right" /></a> <br /><br />""" % { 'surequit' : _("Are you sure you want to quit this submission?"), 'back' : _("Back to main menu"), 'images' : CFG_SITE_URL + '/img', 'mainmenu' : cgi.escape(mainmenu), 'check_not_already_enabled': CFG_WEBSUBMIT_CHECK_USER_LEAVES_SUBMISSION and 'false' or 'true', } else: out += """ <a href="%(mainmenu)s"> <img src="%(images)s/mainmenu.gif" border="0" alt="%(back)s" align="right" /></a> <br /><br />""" % { 'back' : _("Back to main menu"), 'images' : CFG_SITE_URL + '/img', 'mainmenu' : cgi.escape(mainmenu), } return out def tmpl_function_output(self, ln, display_on, action, doctype, step, functions): """ Produces the output of the functions. Parameters: - 'ln' *string* - The language to display the interface in - 'display_on' *bool* - If debug information should be displayed - 'doctype' *string* - The document type - 'action' *string* - The action - 'step' *int* - The current step in submission - 'functions' *aray* - HTML code produced by functions executed and informations about the functions - 'name' *string* - the name of the function - 'score' *string* - the score of the function - 'error' *bool* - if the function execution produced errors - 'text' *string* - the HTML code produced by the function """ # load the right message language _ = gettext_set_language(ln) out = "" if display_on: out += """<br /><br />%(function_list)s<P> <table border="1" cellpadding="15"> <tr><th>%(function)s</th><th>%(score)s</th><th>%(running)s</th></tr> """ % { 'function_list' : _("Here is the %(x_action)s function list for %(x_doctype)s documents at level %(x_step)s") % { 'x_action' : action, 'x_doctype' : doctype, 'x_step' : step, }, 'function' : _("Function"), 'score' : _("Score"), 'running' : _("Running function"), } for function in functions: out += """<tr><td>%(name)s</td><td>%(score)s</td><td>%(result)s</td></tr>""" % { 'name' : function['name'], 'score' : function['score'], 'result' : function['error'] and (_("Function %s does not exist.") % function['name'] + "<br />") or function['text'] } out += "</table>" else: for function in functions: if not function['error']: out += function['text'] return out def tmpl_next_action(self, ln, actions): """ Produces the output of the functions. Parameters: - 'ln' *string* - The language to display the interface in - 'actions' *array* - The actions to display, in the structure - 'page' *string* - the starting page - 'action' *string* - the action (in terms of submission) - 'doctype' *string* - the doctype - 'nextdir' *string* - the path to the submission data - 'access' *string* - the submission number - 'indir' *string* - ?? - 'name' *string* - the name of the action """ # load the right message language _ = gettext_set_language(ln) out = "<br /><br />%(haveto)s<ul>" % { 'haveto' : _("You must now"), } i = 0 for action in actions: if i > 0: out += " <b>" + _("or") + "</b> " i += 1 out += """<li><a href="" onclick="document.forms[0].action='/submit';document.forms[0].curpage.value='%(page)s';document.forms[0].startPg.value='%(page)s';document.forms[0].act.value='%(action)s';document.forms[0].doctype.value='%(doctype)s';document.forms[0].indir.value='%(nextdir)s';document.forms[0].access.value='%(access)s';document.forms[0].fromdir.value='%(indir)s';user_must_confirm_before_leaving_page = falsedocument.forms[0].submit();return false;"> %(name)s </a></li>""" % action out += "</ul>" return out def tmpl_filelist(self, ln, filelist='', recid='', docname='', version=''): """ Displays the file list for a record. Parameters: - 'ln' *string* - The language to display the interface in - 'recid' *int* - The record id - 'docname' *string* - The document name - 'version' *int* - The version of the document - 'filelist' *string* - The HTML string of the filelist (produced by the BibDoc classes) """ # load the right message language _ = gettext_set_language(ln) title = _("record") + ' #' + '<a href="%s/record/%s">%s</a>' % (CFG_SITE_URL, recid, recid) if docname != "": title += ' ' + _("document") + ' #' + str(docname) if version != "": title += ' ' + _("version") + ' #' + str(version) out = """<div style="width:90%%;margin:auto;min-height:100px;margin-top:10px"> <!--start file list--> %s <!--end file list--></div> """ % (filelist) return out def tmpl_bibrecdoc_filelist(self, ln, types, verbose_files=''): """ Displays the file list for a record. Parameters: - 'ln' *string* - The language to display the interface in - 'types' *array* - The different types to display, each record in the format: - 'name' *string* - The name of the format - 'content' *array of string* - The HTML code produced by tmpl_bibdoc_filelist, for the right files - 'verbose_files' - A string representing in a verbose way the file information. """ # load the right message language _ = gettext_set_language(ln) out = "" for mytype in types: out += "<small><b>%s</b> %s:</small>" % (mytype['name'], _("file(s)")) out += "<ul>" for content in mytype['content']: out += content out += "</ul>" if verbose_files: out += "<pre>%s</pre>" % verbose_files return out def tmpl_bibdoc_filelist(self, ln, versions=[], imageurl='', recid='', docname=''): """ Displays the file list for a record. Parameters: - 'ln' *string* - The language to display the interface in - 'versions' *array* - The different versions to display, each record in the format: - 'version' *string* - The version - 'content' *string* - The HTML code produced by tmpl_bibdocfile_filelist, for the right file - 'previous' *bool* - If the file has previous versions - 'imageurl' *string* - The URL to the file image - 'recid' *int* - The record id - 'docname' *string* - The name of the document """ # load the right message language _ = gettext_set_language(ln) out = """<table border="0" cellspacing="1" class="searchbox"> <tr> <td align="left" colspan="2" class="portalboxheader"> <img src='%(imageurl)s' border="0" /> %(docname)s </td> </tr>""" % { 'imageurl' : imageurl, 'docname' : docname } for version in versions: if version['previous']: versiontext = """<br />(%(see)s <a href="%(siteurl)s/record/%(recID)s/files/?docname=%(docname)s&version=all%(ln_link)s">%(previous)s</a>)""" % { 'see' : _("see"), 'siteurl' : CFG_SITE_URL, 'docname' : urllib.quote(docname), 'recID': recid, 'previous': _("previous"), 'ln_link': (ln != CFG_SITE_LANG and '&ln=' + ln) or '', } else: versiontext = "" out += """<tr> <td class="portalboxheader"> <font size="-2">%(version)s %(ver)s%(text)s</font> </td> <td> <table> """ % { 'version' : _("version"), 'ver' : version['version'], 'text' : versiontext, } for content in version['content']: out += content out += "</table></td></tr>" out += "</table>" return out def tmpl_bibdocfile_filelist(self, ln, recid, name, version, md, superformat, subformat, nice_size, description): """ Displays a file in the file list. Parameters: - 'ln' *string* - The language to display the interface in - 'recid' *int* - The id of the record - 'name' *string* - The name of the file - 'version' *string* - The version - 'md' *datetime* - the modification date - 'superformat' *string* - The display superformat - 'subformat' *string* - The display subformat - 'nice_size' *string* - The nice_size of the file - 'description' *string* - The description that might have been associated to the particular file """ # load the right message language _ = gettext_set_language(ln) urlbase = '%s/record/%s/files/%s' % ( CFG_SITE_URL, recid, '%s%s' % (name, superformat)) urlargd = {'version' : version} if subformat: urlargd['subformat'] = subformat link_label = '%s%s' % (name, superformat) if subformat: link_label += ' (%s)' % subformat link = create_html_link(urlbase, urlargd, cgi.escape(link_label)) return """<tr> <td valign="top"> <small>%(link)s</small> </td> <td valign="top"> <font size="-2" color="green">[%(nice_size)s]</font> <font size="-2"><em>%(md)s</em> </td> <td valign="top"><em>%(description)s</em></td> </tr>""" % { 'link' : link, 'nice_size' : nice_size, 'md' : convert_datestruct_to_dategui(md.timetuple(), ln), 'description' : cgi.escape(description), } def tmpl_submit_summary (self, ln, values): """ Displays the summary for the submit procedure. Parameters: - 'ln' *string* - The language to display the interface in - 'values' *array* - The values of submit. Each of the records contain the following fields: - 'name' *string* - The name of the field - 'mandatory' *bool* - If the field is mandatory or not - 'value' *string* - The inserted value - 'page' *int* - The submit page on which the field is entered """ # load the right message language _ = gettext_set_language(ln) out = """<body style="background-image: url(%(images)s/header_background.gif);"><table border="0">""" % \ { 'images' : CFG_SITE_URL + '/img' } for value in values: if value['mandatory']: color = "red" else: color = "" out += """<tr> <td align="right"> <small> <a href='' onclick="window.opener.document.forms[0].curpage.value='%(page)s';window.opener.document.forms[0].action='/submit?ln=%(ln)s';window.opener.document.forms[0].submit();return false;"> <font color="%(color)s">%(name)s</font> </a> </small> </td> <td> <i><small><font color="black">%(value)s</font></small></i> </td> </tr>""" % { 'color' : color, 'name' : value['name'], 'value' : value['value'], 'page' : value['page'], 'ln' : ln } out += "</table>" return out def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. Parameters: - 'ln' *string* - The language to display the interface in - 'order' *string* - The ordering parameter - 'doctypes' *array* - All the available doctypes, in structures: - 'id' *string* - The doctype id - 'name' *string* - The display name of the doctype - 'selected' *bool* - If the doctype should be selected - 'submissions' *array* - The available submissions, in structures: - 'docname' *string* - The document name - 'actname' *string* - The action name - 'status' *string* - The status of the document - 'cdate' *string* - Creation date - 'mdate' *string* - Modification date - 'id' *string* - The id of the submission - 'reference' *string* - The display name of the doctype - 'pending' *bool* - If the submission is pending - 'act' *string* - The action code - 'doctype' *string* - The doctype code """ # load the right message language _ = gettext_set_language(ln) out = "" out += """ <br /> <form action=""> <input type="hidden" value="%(order)s" name="order" /> <input type="hidden" name="deletedId" /> <input type="hidden" name="deletedDoctype" /> <input type="hidden" name="deletedAction" /> <input type="hidden" name="ln" value="%(ln)s"/> <table class="searchbox" width="100%%" summary="" > <tr> <th class="portalboxheader">%(for)s <select name="doctype" onchange="document.forms[0].submit();"> <option value="">%(alltype)s</option> """ % { 'order' : order, 'for' : _("For"), 'alltype' : _("all types of document"), 'ln' : ln, } for doctype in doctypes: out += """<option value="%(id)s" %(sel)s>%(name)s</option>""" % { 'id' : doctype['id'], 'name' : doctype['name'], 'sel' : doctype['selected'] and "selected=\"selected\"" or "" } out += """ </select> </th> </tr> <tr> <td class="portalboxbody"> <table> <tr> <td></td> </tr> """ num = 0 docname = "" for submission in submissions: if submission['docname'] != docname: docname = submission['docname'] out += """</table> <br/> <br/><h3>%(docname)s</h3> <table border="0" class="searchbox" align="left" width="100%%"> <tr> <th class="headerselected">%(action)s <a href='' onclick='document.forms[0].order.value="actiondown";document.forms[0].submit();return false;'><img src="%(images)s/smalldown.gif" alt="down" border="0" /></a> <a href='' onclick='document.forms[0].order.value="actionup";document.forms[0].submit();return false;'><img src="%(images)s/smallup.gif" alt="up" border="0" /></a> </th> <th class="headerselected">%(status)s <a href='' onclick='document.forms[0].order.value="statusdown";document.forms[0].submit();return false;'><img src="%(images)s/smalldown.gif" alt="down" border="0" /></a> <a href='' onclick='document.forms[0].order.value="statusup";document.forms[0].submit();return false;'><img src="%(images)s/smallup.gif" alt="up" border="0" /></a> </th> <th class="headerselected">%(id)s</th> <th class="headerselected">%(reference)s <a href='' onclick='document.forms[0].order.value="refdown";document.forms[0].submit();return false;'><img src="%(images)s/smalldown.gif" alt="down" border="0" /></a> <a href='' onclick='document.forms[0].order.value="refup";document.forms[0].submit();return false;'><img src="%(images)s/smallup.gif" alt="up" border="0" /></a> </th> <th class="headerselected">%(first)s <a href='' onclick='document.forms[0].order.value="cddown";document.forms[0].submit();return false;'><img src="%(images)s/smalldown.gif" alt="down" border="0" /></a> <a href='' onclick='document.forms[0].order.value="cdup";document.forms[0].submit();return false;'><img src="%(images)s/smallup.gif" alt="up" border="0" /></a> </th> <th class="headerselected">%(last)s <a href='' onclick='document.forms[0].order.value="mddown";document.forms[0].submit();return false;'><img src="%(images)s/smalldown.gif" alt="down" border="0" /></a> <a href='' onclick='document.forms[0].order.value="mdup";document.forms[0].submit();return false;'><img src="%(images)s/smallup.gif" alt="up" border="0" /></a> </th> </tr> """ % { 'docname' : submission['docname'], 'action' : _("Action"), 'status' : _("Status"), 'id' : _("Subm.No."), 'reference' : _("Reference"), 'images' : CFG_SITE_URL + '/img', 'first' : _("First access"), 'last' : _("Last access"), } if submission['pending']: idtext = """<a href="submit/direct?access=%(id)s&sub=%(action)s%(doctype)s%(ln_link)s">%(id)s</a> <a onclick='if (confirm("%(sure)s")){document.forms[0].deletedId.value="%(id)s";document.forms[0].deletedDoctype.value="%(doctype)s";document.forms[0].deletedAction.value="%(action)s";document.forms[0].submit();return true;}else{return false;}' href=''><img src="%(images)s/smallbin.gif" border="0" alt='%(delete)s' /></a> """ % { 'images' : CFG_SITE_URL + '/img', 'id' : submission['id'], 'action' : submission['act'], 'doctype' : submission['doctype'], 'sure' : _("Are you sure you want to delete this submission?"), 'delete' : _("Delete submission %(x_id)s in %(x_docname)s") % { 'x_id' : str(submission['id']), 'x_docname' : str(submission['docname']) }, 'ln_link': (ln != CFG_SITE_LANG and '&ln=' + ln) or '' } else: idtext = submission['id'] if operator.mod(num,2) == 0: color = "#e2e2e2" else: color = "#f0f0f0" if submission['reference']: reference = submission['reference'] if not submission['pending']: # record was integrated, so propose link: reference = create_html_link('%s/search' % CFG_SITE_URL, { 'ln' : ln, 'p' : submission['reference'], 'f' : 'reportnumber' }, submission['reference']) else: reference = """<font color="red">%s</font>""" % _("Reference not yet given") cdate = str(submission['cdate']).replace(" "," ") mdate= str(submission['mdate']).replace(" "," ") out += """ <tr bgcolor="%(color)s"> <td align="center" class="mycdscell"> %(actname)s </td> <td align="center" class="mycdscell"> %(status)s </td> <td class="mycdscell"> %(idtext)s </td> <td class="mycdscell"> %(reference)s </td> <td class="mycdscell"> %(cdate)s </td> <td class="mycdscell"> %(mdate)s </td> </tr> """ % { 'color' : color, 'actname' : submission['actname'], 'status' : submission['status'], 'idtext' : idtext, 'reference' : reference, 'cdate' : cdate, 'mdate' : mdate, } num += 1 out += "</table></td></tr></table></form>" return out def tmpl_yourapprovals(self, ln, referees): """ Displays the doctypes and categories for which the user is referee Parameters: - 'ln' *string* - The language to display the interface in - 'referees' *array* - All the doctypes for which the user is referee: - 'doctype' *string* - The doctype - 'docname' *string* - The display name of the doctype - 'categories' *array* - The specific categories for which the user is referee: - 'id' *string* - The category id - 'name' *string* - The display name of the category """ # load the right message language _ = gettext_set_language(ln) out = """ <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(refdocs)s</th> </tr> <tr> <td class="portalboxbody">""" % { 'refdocs' : _("Refereed Documents"), } for doctype in referees: out += """<ul><li><b>%(docname)s</b><ul>""" % doctype if doctype ['categories'] is None: out += '''<li><a href="publiline.py?doctype=%(doctype)s%(ln_link)s">%(generalref)s</a></li>''' % { 'docname' : doctype['docname'], 'doctype' : doctype['doctype'], 'generalref' : _("You are a general referee"), 'ln_link': '&ln=' + ln} else: for category in doctype['categories']: out += """<li><a href="publiline.py?doctype=%(doctype)s&categ=%(categ)s%(ln_link)s">%(referee)s</a></li>""" % { 'referee' : _("You are a referee for category:") + ' ' + str(category['name']) + ' (' + str(category['id']) + ')', 'doctype' : doctype['doctype'], 'categ' : category['id'], 'ln_link': '&ln=' + ln} out += "</ul><br /></li></ul>" out += "</td></tr></table>" out += '''<p>To see the status of documents for which approval has been requested, click <a href=\"%(url)s/publiline.py?flow=cplx\">here</a></p>''' % {'url' : CFG_SITE_URL} return out def tmpl_publiline_selectdoctype(self, ln, docs): """ Displays the doctypes that the user can select Parameters: - 'ln' *string* - The language to display the interface in - 'docs' *array* - All the doctypes that the user can select: - 'doctype' *string* - The doctype - 'docname' *string* - The display name of the doctype """ # load the right message language _ = gettext_set_language(ln) out = """ <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(list)s</th> </tr> <tr> <td class="portalboxbody"> %(select)s: </small> <blockquote>""" % { 'list' : _("List of refereed types of documents"), 'select' : _("Select one of the following types of documents to check the documents status"), } for doc in docs: params = {'ln' : ln} params.update(doc) out += '<li><a href="publiline.py?doctype=%(doctype)s&ln=%(ln)s">%(docname)s</a></li><br />' % params out += """</blockquote> </td> </tr> </table> <a href="publiline.py?flow=cplx&ln=%s">%s</a>""" % (ln, _("Go to specific approval workflow")) return out def tmpl_publiline_selectcplxdoctype(self, ln, docs): """ Displays the doctypes that the user can select in a complex workflow Parameters: - 'ln' *string* - The language to display the interface in - 'docs' *array* - All the doctypes that the user can select: - 'doctype' *string* - The doctype - 'docname' *string* - The display name of the doctype """ # load the right message language _ = gettext_set_language(ln) out = """ <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(list)s</th> </tr> <tr> <td class="portalboxbody"> %(select)s: </small> <blockquote>""" % { 'list' : _("List of refereed types of documents"), 'select' : _("Select one of the following types of documents to check the documents status"), } for doc in docs: params = {'ln' : ln} params.update(doc) out += '<li><a href="publiline.py?flow=cplx&doctype=%(doctype)s&ln=%(ln)s">%(docname)s</a></li><br />' % params out += """</blockquote> </td> </tr> </table> </li><br/>""" return out def tmpl_publiline_selectcateg(self, ln, doctype, title, categories): """ Displays the categories from a doctype that the user can select Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The doctype - 'title' *string* - The doctype name - 'categories' *array* - All the categories that the user can select: - 'id' *string* - The id of the category - 'waiting' *int* - The number of documents waiting - 'approved' *int* - The number of approved documents - 'rejected' *int* - The number of rejected documents """ # load the right message language _ = gettext_set_language(ln) out = """ <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(title)s: %(list_categ)s</th> </tr> <tr> <td class="portalboxbody"> %(choose_categ)s <blockquote> <form action="publiline.py" method="get"> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="" /> <input type="hidden" name="ln" value="%(ln)s" /> </form> <table> <tr> <td align="left">""" % { 'title' : title, 'doctype' : doctype, 'list_categ' : _("List of refereed categories"), 'choose_categ' : _("Please choose a category"), 'ln' : ln, } for categ in categories: num = categ['waiting'] + categ['approved'] + categ['rejected'] if categ['waiting'] != 0: classtext = "class=\"blocknote\"" else: classtext = "" out += """<a href="" onclick="document.forms[0].categ.value='%(id)s';document.forms[0].submit();return false;"><small %(classtext)s>%(id)s</small></a><small> (%(num)s document(s)""" % { 'id' : categ['id'], 'classtext' : classtext, 'num' : num, } if categ['waiting'] != 0: out += """| %(waiting)s <img alt="%(pending)s" src="%(images)s/waiting_or.gif" border="0" />""" % { 'waiting' : categ['waiting'], 'pending' : _("Pending"), 'images' : CFG_SITE_URL + '/img', } if categ['approved'] != 0: out += """| %(approved)s<img alt="%(approved_text)s" src="%(images)s/smchk_gr.gif" border="0" />""" % { 'approved' : categ['approved'], 'approved_text' : _("Approved"), 'images' : CFG_SITE_URL + '/img', } if categ['rejected'] != 0: out += """| %(rejected)s<img alt="%(rejected_text)s" src="%(images)s/cross_red.gif" border="0" />""" % { 'rejected' : categ['rejected'], 'rejected_text' : _("Rejected"), 'images' : CFG_SITE_URL + '/img', } out += ")</small><br />" out += """ </td> <td> <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(key)s:</th> </tr> <tr> <td> <img alt="%(pending)s" src="%(images)s/waiting_or.gif" border="0" /> %(waiting)s<br /> <img alt="%(approved)s" src="%(images)s/smchk_gr.gif" border="0" /> %(already_approved)s<br /> <img alt="%(rejected)s" src="%(images)s/cross_red.gif" border="0" /> %(rejected_text)s<br /><br /> <small class="blocknote"> </small> %(somepending)s<br /> </td> </tr> </table> </td> </tr> </table> </blockquote> </td> </tr> </table>""" % { 'key' : _("Key"), 'pending' : _("Pending"), 'images' : CFG_SITE_URL + '/img', 'waiting' : _("Waiting for approval"), 'approved' : _("Approved"), 'already_approved' : _("Already approved"), 'rejected' : _("Rejected"), 'rejected_text' : _("Rejected"), 'somepending' : _("Some documents are pending."), } return out def tmpl_publiline_selectcplxcateg(self, ln, doctype, title, types): """ Displays the categories from a doctype that the user can select Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The doctype - 'title' *string* - The doctype name - 'categories' *array* - All the categories that the user can select: - 'id' *string* - The id of the category - 'waiting' *int* - The number of documents waiting - 'approved' *int* - The number of approved documents - 'rejected' *int* - The number of rejected documents """ # load the right message language _ = gettext_set_language(ln) out = "" #out = """ # <table class="searchbox" width="100%%" summary=""> # <tr> # <th class="portalboxheader">%(title)s: %(list_type)s</th> # </tr> # </table><br /> # <table class="searchbox" width="100%%" summary=""> # <tr>""" % { # 'title' : title, # 'list_type' : _("List of specific approvals"), # } columns = [] columns.append ({'apptype' : 'RRP', 'list_categ' : _("List of refereing categories"), 'id_form' : 0, }) #columns.append ({'apptype' : 'RPB', # 'list_categ' : _("List of publication categories"), # 'id_form' : 1, # }) #columns.append ({'apptype' : 'RDA', # 'list_categ' : _("List of direct approval categories"), # 'id_form' : 2, # }) for column in columns: out += """ <td> <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(list_categ)s</th> </tr> <tr> <td class="portalboxbody"> %(choose_categ)s <blockquote> <form action="publiline.py" method="get"> <input type="hidden" name="flow" value="cplx" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="" /> <input type="hidden" name="apptype" value="%(apptype)s" /> <input type="hidden" name="ln" value="%(ln)s" /> </form> <table> <tr> <td align="left">""" % { 'doctype' : doctype, 'apptype' : column['apptype'], 'list_categ' : column['list_categ'], 'choose_categ' : _("Please choose a category"), 'ln' : ln, } for categ in types[column['apptype']]: num = categ['waiting'] + categ['approved'] + categ['rejected'] + categ['cancelled'] if categ['waiting'] != 0: classtext = "class=\"blocknote\"" else: classtext = "" out += """<table><tr><td width="200px">* <a href="" onclick="document.forms[%(id_form)s].categ.value='%(id)s';document.forms[%(id_form)s].submit();return false;"><small %(classtext)s>%(desc)s</small></td><td width="150px"></a><small> Total document(s) : %(num)s """ % { 'id' : categ['id'], 'id_form' : column['id_form'], 'classtext' : classtext, 'num' : num, 'desc' : categ['desc'], } out += """<td width="100px">""" #if categ['waiting'] != 0: out += """ %(waiting)s   <img alt="%(pending)s" src="%(images)s/waiting_or.gif" border="0" /></td>""" % { 'waiting' : categ['waiting'], 'pending' : _("Pending"), 'images' : CFG_SITE_URL + '/img', } out += """<td width="100px">""" #if categ['approved'] != 0: out += """ %(approved)s   <img alt="%(approved_text)s" src="%(images)s/smchk_gr.gif" border="0" /></td>""" % { 'approved' : categ['approved'], 'approved_text' : _("Approved"), 'images' : CFG_SITE_URL + '/img', } out += """<td width="100px">""" #if categ['rejected'] != 0: out += """ %(rejected)s  <img alt="%(rejected_text)s" src="%(images)s/cross_red.gif" border="0" /></td>""" % { 'rejected' : categ['rejected'], 'rejected_text' : _("Rejected"), 'images' : CFG_SITE_URL + '/img', } out += """<td width="100px">""" #if categ['cancelled'] != 0: out += """ %(cancelled)s  <img alt="%(cancelled_text)s" src="%(images)s/smchk_rd.gif" border="0" /></td>""" % { 'cancelled' : categ['cancelled'], 'cancelled_text' : _("Cancelled"), 'images' : CFG_SITE_URL + '/img', } out += "</small></td></tr>" out += """ </table> </td> </tr> </table> </blockquote> </td> </tr> </table> </td>""" # Key out += """ <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(key)s:</th> </tr> <tr> <td> <img alt="%(pending)s" src="%(images)s/waiting_or.gif" border="0" /> %(waiting)s<br /> <img alt="%(approved)s" src="%(images)s/smchk_gr.gif" border="0" /> %(already_approved)s<br /> <img alt="%(rejected)s" src="%(images)s/cross_red.gif" border="0" /> %(rejected_text)s<br /> <img alt="%(cancelled)s" src="%(images)s/smchk_rd.gif" border="0" /> %(cancelled_text)s<br /><br /> <small class="blocknote"> </small> %(somepending)s<br /> </td> </tr> </table> </blockquote> </td> </tr> </table>""" % { 'key' : _("Key"), 'pending' : _("Pending"), 'images' : CFG_SITE_URL + '/img', 'waiting' : _("Waiting for approval"), 'approved' : _("Approved"), 'already_approved' : _("Already approved"), 'rejected' : _("Rejected"), 'rejected_text' : _("Rejected"), 'cancelled' : _("Cancelled"), 'cancelled_text' : _("Cancelled"), 'somepending' : _("Some documents are pending."), } return out def tmpl_publiline_selectdocument(self, ln, doctype, title, categ, docs): """ Displays the documents that the user can select in the specified category Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The doctype - 'title' *string* - The doctype name - 'categ' *string* - the category - 'docs' *array* - All the categories that the user can select: - 'RN' *string* - The id of the document - 'status' *string* - The status of the document """ # load the right message language _ = gettext_set_language(ln) out = """ <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(title)s - %(categ)s: %(list)s</th> </tr> <tr> <td class="portalboxbody"> %(choose_report)s <blockquote> <form action="publiline.py" method="get"> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="RN" value="" /> <input type="hidden" name="ln" value="%(ln)s"> </form> <table class="searchbox"> <tr> <th class="portalboxheader">%(report_no)s</th> <th class="portalboxheader">%(pending)s</th> <th class="portalboxheader">%(approved)s</th> <th class="portalboxheader">%(rejected)s</th> </tr> """ % { 'doctype' : doctype, 'title' : title, 'categ' : categ, 'list' : _("List of refereed documents"), 'choose_report' : _("Click on a report number for more information."), 'report_no' : _("Report Number"), 'pending' : _("Pending"), 'approved' : _("Approved"), 'rejected' : _("Rejected"), 'ln': ln, } for doc in docs: status = doc ['status'] if status == "waiting": out += """<tr> <td align="center"> <a href="" onclick="document.forms[0].RN.value='%(rn)s';document.forms[0].submit();return false;">%(rn)s</a> </td> <td align="center"> <img alt="check" src="%(images)s/waiting_or.gif" /> </td> <td align="center"> </td> <td align="center"> </td> </tr> """ % { 'rn' : doc['RN'], 'images' : CFG_SITE_URL + '/img', } elif status == "rejected": out += """<tr> <td align="center"> <a href="" onclick="document.forms[0].RN.value='%(rn)s';document.forms[0].submit();return false;">%(rn)s</a> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"><img alt="check" src="%(images)s/cross_red.gif" /></td> </tr> """ % { 'rn' : doc['RN'], 'images' : CFG_SITE_URL + '/img', } elif status == "approved": out += """<tr> <td align="center"> <a href="" onclick="document.forms[0].RN.value='%(rn)s';document.forms[0].submit();return false;">%(rn)s</a> </td> <td align="center"> </td> <td align="center"><img alt="check" src="%(images)s/smchk_gr.gif" /></td> <td align="center"> </td> </tr> """ % { 'rn' : doc['RN'], 'images' : CFG_SITE_URL + '/img', } out += """ </table> </blockquote> </td> </tr> </table>""" return out def tmpl_publiline_selectcplxdocument(self, ln, doctype, title, categ, categname, docs, apptype): """ Displays the documents that the user can select in the specified category Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The doctype - 'title' *string* - The doctype name - 'categ' *string* - the category - 'docs' *array* - All the categories that the user can select: - 'RN' *string* - The id of the document - 'status' *string* - The status of the document - 'apptype' *string* - the approval type """ # load the right message language _ = gettext_set_language(ln) listtype = "" if apptype == "RRP": listtype = _("List of refereed documents") elif apptype == "RPB": listtype = _("List of publication documents") elif apptype == "RDA": listtype = _("List of direct approval documents") out = """ <table class="searchbox" width="100%%" summary=""> <tr> <th class="portalboxheader">%(title)s - %(categname)s: %(list)s</th> </tr> <tr> <td class="portalboxbody"> %(choose_report)s <blockquote> <form action="publiline.py" method="get"> <input type="hidden" name="flow" value="cplx" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="RN" value="" /> <input type="hidden" name="apptype" value="%(apptype)s" /> <input type="hidden" name="ln" value="%(ln)s" /> </form> <table class="searchbox"> <tr> <th class="portalboxheader">%(report_no)s</th> <th class="portalboxheader">%(pending)s</th> <th class="portalboxheader">%(approved)s</th> <th class="portalboxheader">%(rejected)s</th> <th class="portalboxheader">%(cancelled)s</th> </tr> """ % { 'doctype' : doctype, 'title' : title, 'categname' : categname, 'categ' : categ, 'list' : listtype, 'choose_report' : _("Click on a report number for more information."), 'apptype' : apptype, 'report_no' : _("Report Number"), 'pending' : _("Pending"), 'approved' : _("Approved"), 'rejected' : _("Rejected"), 'cancelled' : _("Cancelled"), 'ln': ln, } for doc in docs: status = doc ['status'] if status == "waiting": out += """<tr> <td align="center"> <a href="" onclick="document.forms[0].RN.value='%(rn)s';document.forms[0].submit();return false;">%(rn)s</a> </td> <td align="center"><img alt="check" src="%(images)s/waiting_or.gif" /></td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> </tr> """ % { 'rn' : doc['RN'], 'images' : CFG_SITE_URL + '/img', } elif status == "rejected": out += """<tr> <td align="center"> <a href="" onclick="document.forms[0].RN.value='%(rn)s';document.forms[0].submit();return false;">%(rn)s</a> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"><img alt="check" src="%(images)s/cross_red.gif" /></td> <td align="center"> </td> </tr> """ % { 'rn' : doc['RN'], 'images' : CFG_SITE_URL + '/img', } elif status == "approved": out += """<tr> <td align="center"> <a href="" onclick="document.forms[0].RN.value='%(rn)s';document.forms[0].submit();return false;">%(rn)s</a> </td> <td align="center"> </td> <td align="center"><img alt="check" src="%(images)s/smchk_gr.gif" /></td> <td align="center"> </td> <td align="center"> </td> </tr> """ % { 'rn' : doc['RN'], 'images' : CFG_SITE_URL + '/img', } elif status == "cancelled": out += """<tr> <td align="center"> <a href="" onclick="document.forms[0].RN.value='%(rn)s';document.forms[0].submit();return false;">%(rn)s</a> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"><img alt="check" src="%(images)s/smchk_rd.gif" /></td> </tr> """ % { 'rn' : doc['RN'], 'images' : CFG_SITE_URL + '/img', } out += """ </table> </blockquote> </td> </tr> </table>""" return out def tmpl_publiline_displaydoc(self, ln, doctype, docname, categ, rn, status, dFirstReq, dLastReq, dAction, access, confirm_send, auth_code, auth_message, authors, title, sysno, newrn, note): """ Displays the categories from a doctype that the user can select Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The doctype - 'docname' *string* - The doctype name - 'categ' *string* - the category - 'rn' *string* - The document RN (id number) - 'status' *string* - The status of the document - 'dFirstReq' *string* - The date of the first approval request - 'dLastReq' *string* - The date of the last approval request - 'dAction' *string* - The date of the last action (approval or rejection) - 'confirm_send' *bool* - must display a confirmation message about sending approval email - 'auth_code' *bool* - authorised to referee this document - 'auth_message' *string* - ??? - 'authors' *string* - the authors of the submission - 'title' *string* - the title of the submission - 'sysno' *string* - the unique database id for the record - 'newrn' *string* - the record number assigned to the submission - 'note' *string* - Note about the approval request. """ # load the right message language _ = gettext_set_language(ln) if status == "waiting": image = """<img src="%s/waiting_or.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "approved": image = """<img src="%s/smchk_gr.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "rejected": image = """<img src="%s/iconcross.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') else: image = "" out = """ <table class="searchbox" summary=""> <tr> <th class="portalboxheader">%(image)s %(rn)s</th> </tr> <tr> <td class="portalboxbody">""" % { 'image' : image, 'rn' : rn, } if confirm_send: out += """<i><strong class="headline">%(requestsent)s</strong></i><br /><br />""" % { 'requestsent' : _("Your request has been sent to the referee."), } out += """<form action="publiline.py"> <input type="hidden" name="RN" value="%(rn)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="ln" value="%(ln)s" /> <small>""" % { 'rn' : rn, 'categ' : categ, 'doctype' : doctype, 'ln' : ln, } if title != "unknown": out += """<strong class="headline">%(title_text)s</strong>%(title)s<br /><br />""" % { 'title_text' : _("Title:"), 'title' : title, } if authors != "": out += """<strong class="headline">%(author_text)s</strong>%(authors)s<br /><br />""" % { 'author_text' : _("Author:"), 'authors' : authors, } if sysno != "": out += """<strong class="headline">%(more)s</strong> <a href="%(siteurl)s/record/%(sysno)s?ln=%(ln)s">%(click)s</a> <br /><br /> """ % { 'more' : _("More information:"), 'click' : _("Click here"), 'siteurl' : CFG_SITE_URL, 'sysno' : sysno, 'ln' : ln, } if note and auth_code == 0: out += """<table><tr><td valign="top"><strong class="headline">%(note_text)s</strong></td><td><em>%(note)s</em></td></tr></table>""" % { 'note_text' : _("Approval note:"), 'note' : cgi.escape(note).replace('\n', '<br />'), } if status == "waiting": out += _("This document is still %(x_fmt_open)swaiting for approval%(x_fmt_close)s.") % {'x_fmt_open': '<strong class="headline">', 'x_fmt_close': '</strong>'} out += "<br /><br />" out += _("It was first sent for approval on:") + ' <strong class="headline">' + str(dFirstReq) + '</strong><br />' if dLastReq == "0000-00-00 00:00:00": out += _("Last approval email was sent on:") + ' <strong class="headline">' + str(dFirstReq) + '</strong><br />' else: out += _("Last approval email was sent on:") + ' <strong class="headline">' + str(dLastReq) + '</strong><br />' out += "<br />" + _("You can send an approval request email again by clicking the following button:") + " <br />" +\ """<input class="adminbutton" type="submit" name="send" value="%(send)s" onclick="return confirm('%(warning)s')" />""" % { 'send' : _("Send Again"), 'warning' : _("WARNING! Upon confirmation, an email will be sent to the referee.") } if auth_code == 0: out += "<br />" + _("As a referee for this document, you may click this button to approve or reject it") + ":<br />" +\ """<input class="adminbutton" type="submit" name="approval" value="%(approve)s" onclick="window.location='approve.py?%(access)s&ln=%(ln)s';return false;" />""" % { 'approve' : _("Approve/Reject"), 'access' : access, 'ln' : ln } if status == "approved": out += _("This document has been %(x_fmt_open)sapproved%(x_fmt_close)s.") % {'x_fmt_open': '<strong class="headline">', 'x_fmt_close': '</strong>'} out += '<br />' + _("Its approved reference is:") + ' <strong class="headline">' + str(newrn) + '</strong><br /><br />' out += _("It was first sent for approval on:") + ' <strong class="headline">' + str(dFirstReq) + '</strong><br />' if dLastReq == "0000-00-00 00:00:00": out += _("Last approval email was sent on:") + ' <strong class="headline">' + str(dFirstReq) + '</strong><br />' else: out += _("Last approval email was sent on:") + ' <strong class="headline">' + str(dLastReq) + '</strong><br />' +\ _("It was approved on:") + ' <strong class="headline">' + str(dAction) + '</strong><br />' if status == "rejected": out += _("This document has been %(x_fmt_open)srejected%(x_fmt_close)s.") % {'x_fmt_open': '<strong class="headline">', 'x_fmt_close': '</strong>'} out += "<br /><br />" out += _("It was first sent for approval on:") + ' <strong class="headline">' + str(dFirstReq) +'</strong><br />' if dLastReq == "0000-00-00 00:00:00": out += _("Last approval email was sent on:") + ' <strong class="headline">' + str(dFirstReq) + '</strong><br />' else: out += _("Last approval email was sent on:") + ' <strong class="headline">' + str(dLastReq) +'</strong><br />' out += _("It was rejected on:") + ' <strong class="headline">' + str(dAction) + '</strong><br />' out += """ </small></form> <br /> </td> </tr> </table>""" return out def tmpl_publiline_displaycplxdoc(self, ln, doctype, docname, categ, rn, apptype, status, dates, isPubCom, isEdBoard, isReferee, isProjectLeader, isAuthor, authors, title, sysno, newrn): # load the right message language _ = gettext_set_language(ln) if status == "waiting": image = """<img src="%s/waiting_or.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "approved": image = """<img src="%s/smchk_gr.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "rejected": image = """<img src="%s/iconcross.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "cancelled": image = """<img src="%s/smchk_rd.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') else: image = "" out = """ <table class="searchbox" summary=""> <tr> <th class="portalboxheader">%(image)s %(rn)s</th> </tr> <tr> <td class="portalboxbody">""" % { 'image' : image, 'rn' : rn, } out += """<form action="publiline.py"> <input type="hidden" name="flow" value="cplx" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="RN" value="%(rn)s" /> <input type="hidden" name="apptype" value="%(apptype)s" /> <input type="hidden" name="action" value="" /> <input type="hidden" name="ln" value="%(ln)s" /> <small>""" % { 'rn' : rn, 'categ' : categ, 'doctype' : doctype, 'apptype' : apptype, 'ln': ln, } out += "<table><tr height='30px'><td width='120px'>" if title != "unknown": out += """<strong class="headline">%(title_text)s</strong></td><td>%(title)s</td></tr>""" % { 'title_text' : _("Title:"), 'title' : title, } out += "<tr height='30px'><td width='120px'>" if authors != "": out += """<strong class="headline">%(author_text)s</strong></td><td>%(authors)s</td></tr>""" % { 'author_text' : _("Author:"), 'authors' : authors, } out += "<tr height='30px'><td width='120px'>" if sysno != "": out += """<strong class="headline">%(more)s</strong> </td><td><a href="%(siteurl)s/record/%(sysno)s?ln=%(ln)s">%(click)s</a> </td></tr> """ % { 'more' : _("More information:"), 'click' : _("Click here"), 'siteurl' : CFG_SITE_URL, 'sysno' : sysno, 'ln' : ln, } out += "</table>" out += "<br /><br />" if apptype == "RRP": out += "<table><tr><td width='400px'>" out += _("It has first been asked for refereing process on the ") + "</td><td>" + ' <strong class="headline">' + str(dates['dFirstReq']) + '</strong><br /></td></tr>' out += "<tr><td width='400px'>" out += _("Last request e-mail was sent to the publication committee chair on the ") + "</td><td>" + ' <strong class="headline">' + str(dates['dLastReq']) + '</strong><br /></td></tr>' if dates['dRefereeSel'] != None: out += "<tr><td width='400px'>" out += _("A referee has been selected by the publication committee on the ") + "</td><td>" + ' <strong class="headline">' + str(dates['dRefereeSel']) + '</strong><br /></td></tr>' else: out += "<tr><td width='400px'>" out += _("No referee has been selected yet.") + "</td><td>" if (status != "cancelled") and (isPubCom == 0): out += displaycplxdoc_displayauthaction (action="RefereeSel", linkText=_("Select a referee")) out += '<br /></td></tr>' if dates['dRefereeRecom'] != None: out += "<tr><td width='400px'>" out += _("The referee has sent his final recommendations to the publication committee on the ") + "</td><td>" + ' <strong class="headline">' + str(dates['dRefereeRecom']) + '</strong><br /></td></tr>' else: out += "<tr><td width='400px'>" out += _("No recommendation from the referee yet.") + "</td><td>" if (status != "cancelled") and (dates['dRefereeSel'] != None) and (isReferee == 0): out += displaycplxdoc_displayauthaction (action="RefereeRecom", linkText=_("Send a recommendation")) out += '<br /></td></tr>' if dates['dPubComRecom'] != None: out += "<tr><td width='400px'>" out += _("The publication committee has sent his final recommendations to the project leader on the ") + "</td><td>" + ' <strong class="headline">' + str(dates['dPubComRecom']) + '</strong><br /></td></tr>' else: out += "<tr><td width='400px'>" out += _("No recommendation from the publication committee yet.") + "</td><td>" if (status != "cancelled") and (dates['dRefereeRecom'] != None) and (isPubCom == 0): out += displaycplxdoc_displayauthaction (action="PubComRecom", linkText=_("Send a recommendation")) out += '<br /></td></tr>' if status == "cancelled": out += "<tr><td width='400px'>" out += _("It has been cancelled by the author on the ") + "</td><td>" + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br /></td></tr>' elif dates['dProjectLeaderAction'] != None: if status == "approved": out += "<tr><td width='400px'>" out += _("It has been approved by the project leader on the ") + "</td><td>" + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br /></td></tr>' elif status == "rejected": out += "<tr><td width='400px'>" out += _("It has been rejected by the project leader on the ") + "</td><td>" + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br /></td></tr>' else: out += "<tr><td width='400px'>" out += _("No final decision taken yet.") + "</td><td>" if (dates['dPubComRecom'] != None) and (isProjectLeader == 0): out += displaycplxdoc_displayauthaction (action="ProjectLeaderDecision", linkText=_("Take a decision")) if isAuthor == 0: out += displaycplxdoc_displayauthaction (action="AuthorCancel", linkText=_("Cancel")) out += '<br /></table>' elif apptype == "RPB": out += _("It has first been asked for refereing process on the ") + ' <strong class="headline">' + str(dates['dFirstReq']) + '</strong><br />' out += _("Last request e-mail was sent to the publication committee chair on the ") + ' <strong class="headline">' + str(dates['dLastReq']) + '</strong><br />' if dates['dEdBoardSel'] != None: out += _("An editorial board has been selected by the publication committee on the ") + ' <strong class="headline">' + str(dates['dEdBoardSel']) + '</strong>' if (status != "cancelled") and (isEdBoard == 0): out += displaycplxdoc_displayauthaction (action="AddAuthorList", linkText=_("Add an author list")) out += '<br />' else: out += _("No editorial board has been selected yet.") if (status != "cancelled") and (isPubCom == 0): out += displaycplxdoc_displayauthaction (action="EdBoardSel", linkText=_("Select an editorial board")) out += '<br />' if dates['dRefereeSel'] != None: out += _("A referee has been selected by the editorial board on the ") + ' <strong class="headline">' + str(dates['dRefereeSel']) + '</strong><br />' else: out += _("No referee has been selected yet.") if (status != "cancelled") and (dates['dEdBoardSel'] != None) and (isEdBoard == 0): out += displaycplxdoc_displayauthaction (action="RefereeSel", linkText=_("Select a referee")) out += '<br />' if dates['dRefereeRecom'] != None: out += _("The referee has sent his final recommendations to the editorial board on the ") + ' <strong class="headline">' + str(dates['dRefereeRecom']) + '</strong><br />' else: out += _("No recommendation from the referee yet.") if (status != "cancelled") and (dates['dRefereeSel'] != None) and (isReferee == 0): out += displaycplxdoc_displayauthaction (action="RefereeRecom", linkText=_("Send a recommendation")) out += '<br />' if dates['dEdBoardRecom'] != None: out += _("The editorial board has sent his final recommendations to the publication committee on the ") + ' <strong class="headline">' + str(dates['dRefereeRecom']) + '</strong><br />' else: out += _("No recommendation from the editorial board yet.") if (status != "cancelled") and (dates['dRefereeRecom'] != None) and (isEdBoard == 0): out += displaycplxdoc_displayauthaction (action="EdBoardRecom", linkText=_("Send a recommendation")) out += '<br />' if dates['dPubComRecom'] != None: out += _("The publication committee has sent his final recommendations to the project leader on the ") + ' <strong class="headline">' + str(dates['dPubComRecom']) + '</strong><br />' else: out += _("No recommendation from the publication committee yet.") if (status != "cancelled") and (dates['dEdBoardRecom'] != None) and (isPubCom == 0): out += displaycplxdoc_displayauthaction (action="PubComRecom", linkText=_("Send a recommendation")) out += '<br />' if status == "cancelled": out += _("It has been cancelled by the author on the ") + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br />' elif dates['dProjectLeaderAction'] != None: if status == "approved": out += _("It has been approved by the project leader on the ") + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br />' elif status == "rejected": out += _("It has been rejected by the project leader on the ") + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br />' else: out += _("No final decision taken yet.") if (dates['dPubComRecom'] != None) and (isProjectLeader == 0): out += displaycplxdoc_displayauthaction (action="ProjectLeaderDecision", linkText=_("Take a decision")) if isAuthor == 0: out += displaycplxdoc_displayauthaction (action="AuthorCancel", linkText=_("Cancel")) out += '<br />' elif apptype == "RDA": out += _("It has first been asked for refereing process on the ") + ' <strong class="headline">' + str(dates['dFirstReq']) + '</strong><br />' out += _("Last request e-mail was sent to the project leader on the ") + ' <strong class="headline">' + str(dates['dLastReq']) + '</strong><br />' if status == "cancelled": out += _("It has been cancelled by the author on the ") + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br />' elif dates['dProjectLeaderAction'] != None: if status == "approved": out += _("It has been approved by the project leader on the ") + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br />' elif status == "rejected": out += _("It has been rejected by the project leader on the ") + ' <strong class="headline">' + str(dates['dProjectLeaderAction']) + '</strong><br />' else: out += _("No final decision taken yet.") if isProjectLeader == 0: out += displaycplxdoc_displayauthaction (action="ProjectLeaderDecision", linkText=_("Take a decision")) if isAuthor == 0: out += displaycplxdoc_displayauthaction (action="AuthorCancel", linkText=_("Cancel")) out += '<br />' out += """ </small></form> <br /> </td> </tr> </table>""" return out def tmpl_publiline_displaycplxdocitem(self, doctype, categ, rn, apptype, action, comments, (user_can_view_comments, user_can_add_comment, user_can_delete_comment), selected_category, selected_topic, selected_group_id, comment_subject, comment_body, ln): _ = gettext_set_language(ln) if comments and user_can_view_comments: comments_text = '' comments_overview = '<ul>' for comment in comments: (cmt_uid, cmt_nickname, cmt_title, cmt_body, cmt_date, cmt_priority, cmtid) = comment comments_overview += '<li><a href="#%s">%s - %s</a> (%s)</li>' % (cmtid, cmt_nickname, cmt_title, convert_datetext_to_dategui (cmt_date)) comments_text += """ <table class="bskbasket"> <thead class="bskbasketheader"> <tr><td class="bsktitle"><a name="%s"></a>%s - %s (%s)</td><td><a href=%s/publiline.py?flow=cplx&doctype=%s&apptype=%s&categ=%s&RN=%s&reply=true&commentId=%s&ln=%s#add_comment>Reply</a></td><td><a href="#top">Top</a></td></tr> </thead> <tbody> <tr><td colspan="2">%s</td></tr> </tbody> </table>""" % (cmtid, cmt_nickname, cmt_title, convert_datetext_to_dategui (cmt_date), CFG_SITE_URL, doctype, apptype, categ, rn, cmt_uid, ln, email_quoted_txt2html(cmt_body)) comments_overview += '</ul>' else: comments_text = '' comments_overview = 'None.' body = '' if user_can_view_comments: body += """<h4>%(comments_label)s</h4>""" if user_can_view_comments: body += """%(comments)s""" if user_can_add_comment: validation = """ <input type="hidden" name="validate" value="go" /> <input type="submit" class="formbutton" value="%(button_label)s" />""" % {'button_label': _("Add Comment")} body += self.tmpl_publiline_displaywritecomment (doctype, categ, rn, apptype, action, _("Add Comment"), comment_subject, validation, comment_body, ln) body %= { 'comments_label': _("Comments"), 'action': action, 'button_label': _("Write a comment"), 'comments': comments_text} content = '<br />' out = """ <table class="bskbasket"> <thead class="bskbasketheader"> <tr> <td class="bsktitle"> <a name="top"></a> <h4>%(comments_overview_label)s</h4> %(comments_overview)s </td> <td class="bskcmtcol"></td> </tr> </thead> <tbody> <tr> <td colspan="2" style="padding: 5px;"> %(body)s </td> </tr> </tbody> </table>""" % { 'comments_overview_label' : _('Comments overview'), 'comments_overview' : comments_overview, 'body' : body,} return out def tmpl_publiline_displaywritecomment(self, doctype, categ, rn, apptype, action, write_label, title, validation, reply_message, ln): _ = gettext_set_language(ln) return """ <div style="width:100%%%%"> <hr /> <h2>%(write_label)s</h2> <form action="publiline.py"> <input type="hidden" name="flow" value="cplx" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="RN" value="%(rn)s" /> <input type="hidden" name="apptype" value="%(apptype)s" /> <input type="hidden" name="action" value="%(action)s" /> <input type="hidden" name="ln" value="%(ln)s" /> <p class="bsklabel">%(title_label)s:</p> <a name="add_comment"></a> <input type="text" name="msg_subject" size="80" value="%(title)s"/> <p class="bsklabel">%(comment_label)s:</p> <textarea name="msg_body" rows="20" cols="80">%(reply_message)s</textarea><br /> %(validation)s </form> </div>""" % {'write_label': write_label, 'title_label': _("Title"), 'title': title, 'comment_label': _("Comment"), 'rn' : rn, 'categ' : categ, 'doctype' : doctype, 'apptype' : apptype, 'action' : action, 'validation' : validation, 'reply_message' : reply_message, 'ln' : ln, } def tmpl_publiline_displaydocplxaction(self, ln, doctype, categ, rn, apptype, action, status, authors, title, sysno, subtitle1, email_user_pattern, stopon1, users, extrausers, stopon2, subtitle2, usersremove, stopon3, validate_btn): # load the right message language _ = gettext_set_language(ln) if status == "waiting": image = """<img src="%s/waiting_or.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "approved": image = """<img src="%s/smchk_gr.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "rejected": image = """<img src="%s/iconcross.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') else: image = "" out = """ <table class="searchbox" summary=""> <tr> <th class="portalboxheader">%(image)s %(rn)s</th> </tr> <tr> <td class="portalboxbody"> <small>""" % { 'image' : image, 'rn' : rn, } if title != "unknown": out += """<strong class="headline">%(title_text)s</strong>%(title)s<br /><br />""" % { 'title_text' : _("Title:"), 'title' : title, } if authors != "": out += """<strong class="headline">%(author_text)s</strong>%(authors)s<br /><br />""" % { 'author_text' : _("Author:"), 'authors' : authors, } if sysno != "": out += """<strong class="headline">%(more)s</strong> <a href="%(siteurl)s/record/%(sysno)s?ln=%(ln)s">%(click)s</a> <br /><br /> """ % { 'more' : _("More information:"), 'click' : _("Click here"), 'siteurl' : CFG_SITE_URL, 'sysno' : sysno, 'ln' : ln, } out += """ </small> <br /> </td> </tr> </table>""" if ((apptype == "RRP") or (apptype == "RPB")) and ((action == "EdBoardSel") or (action == "RefereeSel")): out += """ <table class="searchbox" summary=""> <tr> <th class="portalboxheader">%(subtitle)s</th> </tr> <tr> <td class="portalboxbody">""" % { 'subtitle' : subtitle1, } out += """<form action="publiline.py"> <input type="hidden" name="flow" value="cplx" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="RN" value="%(rn)s" /> <input type="hidden" name="apptype" value="%(apptype)s" /> <input type="hidden" name="action" value="%(action)s" /> <input type="hidden" name="ln" value="%(ln)s" />""" % { 'rn' : rn, 'categ' : categ, 'doctype' : doctype, 'apptype' : apptype, 'action' : action, 'ln': ln, } out += ' <span class="adminlabel">1. %s </span>\n' % _("search for user") out += ' <input class="admin_wvar" type="text" name="email_user_pattern" value="%s" />\n' % (email_user_pattern, ) out += ' <input class="adminbutton" type="submit" value="%s"/>\n' % (_("search for users"), ) if (stopon1 == "") and (email_user_pattern != ""): out += ' <br /><span class="adminlabel">2. %s </span>\n' % _("select user") out += ' <select name="id_user" class="admin_w200">\n' out += ' <option value="0">*** %s ***</option>\n' % _("select user") for elem in users: elem_id = elem[0] email = elem[1] out += ' <option value="%s">%s</option>\n' % (elem_id, email) for elem in extrausers: elem_id = elem[0] email = elem[1] out += ' <option value="%s">%s %s</option>\n' % (elem_id, email, _("connected")) out += ' </select>\n' out += ' <input class="adminbutton" type="submit" value="%s" />\n' % (_("add this user"), ) out += stopon2 elif stopon1 != "": out += stopon1 out += """ </form> <br /> </td> </tr> </table>""" if action == "EdBoardSel": out += """ <table class="searchbox" summary=""> <tr> <th class="portalboxheader">%(subtitle)s</th> </tr> <tr> <td class="portalboxbody">""" % { 'subtitle' : subtitle2, } out += """<form action="publiline.py"> <input type="hidden" name="flow" value="cplx" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="RN" value="%(rn)s" /> <input type="hidden" name="apptype" value="%(apptype)s" /> <input type="hidden" name="action" value="%(action)s" /> <input type="hidden" name="ln" value="%(ln)s" />""" % { 'rn' : rn, 'categ' : categ, 'doctype' : doctype, 'apptype' : apptype, 'action' : action, 'ln': ln, } out += ' <span class="adminlabel">1. %s </span>\n' % _("select user") out += ' <select name="id_user_remove" class="admin_w200">\n' out += ' <option value="0">*** %s ***</option>\n' % _("select user") for elem in usersremove: elem_id = elem[0] email = elem[1] out += ' <option value="%s">%s</option>\n' % (elem_id, email) out += ' </select>\n' out += ' <input class="adminbutton" type="submit" value="%s" />\n' % (_("remove this user"), ) out += stopon3 out += """ </form> <br /> </td> </tr> </table>""" if validate_btn != "": out += """<form action="publiline.py"> <input type="hidden" name="flow" value="cplx" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="RN" value="%(rn)s" /> <input type="hidden" name="apptype" value="%(apptype)s" /> <input type="hidden" name="action" value="%(action)s" /> <input type="hidden" name="validate" value="go" /> <input type="hidden" name="ln" value="%(ln)s" /> <input class="adminbutton" type="submit" value="%(validate_btn)s" /> </form>""" % { 'rn' : rn, 'categ' : categ, 'doctype' : doctype, 'apptype' : apptype, 'action' : action, 'validate_btn' : validate_btn, 'ln': ln, } return out def tmpl_publiline_displaycplxrecom(self, ln, doctype, categ, rn, apptype, action, status, authors, title, sysno, msg_to, msg_to_group, msg_subject): # load the right message language _ = gettext_set_language(ln) if status == "waiting": image = """<img src="%s/waiting_or.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "approved": image = """<img src="%s/smchk_gr.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') elif status == "rejected": image = """<img src="%s/iconcross.gif" alt="" align="right" />""" % (CFG_SITE_URL + '/img') else: image = "" out = """ <table class="searchbox" summary=""> <tr> <th class="portalboxheader">%(image)s %(rn)s</th> </tr> <tr> <td class="portalboxbody"> <small>""" % { 'image' : image, 'rn' : rn, } if title != "unknown": out += """<strong class="headline">%(title_text)s</strong>%(title)s<br /><br />""" % { 'title_text' : _("Title:"), 'title' : title, } if authors != "": out += """<strong class="headline">%(author_text)s</strong>%(authors)s<br /><br />""" % { 'author_text' : _("Author:"), 'authors' : authors, } if sysno != "": out += """<strong class="headline">%(more)s</strong> <a href="%(siteurl)s/record/%(sysno)s?ln=%(ln)s">%(click)s</a> <br /><br /> """ % { 'more' : _("More information:"), 'click' : _("Click here"), 'siteurl' : CFG_SITE_URL, 'sysno' : sysno, 'ln' : ln, } out += """ </small> <br /> </td> </tr> </table>""" # escape forbidden character msg_to = escape_html(msg_to) msg_to_group = escape_html(msg_to_group) msg_subject = escape_html(msg_subject) write_box = """ <form action="publiline.py" method="post"> <input type="hidden" name="flow" value="cplx" /> <input type="hidden" name="doctype" value="%(doctype)s" /> <input type="hidden" name="categ" value="%(categ)s" /> <input type="hidden" name="RN" value="%(rn)s" /> <input type="hidden" name="apptype" value="%(apptype)s" /> <input type="hidden" name="action" value="%(action)s" /> <input type="hidden" name="ln" value="%(ln)s" /> <div style="float: left; vertical-align:text-top; margin-right: 10px;"> <table class="mailbox"> <thead class="mailboxheader"> <tr> <td class="inboxheader" colspan="2"> <table class="messageheader"> <tr> <td class="mailboxlabel">%(to_label)s</td>""" if msg_to != "": addr_box = """ <td class="mailboxlabel">%(users_label)s</td> <td style="width:100%%%%;" class="mailboxlabel">%(to_users)s</td>""" % {'users_label': _("User"), 'to_users' : msg_to, } if msg_to_group != "": addr_box += """ </tr> <tr> <td class="mailboxlabel"> </td> <td class="mailboxlabel">%(groups_label)s</td> <td style="width:100%%%%;" class="mailboxlabel">%(to_groups)s</td>""" % {'groups_label': _("Group"), 'to_groups': msg_to_group, } elif msg_to_group != "": addr_box = """ <td class="mailboxlabel">%(groups_label)s</td> <td style="width:100%%%%;" class="mailboxlabel">%(to_groups)s</td>""" % {'groups_label': _("Group"), 'to_groups': msg_to_group, } else: addr_box = """ <td class="mailboxlabel"> </td> <td class="mailboxlabel"> </td>""" write_box += addr_box write_box += """ </tr> <tr> <td class="mailboxlabel"> </td> <td> </td> <td> </td> </tr> <tr> <td class="mailboxlabel">%(subject_label)s</td> <td colspan="2"> <input class="mailboxinput" type="text" name="msg_subject" value="%(subject)s" /> </td> </tr> </table> </td> </tr> </thead> <tfoot> <tr> <td style="height:0px" colspan="2"></td> </tr> </tfoot> <tbody class="mailboxbody"> <tr> <td class="mailboxlabel">%(message_label)s</td> <td> <textarea name="msg_body" rows="10" cols="50"></textarea> </td> </tr> <tr class="mailboxfooter"> <td> <select name="validate"> <option> %(select)s</option> <option value="approve">%(approve)s</option> <option value="reject">%(reject)s</option> </select> </td> <td colspan="2" class="mailboxfoot"> <input type="submit" name="send_button" value="%(send_label)s" class="formbutton"/> </td> </tr> </tbody> </table> </div> </form> """ write_box = write_box % {'rn' : rn, 'categ' : categ, 'doctype' : doctype, 'apptype' : apptype, 'action' : action, 'subject' : msg_subject, 'to_label': _("To:"), 'subject_label': _("Subject:"), 'message_label': _("Message:"), 'send_label': _("SEND"), 'select' : _("Select:"), 'approve' : _("approve"), 'reject' : _("reject"), 'ln': ln, } out += write_box return out def displaycplxdoc_displayauthaction(action, linkText): return """ <strong class="headline">(<a href="" onclick="document.forms[0].action.value='%(action)s';document.forms[0].submit();return false;">%(linkText)s</a>)</strong>""" % { "action" : action, "linkText" : linkText }