From 03cbd9ba8c5b03eb0985084e325ab51bb0f16d62 Mon Sep 17 00:00:00 2001 From: "Mark M. Florida" <markflorida@wustl.edu> Date: Fri, 12 Feb 2016 16:08:59 -0600 Subject: [PATCH] Mostly whitespace and formatting cleanup for templates used on the project page. --- .../screens/project/project_bundle_tabs.vm | 38 ++-- .../screens/project/project_summary_tabs.vm | 144 ++++++------ .../project/widgets/project_actions_box.vm | 108 +++++---- .../widgets/project_summary_details.vm | 16 +- .../widgets/project_summary_history.vm | 30 +-- .../widgets/project_summary_management.vm | 74 ++++--- .../widgets/project_summary_pipeline.vm | 44 ++-- .../widgets/project_summary_publications.vm | 143 ++++++------ .../project/widgets/project_summary_status.vm | 31 +-- .../report/manage_tab/notifs.vm | 147 +++++++------ .../xnat_projectData_actions_box.vm | 43 ++-- .../xnat_projectData_bundle_tabs.vm | 58 ++--- .../xnat_projectData_summary_details.vm | 117 +++++----- .../xnat_projectData_summary_history.vm | 30 +-- .../xnat_projectData_summary_management.vm | 190 +++++++++------- .../xnat_projectData_summary_pipeline.vm | 208 +++++++++--------- .../xnat_projectData_summary_publications.vm | 143 ++++++------ .../xnat_projectData_summary_status.vm | 21 +- .../xnat_projectData_summary_tabs.vm | 183 +++++++-------- 19 files changed, 941 insertions(+), 827 deletions(-) diff --git a/src/main/webapp/xnat-templates/screens/project/project_bundle_tabs.vm b/src/main/webapp/xnat-templates/screens/project/project_bundle_tabs.vm index 94209160..44a0b6e4 100644 --- a/src/main/webapp/xnat-templates/screens/project/project_bundle_tabs.vm +++ b/src/main/webapp/xnat-templates/screens/project/project_bundle_tabs.vm @@ -1,26 +1,26 @@ <DIV ID="paginator"></DIV> <BR> <div ID="tab_module"> - <DIV id="search_tabs"></DIV> + <DIV id="search_tabs"></DIV> </div> - #set($bundles = $project.getBundles()) +#set($bundles = $project.getBundles()) <script language="javascript"> -var stored_searches=new Array(); - #foreach($bundle in $bundles) -stored_searches.push({ID:"$!bundle.getId()",DESC:"$!bundle.getBriefDescription()"}); - #end + var stored_searches = new Array(); + #foreach($bundle in $bundles) + stored_searches.push({ ID: "$!bundle.getId()", DESC: "$!bundle.getBriefDescription()" }); + #end - var url = "$content.getURI("servlet/AjaxServlet")"; -url = url + ""; - - var currentTime = new Date(); -var pageID = currentTime.getTime() + '_'; - -function TabManagerInit(){ - window.tab_manager.init(stored_searches); - window.tab_manager.load({DESC:"$displayManager.getPluralDisplayNameForSubject()"}); - } - - YAHOO.util.Event.onDOMReady(TabManagerInit); - </script> + var url = "$content.getURI("servlet/AjaxServlet")"; + url = url + ""; + + var currentTime = new Date(); + var pageID = currentTime.getTime() + '_'; + + function TabManagerInit(){ + window.tab_manager.init(stored_searches); + window.tab_manager.load({ DESC: "$displayManager.getPluralDisplayNameForSubject()" }); + } + + YAHOO.util.Event.onDOMReady(TabManagerInit); +</script> <script type="text/javascript" src="$content.getURI("scripts/search/tabManager.js")"></script> \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/project/project_summary_tabs.vm b/src/main/webapp/xnat-templates/screens/project/project_summary_tabs.vm index b1b76b7a..b2e270fd 100644 --- a/src/main/webapp/xnat-templates/screens/project/project_summary_tabs.vm +++ b/src/main/webapp/xnat-templates/screens/project/project_summary_tabs.vm @@ -1,89 +1,83 @@ <!--BEGIN PROJECT SUMMARY TABS --> -<STYLE> -span.spacer{ -height:12px; -width:1px; -} -</STYLE> <div ID="project_summary_module" style="display:none"> - <DIV id="projectSummary" class="yui-navset"> - <ul class="yui-nav" style=""> - <li class="selected"><a href="#tab1"><em>Details<span class="spacer"></span></em></a></li> - <li><a href="#tab7"><em>Publications<span class="spacer"></span></em></a></li> -#if($data.getSession().getAttribute("userHelper").canCreate($project)) - <li><a href="#tab3"><em>Manage Access<span class="spacer"></span></em></a></li> - <li><a href="#tab4"><em>Manage Pipelines<span class="spacer"></span></em></a></li> -#end - <li><a href="#tab5"><em>Status<span class="spacer"></span></em></a></li> + <DIV id="projectSummary" class="yui-navset"> + <ul class="yui-nav" style=""> + <li class="selected"><a href="#tab1"><em>Details</em></a></li> + <li><a href="#tab7"><em>Publications</em></a></li> + #if($data.getSession().getAttribute("userHelper").canCreate($project)) + <li><a href="#tab3"><em>Manage Access</em></a></li> + <li><a href="#tab4"><em>Manage Pipelines</em></a></li> + #end + <li><a href="#tab5"><em>Status</em></a></li> - <li><a href="#tab6"><em>History<span class="spacer"></span></em></a></li> - </ul> - <div class="yui-content"> - <div id="tab1"><p> - <!-- BEGIN DETAILS TAB --> -#parse("/screens/project/widgets/project_summary_details.vm") - <!-- END DETAILS TAB --> -</p></div> - - <div id="tab7"><p> - <!-- BEGIN PUBLICATIONS TAB --> -#parse("/screens/project/widgets/project_summary_publications.vm") - <!-- END PUBLICATIONS TAB --> -</p></div> + <li><a href="#tab6"><em>History</em></a></li> + </ul> + <div class="yui-content"> + <div id="tab1"><p> + <!-- BEGIN DETAILS TAB --> + #parse("/screens/project/widgets/project_summary_details.vm") + <!-- END DETAILS TAB --> + </p></div> + <div id="tab7"><p> + <!-- BEGIN PUBLICATIONS TAB --> + #parse("/screens/project/widgets/project_summary_publications.vm") + <!-- END PUBLICATIONS TAB --> + </p></div> -#if($data.getSession().getAttribute("userHelper").canCreate($project)) -<div id="tab3"><p> - <!-- BEGIN MANAGEMENT TAB --> -#parse("/screens/project/widgets/project_summary_management.vm") - <!-- END MANAGEMENT TAB --> -</p></div> -#end -#if($data.getSession().getAttribute("userHelper").canCreate($project)) -<div id="tab4"><p> - <!-- BEGIN PIPELINE TAB --> -#parse("/screens/project/widgets/project_summary_pipeline.vm") - <!-- END PIPELINE TAB --> -</p></div> -#end + #if($data.getSession().getAttribute("userHelper").canCreate($project)) + <div id="tab3"><p> + <!-- BEGIN MANAGEMENT TAB --> + #parse("/screens/project/widgets/project_summary_management.vm") + <!-- END MANAGEMENT TAB --> + </p></div> + #end + #if($data.getSession().getAttribute("userHelper").canCreate($project)) + <div id="tab4"><p> + <!-- BEGIN PIPELINE TAB --> + #parse("/screens/project/widgets/project_summary_pipeline.vm") + <!-- END PIPELINE TAB --> + </p></div> + #end -<div id="tab5"><p> - <!-- BEGIN STATUS TAB --> -#parse("/screens/project/widgets/project_summary_status.vm") - <!-- END STATUS TAB --> -</p></div> -<div id="tab6"><p> - <!-- BEGIN HISTORY TAB --> -#parse("/screens/project/widgets/project_summary_history.vm") - <!-- END HISTORY TAB --> -</p></div> + <div id="tab5"><p> + <!-- BEGIN STATUS TAB --> + #parse("/screens/project/widgets/project_summary_status.vm") + <!-- END STATUS TAB --> + </p></div> + <div id="tab6"><p> + <!-- BEGIN HISTORY TAB --> + #parse("/screens/project/widgets/project_summary_history.vm") + <!-- END HISTORY TAB --> + </p></div> - </div> - </DIV> + + </div> + </DIV> </div> -<script type="text/javascript"> -function SummaryTabManagerInit(){ - var tabView = new YAHOO.widget.TabView('projectSummary'); - //var headerMenuBar = new YAHOO.widget.Menu("headerMenuBar", {}); - //headerMenuBar.render(); - var oButton1= new YAHOO.widget.Button("button1"); - var oButton2= new YAHOO.widget.Button("button2"); - #if($data.getSession().getAttribute("userHelper").canDelete($project)) - var oButton3= new YAHOO.widget.Button("button3"); - #end - #if($data.getSession().getAttribute("userHelper").canCreate($project)) - var oButton4= new YAHOO.widget.Button("button4"); - var oButton5= new YAHOO.widget.Button("button5"); - #end - - window.project_summary_module = new YAHOO.widget.Module("project_summary_module",{visible:false}); - window.project_summary_module.show(); - } - - YAHOO.util.Event.onDOMReady(SummaryTabManagerInit); +<script type="text/javascript"> + function SummaryTabManagerInit(){ + var tabView = new YAHOO.widget.TabView('projectSummary'); + //var headerMenuBar = new YAHOO.widget.Menu("headerMenuBar", {}); + //headerMenuBar.render(); + var oButton1 = new YAHOO.widget.Button("button1"); + var oButton2 = new YAHOO.widget.Button("button2"); + #if($data.getSession().getAttribute("userHelper").canDelete($project)) + var oButton3 = new YAHOO.widget.Button("button3"); + #end + #if($data.getSession().getAttribute("userHelper").canCreate($project)) + var oButton4 = new YAHOO.widget.Button("button4"); + var oButton5 = new YAHOO.widget.Button("button5"); + #end + + window.project_summary_module = new YAHOO.widget.Module("project_summary_module", { visible: false }); + window.project_summary_module.show(); + } + + YAHOO.util.Event.onDOMReady(SummaryTabManagerInit); </script> <!--END PROJECT SUMMARY TABS --> \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/project/widgets/project_actions_box.vm b/src/main/webapp/xnat-templates/screens/project/widgets/project_actions_box.vm index 88dccc50..f87c61c0 100644 --- a/src/main/webapp/xnat-templates/screens/project/widgets/project_actions_box.vm +++ b/src/main/webapp/xnat-templates/screens/project/widgets/project_actions_box.vm @@ -1,51 +1,63 @@ - - <!-- actions menu --> - <DIV id="actionsMenu" class="yuimenu"> - <DIV class="bd"> - <ul class="first-of-type"> - <li class="yuimenuitem"> - <a class="yuimenuitemlabel">Actions</A> - </li> - </ul> - <ul> -#if($data.getSession().getAttribute("user").canEdit("xnat:subjectData/project",$project.getId())) - <li class="yuimenuitem"> - <a class="yuimenuitemlabel" href="#insertbox">Add</a> - <DIV ID="insertbox" class="yuimenu"> - <DIV class="bd"> - <ul class="first-of-type"> - #foreach($protocol in $project.getStudyprotocol()) - <li class="yuimenuitem"> - <a class="yuimenuitemlabel" href="$link.setPage("XDATScreen_edit_${protocol.getDatatypeSchemaElement().getSQLName()}.vm").addPathInfo('project',$project.getId())">$protocol.getDatatypeSchemaElement().getSingularDescription()</A> - </li> - #end - </ul> - </DIV> - </DIV> - </li> - <li class="yuimenuitem"> - <a class="yuimenuitemlabel" href="$link.setAction("XDATActionRouter").addPathInfo('xdataction','LaunchUploadApplet').addPathInfo('project',$project.getId())">Upload Images</A> - </li> - <li class="yuimenuitem"> - <a class="yuimenuitemlabel" href="$link.setAction("XDATActionRouter").addPathInfo('xdataction','prearchives').addPathInfo('project',$project.getId())">View Prearchive</A> - </li> -#end - </ul> - <ul> - <li class="yuimenuitem"> - <a class="yuimenuitemlabel" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","xml_file").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Download XML</A> - </li> - <li class="yuimenuitem"> - <a class="yuimenuitemlabel" href="$link.setAction("ProjectDownloadAction").addPathInfo('project',$project.getId())">Download Images</A> - </li> - </ul> - </DIV> +<!-- actions menu --> +<DIV id="actionsMenu" class="yuimenu"> + <DIV class="bd"> + <ul class="first-of-type"> + <li class="yuimenuitem"> + <a class="yuimenuitemlabel">Actions</a> + </li> + </ul> + <ul> + #if($data.getSession().getAttribute("user").canEdit("xnat:subjectData/project",$project.getId())) + <li class="yuimenuitem"> + <a class="yuimenuitemlabel" href="#insertbox">Add</a> + <DIV ID="insertbox" class="yuimenu"> + <DIV class="bd"> + <ul class="first-of-type"> + #foreach($protocol in $project.getStudyprotocol()) + <li class="yuimenuitem"> + <a class="yuimenuitemlabel" href="$link.setPage( + "XDATScreen_edit_${protocol.getDatatypeSchemaElement().getSQLName()}.vm").addPathInfo( + 'project',$project.getId())">$protocol.getDatatypeSchemaElement().getSingularDescription()</a> + </li> + #end + </ul> + </DIV> + </DIV> + </li> + <li class="yuimenuitem"> + <a class="yuimenuitemlabel" href="$link.setAction("XDATActionRouter").addPathInfo( + 'xdataction','LaunchUploadApplet').addPathInfo('project',$project.getId())">Upload Images</a> + </li> + <li class="yuimenuitem"> + <a class="yuimenuitemlabel" href="$link.setAction("XDATActionRouter").addPathInfo( + 'xdataction','prearchives').addPathInfo('project',$project.getId())">View Prearchive</a> + </li> + #end + </ul> + <ul> + <li class="yuimenuitem"> + <a class="yuimenuitemlabel" href="$link.setAction("XDATActionRouter").addPathInfo( + "xdataction","xml_file").addPathInfo("search_element","xnat:projectData").addPathInfo( + "search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo( + "popup","$!popup")">Download XML</a> + </li> + <li class="yuimenuitem"> + <a class="yuimenuitemlabel" href="$link.setAction("ProjectDownloadAction").addPathInfo( + 'project',$project.getId())">Download Images</a> + </li> + </ul> </DIV> +</DIV> <SCRIPT language="javascript"> -YAHOO.util.Event.onContentReady("actionsMenu", function () { - var actionsMenu = new YAHOO.widget.Menu("actionsMenu", { autosubmenudisplay: true,scrollincrement:5,position:"static",maxheight:130}); - // Render the MenuBar instance - actionsMenu.getItem(0).cfg.setProperty("disabled",true); - actionsMenu.render(); -}); + YAHOO.util.Event.onContentReady("actionsMenu", function(){ + var actionsMenu = new YAHOO.widget.Menu("actionsMenu", { + autosubmenudisplay: true, + scrollincrement: 5, + position: "static", + maxheight: 130 + }); + // Render the MenuBar instance + actionsMenu.getItem(0).cfg.setProperty("disabled", true); + actionsMenu.render(); + }); </SCRIPT> \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_details.vm b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_details.vm index 47627836..91ca9910 100644 --- a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_details.vm +++ b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_details.vm @@ -1,7 +1,11 @@ <DIV style="white-space:normal;">$!item.getStringProperty("xnat:projectData/description")</DIV> - #if($data.getSession().getAttribute("userHelper").canCreate($project)) - <BR><A ID="button1" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","edit").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Edit Details</A> - #if($data.getSession().getAttribute("userHelper").canDelete($project)) - <A ID="button3" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","delete").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Delete</A> - #end - #end \ No newline at end of file +#if($data.getSession().getAttribute("userHelper").canCreate($project)) +<BR><A ID="button1" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","edit").addPathInfo( + "search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo( + "search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Edit Details</A> + #if($data.getSession().getAttribute("userHelper").canDelete($project)) + <A ID="button3" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","delete").addPathInfo( + "search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo( + "search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Delete</A> + #end +#end \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_history.vm b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_history.vm index 0bec38ef..e3958871 100644 --- a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_history.vm +++ b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_history.vm @@ -1,18 +1,18 @@ #if($workflows.size()>0) -#foreach( $workflow in $workflows ) - <DIV class="containerItem" title="$!workflow.getStatus()" -#if($workflow.getStatus()=="Complete") -style="color:black;white-space:nowrap;"> -#elseif($workflow.getStatus()=="Error") -style="color:red;white-space:nowrap;"> -#else -style="color:green;white-space:nowrap;"> -#end -$turbineUtils.formatDate($!workflow.getLaunchTime()): $!workflow.getOnlyPipelineName() -#if($workflow.getStatus()!="Complete") - $!workflow.getPercentagecomplete() -#end - </DIV > + #foreach( $workflow in $workflows ) + <DIV class="containerItem" title="$!workflow.getStatus()" + #if($workflow.getStatus()=="Complete") + style="color:black;white-space:nowrap;"> + #elseif($workflow.getStatus()=="Error") + style="color:red;white-space:nowrap;"> + #else + style="color:green;white-space:nowrap;"> + #end + $turbineUtils.formatDate($!workflow.getLaunchTime()): $!workflow.getOnlyPipelineName() + #if($workflow.getStatus()!="Complete") + $!workflow.getPercentagecomplete() + #end + </DIV> -#end + #end #end \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_management.vm b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_management.vm index 6398f325..a4822a96 100644 --- a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_management.vm +++ b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_management.vm @@ -1,38 +1,44 @@ <script type="text/javascript" src="$content.getURI("scripts/project/userMgmt.js")"></script> - - <table class="mgmt_container"> - <tr> - <td valign="top"> - <div id="user_mgmt_div"></div> - </td> - <td valign="top"> - <div id="user_invite_div"> -<TABLE> - <TR> - <TD COLSPAN="3"><h3 style="margin-bottom:0px">Invite User</h3> - Enter the email address of the user to add.</TD> - </TR> - <TR> - <TD COLSPAN="3" NOWRAP><INPUT type="text" name="email" ID="invite_email" style="margin-bottom:3px"/> - <BR><select name="access_level" id="access_level" style="margin-bottom:3px"><option value="collaborator">Collaborator</option><option value="member">Member</option><option value="owner">Owner</option></select> - <BR><input type="button" value="Add User" name="eventSubmit_doPerform" ID="invite_user_button" ONCLICK="window.userManager.inviteUser(this);"/> - </TD> - </TR> -</TABLE> - </div> - </td> - </tr> - <tr> - <td colspan="2"> -<DIV class="containerItem">Sharing: $project.getPublicAccessibility()</DIV> - </td> - </tr> - </table> + +<table class="mgmt_container"> + <tr> + <td valign="top"> + <div id="user_mgmt_div"></div> + </td> + <td valign="top"> + <div id="user_invite_div"> + <TABLE> + <TR> + <TD COLSPAN="3"><h3 style="margin-bottom:0px">Invite User</h3> + Enter the email address of the user to add. + </TD> + </TR> + <TR> + <TD COLSPAN="3" NOWRAP> + <INPUT type="text" name="email" ID="invite_email" style="margin-bottom:3px"/> + <BR><select name="access_level" id="access_level" style="margin-bottom:3px"> + <option value="collaborator">Collaborator</option> + <option value="member">Member</option> + <option value="owner">Owner</option> + </select> + <BR><input type="button" value="Add User" name="eventSubmit_doPerform" ID="invite_user_button" ONCLICK="window.userManager.inviteUser(this);"/> + </TD> + </TR> + </TABLE> + </div> + </td> + </tr> + <tr> + <td colspan="2"> + <DIV class="containerItem">Sharing: $project.getPublicAccessibility()</DIV> + </td> + </tr> +</table> <script language="javascript"> -function userManagerInit(){ - window.userManager = new UserManager("user_mgmt_div","$project.getId()"); -} - YAHOO.util.Event.onDOMReady(userManagerInit); - + function userManagerInit(){ + window.userManager = new UserManager("user_mgmt_div", "$project.getId()"); + } + YAHOO.util.Event.onDOMReady(userManagerInit); + </script> \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_pipeline.vm b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_pipeline.vm index 9852a997..cf5cfd2b 100644 --- a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_pipeline.vm +++ b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_pipeline.vm @@ -1,34 +1,34 @@ -<script src="$content.getURI("scripts/yui/build/json/json-min.js")"></script> -<script type="text/javascript" src="$content.getURI("scripts/yui/build/datasource/datasource-beta-min.js")"></script> -<script type="text/javascript" src="$content.getURI("scripts/yui/build/datatable/datatable-beta-min.js")"></script> - +<script src="$content.getURI("scripts/yui/build/json/json-min.js")"></script> +<script type="text/javascript" src="$content.getURI("scripts/yui/build/datasource/datasource-beta-min.js")"></script> +<script type="text/javascript" src="$content.getURI("scripts/yui/build/datatable/datatable-beta-min.js")"></script> + <script type="text/javascript" src="$content.getURI("scripts/project/pipelineMgmt.js")"></script> - <table class="mgmt_container"> - <tr> - <td valign="top"> - <div id="pipeline_mgmt_div"></div> - </td> - </tr> - <tr> - <td valign="top"> - <div id="more_pipelines"> - <input type="button" id="add" name="add" value="Add Pipelines" onclick="window.pipelineManager.loadAdditionalPipelines()"> - </div> - </td> - </tr> +<table class="mgmt_container"> + <tr> + <td valign="top"> + <div id="pipeline_mgmt_div"></div> + </td> + </tr> + <tr> + <td valign="top"> + <div id="more_pipelines"> + <input type="button" id="add" name="add" value="Add Pipelines" onclick="window.pipelineManager.loadAdditionalPipelines()"> + </div> + </td> + </tr> </table> <script language="javascript"> -function pipelineManagerInit(){ - window.pipelineManager = new PipelineManager("pipeline_mgmt_div","$project.getId()"); -} -YAHOO.util.Event.onDOMReady(pipelineManagerInit); - + function pipelineManagerInit(){ + window.pipelineManager = new PipelineManager("pipeline_mgmt_div", "$project.getId()"); + } + YAHOO.util.Event.onDOMReady(pipelineManagerInit); + </script> diff --git a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_publications.vm b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_publications.vm index 77aa8ca1..32436b8b 100644 --- a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_publications.vm +++ b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_publications.vm @@ -1,76 +1,85 @@ - Publications: #if($project.getPublications_publication().size() > 0) - #set($primarys = $project.getPublicationsByType("PRIMARY")) - #set($refs = $project.getPublicationsByType("REFERENCE")) - #set($facts = $project.getPublicationsByType("FACT SHEET")) -#if($primarys.size()>0) - <DIV class="containerItem"><table> - #foreach($res in $primarys) - <tr> - <td>#if($res.getUri()) <A HREF="$res.getUri()">#end - #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end - #if($res.getUri())</A> #end - #if($res.getPubmed()) <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end - #if($res.getDoi()) DOI: $res.getDoi() #end - #if($res.getMedline()) MEDLINE: $res.getMedline() #end - #if($res.getOther()) OTHER: $res.getOther() #end - </td> - </tr> - #end - </table> - </DIV> - #end + #set($primarys = $project.getPublicationsByType("PRIMARY")) + #set($refs = $project.getPublicationsByType("REFERENCE")) + #set($facts = $project.getPublicationsByType("FACT SHEET")) + #if($primarys.size()>0) + <DIV class="containerItem"> + <table> + #foreach($res in $primarys) + <tr> + <td>#if($res.getUri()) <A HREF="$res.getUri()">#end + #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end + #if($res.getUri())</A> #end + #if($res.getPubmed()) + <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end + #if($res.getDoi()) DOI: $res.getDoi() #end + #if($res.getMedline()) MEDLINE: $res.getMedline() #end + #if($res.getOther()) OTHER: $res.getOther() #end + </td> + </tr> + #end + </table> + </DIV> + #end -#if($refs.size()>0) - <DIV class="containerItem"><table> - #foreach($res in $refs) - <tr> - <td>#if($res.getUri()) <A HREF="$res.getUri()">#end - #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end - #if($res.getUri())</A> #end - #if($res.getPubmed()) <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end - #if($res.getDoi()) DOI: $res.getDoi() #end - #if($res.getMedline()) MEDLINE: $res.getMedline() #end - #if($res.getOther()) OTHER: $res.getOther() #end - </td> - </tr> - #end - </table> - </DIV> -#end + #if($refs.size()>0) + <DIV class="containerItem"> + <table> + #foreach($res in $refs) + <tr> + <td>#if($res.getUri()) <A HREF="$res.getUri()">#end + #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end + #if($res.getUri())</A> #end + #if($res.getPubmed()) + <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end + #if($res.getDoi()) DOI: $res.getDoi() #end + #if($res.getMedline()) MEDLINE: $res.getMedline() #end + #if($res.getOther()) OTHER: $res.getOther() #end + </td> + </tr> + #end + </table> + </DIV> + #end -#if($facts.size()>0) - <DIV class="containerItem"><table> - #foreach($res in $facts) - <tr> - <td>#if($res.getUri()) <A HREF="$res.getUri()">#end - #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end - #if($res.getUri())</A> #end - #if($res.getPubmed()) <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end - #if($res.getDoi()) DOI: $res.getDoi() #end - #if($res.getMedline()) MEDLINE: $res.getMedline() #end - #if($res.getOther()) OTHER: $res.getOther() #end - </td> - </tr> - #end - </table> - </DIV> - #end + #if($facts.size()>0) + <DIV class="containerItem"> + <table> + #foreach($res in $facts) + <tr> + <td>#if($res.getUri()) <A HREF="$res.getUri()">#end + #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end + #if($res.getUri())</A> #end + #if($res.getPubmed()) + <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end + #if($res.getDoi()) DOI: $res.getDoi() #end + #if($res.getMedline()) MEDLINE: $res.getMedline() #end + #if($res.getOther()) OTHER: $res.getOther() #end + </td> + </tr> + #end + </table> + </DIV> + #end - #else - None - #end - #set($resources=$project.getResources_resource()) - #if($resources.size()>0) - #foreach($resource in $resources) - #if($resource.getUri()) -<DIV class="containerItem"><A title="$!resource.getDescription()" href="$resource.getUri()">Download $!resource.getLabel()</A></DIV> - #end +#else +None +#end +#set($resources=$project.getResources_resource()) +#if($resources.size()>0) + #foreach($resource in $resources) + #if($resource.getUri()) + <DIV class="containerItem"> + <A title="$!resource.getDescription()" href="$resource.getUri()">Download $!resource.getLabel()</A></DIV> + #end - #end + #end - #end +#end #if($data.getSession().getAttribute("userHelper").canCreate($project)) - <BR/><BR/><A ID="button2" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","publications").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Edit Publications</A> +<BR/><BR/><A ID="button2" href="$link.setAction("XDATActionRouter").addPathInfo( + "xdataction","publications").addPathInfo("search_element","xnat:projectData").addPathInfo( + "search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo( + "popup","$!popup")">Edit Publications</A> #end \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_status.vm b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_status.vm index f612003c..e0dc1fd1 100644 --- a/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_status.vm +++ b/src/main/webapp/xnat-templates/screens/project/widgets/project_summary_status.vm @@ -1,22 +1,23 @@ - #set($exptCounts = $project.getExperimentCountByXSIType()) #set($others = 0) #if ($project.getProtocolByDataType("xnat:subjectData").getName()) - <DIV class="containerItem">$!subject_count $project.getProtocolByDataType("xnat:subjectData").getName()</DIV> +<DIV class="containerItem">$!subject_count $project.getProtocolByDataType("xnat:subjectData").getName()</DIV> #else - <DIV class="containerItem">$!subject_count xnat:subjectData</DIV> +<DIV class="containerItem">$!subject_count xnat:subjectData</DIV> +#end +#foreach($key in $exptCounts.keySet()) + #if ($project.getProtocolByDataType($key).getName()) + <DIV class="containerItem">$exptCounts.get($key) $!project.getProtocolByDataType($key).getName()</DIV> + #else + #set($other=$other + $exptCounts.get($key)) + #end #end - #foreach($key in $exptCounts.keySet()) -#if ($project.getProtocolByDataType($key).getName()) - <DIV class="containerItem">$exptCounts.get($key) $!project.getProtocolByDataType($key).getName()</DIV> -#else -#set($other=$other + $exptCounts.get($key)) -#end - #end #if($other == 0) - <DIV class="containerItem" style="color:grey">$other Other Experiments</DIV> - #end - #if($data.getSession().getAttribute("userHelper").canCreate($project)) - <BR><A ID="button5" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","protocols").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Manage Custom Variables</A> - #end \ No newline at end of file +<DIV class="containerItem" style="color:grey">$other Other Experiments</DIV> +#end +#if($data.getSession().getAttribute("userHelper").canCreate($project)) +<BR><A ID="button5" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","protocols").addPathInfo( + "search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo( + "search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Manage Custom Variables</A> +#end \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/report/manage_tab/notifs.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/report/manage_tab/notifs.vm index da0641c6..b0760182 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/report/manage_tab/notifs.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/report/manage_tab/notifs.vm @@ -2,75 +2,90 @@ ##Developer: Tim Olsen tim@radiologics.com <h3>Notifications Configuration</h3> <div> -<table id="notif_script_table"> - <tr> - <td colspan="2" class="highlighted" id="notif_script_container"> -## <DIV style="font-weight:700;">Notifications Configuration</DIV> - <TABLE> - <TR><TD></TD><TD>Emails should be comma separated (i.e. tim@somewhere.com,jenny@somewhere.com).</TD></TR> - <TR><TD></TD><TD><input type="text" name="notif_list" id="notif_list" SIZE="100"/></TD></TR> - <TR><TD COLSPAN="2"><input type="button" id="notif_script_save" value="Save" onclick="XNAT.app.notifUpdate();" /></TD></TR> - </TABLE> - </td> - </tr> -</table> -<script> - XNAT.app.notifUpdate=function(){ - this.notifs=YUIDOM.get("notif_list").value; - if(this.notifs.indexOf("'")>-1 || this.notifs.indexOf("\"")>-1){ - xModalMessage('Email Notification', 'Notification emails cannot contain quotes.'); - return false; - } - openModalPanel('notifs','Saving Emails'); - if (this.notifs) { - YAHOO.util.Connect.asyncRequest('PUT',serverRoot+"/data/projects/$project.getId()/resources/notifications/files/archival.lst?inbody=true&overwrite=true&content=NOTIFY_ARCHIVAL&XNAT_CSRF=" + window.csrfToken, - { - success : function() + <table id="notif_script_table"> + <tr> + <td colspan="2" class="highlighted" id="notif_script_container"> + ## <DIV style="font-weight:700;">Notifications Configuration</DIV> + <TABLE> + <TR> + <TD></TD> + <TD>Emails should be comma separated (i.e. tim@somewhere.com,jenny@somewhere.com).</TD> + </TR> + <TR> + <TD></TD> + <TD><input type="text" name="notif_list" id="notif_list" SIZE="100"/></TD> + </TR> + <TR> + <TD COLSPAN="2"> + <input type="button" id="notif_script_save" value="Save" onclick="XNAT.app.notifUpdate();"/> + </TD> + </TR> + </TABLE> + </td> + </tr> + </table> + <script> + XNAT.app.notifUpdate = function(){ + this.notifs = YUIDOM.get("notif_list").value; + if (this.notifs.indexOf("'") > -1 || this.notifs.indexOf("\"") > -1) { + xModalMessage('Email Notification', 'Notification emails cannot contain quotes.'); + return false; + } + openModalPanel('notifs', 'Saving Emails'); + if (this.notifs) { + YAHOO.util.Connect.asyncRequest('PUT', serverRoot + "/data/projects/$project.getId()/resources/notifications/files/archival.lst?inbody=true&overwrite=true&content=NOTIFY_ARCHIVAL&XNAT_CSRF=" + window.csrfToken, { - closeModalPanel('notifs'); - xModalMessage('Email Notification', 'Emails updated.'); - }, - failure: function(o){ - closeModalPanel('notifs'); - var options = {}; - var message = "Failed to store emails.<br><br>"; - var reasons = ""; - if(o.responseText){ ## Fixes XNAT-2989 - reasons = o.responseText.match(/\<h3\>(.*[\n\r])+\<\/h3\>/g); - if(reasons && reasons[0]){ - reasons = reasons[0].replace(/\<\/?h3\>/g,"").replace(/[\n\r]/g,"<br>"); - options = {width: 500, height: 400}; - }else{ - reasons = ""; + success: function(){ + closeModalPanel('notifs'); + xModalMessage('Email Notification', 'Emails updated.'); + }, + failure: function(o){ + closeModalPanel('notifs'); + var options = {}; + var message = "Failed to store emails.<br><br>"; + var reasons = ""; + if (o.responseText) { ## Fixes XNAT-2989 + reasons = o.responseText.match(/\<h3\>(.*[\n\r])+\<\/h3\>/g); + if (reasons && reasons[0]) { + reasons = reasons[0].replace(/\<\/?h3\>/g, "").replace(/[\n\r]/g, "<br>"); + options = { width: 500, height: 400 }; + } + else { + reasons = ""; + } } - } - xModalMessage('Email Error', message + reasons, "OK", options); + xModalMessage('Email Error', message + reasons, "OK", options); + }, + cache: false, // Turn off caching for IE + scope: this }, - cache:false, // Turn off caching for IE - scope: this - }, - this.notifs); - } else { - YAHOO.util.Connect.asyncRequest('DELETE',serverRoot+"/data/projects/$project.getId()/resources/notifications/files/archival.lst?content=NOTIFY_ARCHIVAL&XNAT_CSRF=" + window.csrfToken, - { - success : function() + this.notifs); + } + else { + YAHOO.util.Connect.asyncRequest('DELETE', serverRoot + "/data/projects/$project.getId()/resources/notifications/files/archival.lst?content=NOTIFY_ARCHIVAL&XNAT_CSRF=" + window.csrfToken, { - closeModalPanel('notifs'); - xModalMessage('Email Notification', 'Emails updated.'); - }, - failure: function(){ - closeModalPanel('notifs'); - xModalMessage('Email Error', 'Failed to store emails'); - }, - cache:false, // Turn off caching for IE - scope: this - }); + success: function(){ + closeModalPanel('notifs'); + xModalMessage('Email Notification', 'Emails updated.'); + }, + failure: function(){ + closeModalPanel('notifs'); + xModalMessage('Email Error', 'Failed to store emails'); + }, + cache: false, // Turn off caching for IE + scope: this + }); + } + } + XNAT.app.notifsLoad = function(obj){ + YUIDOM.get("notif_list").value = obj.responseText; } - } - XNAT.app.notifsLoad=function(obj){ - YUIDOM.get("notif_list").value = obj.responseText; - } - - YAHOO.util.Connect.asyncRequest('GET', serverRoot+'/data/projects/$project.getId()/resources/notifications/files/archival.lst', {success : XNAT.app.notifsLoad, failure : function(){}, cache : false, scope : this}); -</script> + + YAHOO.util.Connect.asyncRequest('GET', serverRoot + '/data/projects/$project.getId()/resources/notifications/files/archival.lst', { + success: XNAT.app.notifsLoad, + failure: function(){}, + cache: false, + scope: this + }); + </script> </div> \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_actions_box.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_actions_box.vm index 7e079bcc..ae62bd05 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_actions_box.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_actions_box.vm @@ -1,26 +1,31 @@ #set($exptCounts = $project.getExperimentCountByXSIType()) #hasCustomScreens("xnat:projectData" "actionsBox") #if ($hasCustomScreens) - <!-- actions menu --> - <DIV id="actionsMenu" class="yuimenu"> - <DIV class="bd"> - <ul class="first-of-type"> - <li class="yuimenuitem"> +<!-- actions menu --> +<DIV id="actionsMenu" class="yuimenu"> +<DIV class="bd"> + <ul class="first-of-type"> + <li class="yuimenuitem"> <a class="yuimenuitemlabel">Actions</a> - </li> - </ul> - <ul> - - #addCustomScreens("xnat:projectData" "actionsBox") + </li> + </ul> +<ul> + + #addCustomScreens("xnat:projectData" "actionsBox") #end - </ul> - </DIV> - </DIV> +</ul> +</DIV> +</DIV> <SCRIPT> -YAHOO.util.Event.onContentReady("actionsMenu", function () { - var actionsMenu = new YAHOO.widget.Menu("actionsMenu", { autosubmenudisplay: true,scrollincrement:5,position:"static",maxheight:150}); - // Render the MenuBar instance - actionsMenu.getItem(0).cfg.setProperty("disabled",true); - actionsMenu.render(); -}); + YAHOO.util.Event.onContentReady("actionsMenu", function(){ + var actionsMenu = new YAHOO.widget.Menu("actionsMenu", { + autosubmenudisplay: true, + scrollincrement: 5, + position: "static", + maxheight: 150 + }); + // Render the MenuBar instance + actionsMenu.getItem(0).cfg.setProperty("disabled", true); + actionsMenu.render(); + }); </SCRIPT> diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_bundle_tabs.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_bundle_tabs.vm index aa05c45d..568292b2 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_bundle_tabs.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_bundle_tabs.vm @@ -12,13 +12,18 @@ </div> <script type="text/javascript"> - var stored_searches=new Array(); + var stored_searches = new Array(); #set($default_search="") #foreach($bundle in $bundles) - stored_searches.push({ID:"$!bundle.getId()",label:"$!bundle.getBriefDescription()",URL:serverRoot +"/REST/projects/${project.getId()}/searches/$!bundle.getId()"}); + stored_searches.push({ + ID: "$!bundle.getId()", + label: "$!bundle.getBriefDescription()", + URL: serverRoot + "/REST/projects/${project.getId()}/searches/$!bundle.getId()" + }); #if($bundle.getId().equals("@xnat:subjectData")) #set($default_search="$!bundle.getId()") - #elseif(($bundle.getId().contains("xnat:subjectData") || $bundle.getId().contains("xnat_subjectData")) && $default_search.equals("")) + #elseif(($bundle.getId().contains("xnat:subjectData") || $bundle.getId().contains( + "xnat_subjectData")) && $default_search.equals("")) #set($default_search="$!bundle.getId()") #end #end @@ -32,8 +37,8 @@ function openTabsChange(obj){ YAHOO.util.Cookie.remove("${project.getId()}.open_bundle.tabs"); - var bundles=this.loaded.toString(); - YAHOO.util.Cookie.set("${project.getId()}.open_bundle.tabs",bundles, { expires: new Date("January 12, 2025") }); + var bundles = this.loaded.toString(); + YAHOO.util.Cookie.set("${project.getId()}.open_bundle.tabs", bundles, { expires: new Date("January 12, 2025") }); //alert(bundles + ":" +YAHOO.util.Cookie.get("${project.getId()}.open_bundle.tabs")); //wrangleTabs({ // wrapper: '#search_tabs', // selector for element where tabs will be rendered by YUI - use 'body' to hit all tab sets @@ -45,9 +50,9 @@ function TabManagerInit(){ - var tab_module=new YAHOO.widget.Module("tab_module",{visible:true}); + var tab_module = new YAHOO.widget.Module("tab_module", { visible: true }); - window.tab_manager=new TabManager(); + window.tab_manager = new TabManager(); window.tab_manager.setCsrfToken("$!XNAT_CSRF"); @@ -55,54 +60,55 @@ #parse($turbineUtils.getTemplateName("_bundle_default","xnat:projectData",$project.getId())) - var bundles=YAHOO.util.Cookie.get("${project.getId()}.open_bundle.tabs"); - if(bundles!== null && bundles.length > 0){ - var open_tab_array=bundles.split(','); - for(var open_tab_counter=0;open_tab_counter<open_tab_array.length;open_tab_counter++){ + var bundles = YAHOO.util.Cookie.get("${project.getId()}.open_bundle.tabs"); + if (bundles !== null && bundles.length > 0) { + var open_tab_array = bundles.split(','); + for (var open_tab_counter = 0; open_tab_counter < open_tab_array.length; open_tab_counter++) { var open_tab = open_tab_array[open_tab_counter]; - window.tab_manager.load({ID:open_tab}); + window.tab_manager.load({ ID: open_tab }); } - } else if ('$default_search') { - window.tab_manager.load({ID: '$default_search'}); + } + else if ('$default_search') { + window.tab_manager.load({ ID: '$default_search' }); } - var bundleTabIndex=YAHOO.util.Cookie.get("${project.getId()}.open_bundle.index"); - if(bundleTabIndex!=null){ + var bundleTabIndex = YAHOO.util.Cookie.get("${project.getId()}.open_bundle.index"); + if (bundleTabIndex != null) { window.tab_manager.setActiveTab(parseInt(bundleTabIndex)); //window.tab_manager.tabView.set('activeIndex',parseInt(bundleTabIndex)); } - window.tab_manager.onOpenTabsChange.subscribe(bundleTabChange,this); - window.tab_manager.onOpenTabsChange.subscribe(openTabsChange,window.tab_manager); + window.tab_manager.onOpenTabsChange.subscribe(bundleTabChange, this); + window.tab_manager.onOpenTabsChange.subscribe(openTabsChange, window.tab_manager); //console.debug('TabManagerInit()'); } function debug_out(msg){ - var div=document.getElementById("mylogger"); - if(div!=undefined && div!=null){ - div.innerHTML+=msg + "<br/>"; + var div = document.getElementById("mylogger"); + if (div != undefined && div != null) { + div.innerHTML += msg + "<br/>"; } } YAHOO.util.Event.onDOMReady(TabManagerInit); function bundleTabChange(obj){ - var activeIndex=this.get("activeIndex"); - YAHOO.util.Cookie.set("${project.getId()}.open_bundle.index",activeIndex); + var activeIndex = this.get("activeIndex"); + YAHOO.util.Cookie.set("${project.getId()}.open_bundle.index", activeIndex); } function addBundleMonitor(){ - window.tab_manager.tabView.subscribe("activeTabChange",bundleTabChange); + window.tab_manager.tabView.subscribe("activeTabChange", bundleTabChange); } YAHOO.util.Event.onDOMReady(addBundleMonitor); jq(window).load(function(){ // if the 'phantom'/'disabled' tab is there, wrangle the tabs - if (!jq('#search_tabs').find('li').not('.disabled').length){ - wrangleTabs('#search_tabs',true); + if (!jq('#search_tabs').find('li').not('.disabled').length) { + wrangleTabs('#search_tabs', true); } }); diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_details.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_details.vm index adfc63cb..caccbb40 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_details.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_details.vm @@ -1,57 +1,66 @@ <table> - <tr> - <th align="left">ID:</th> - <td>$!item.getStringProperty("xnat:projectData/ID") -#if($item.getChildItems("aliases/alias").size()>0) - Aka: - #foreach($alias in $item.getChildItems("aliases/alias")) - $alias.getProperty("alias") - #end -#end - </td> - </tr> -#if($item.getProperty("xnat:projectData/description")) - <tr> - <th align="left" valign="top">Description:</th> - <td> - #if($!item.getStringProperty("xnat:projectData/description").length()>300) - <div style="height:100;overflow:auto">$!item.getStringProperty("xnat:projectData/description")</div> - #else - $!item.getStringProperty("xnat:projectData/description") - #end - </td> - </tr> -#end -#if($item.getProperty("xnat:projectData/keywords")) - <tr> - <th align="left">Keywords:</th> - <td>$!item.getStringProperty("xnat:projectData/keywords") - </td> - </tr> -#end -#if($item.getProperty("xnat:projectData/PI")) - <tr> - <th align="left">PI:</th> - <td>$!item.getStringProperty("xnat:projectData/PI/lastname"), $!item.getStringProperty("xnat:projectData/PI/firstname") - </td> - </tr> -#end -#if($om.getInvestigators_investigator().size()>0) - <tr> - <th align="left">Investigators: </th> - <td> -#foreach($invest in $om.getInvestigators_investigator()) -#if($velocityCount>1);#end $!invest.getLastname(), $!invest.getFirstname() -#end - </td> - </tr> -#end + <tr> + <th align="left">ID:</th> + <td>$!item.getStringProperty("xnat:projectData/ID") + #if($item.getChildItems("aliases/alias").size()>0) + Aka: + #foreach($alias in $item.getChildItems("aliases/alias")) + $alias.getProperty("alias") + #end + #end + </td> + </tr> + #if($item.getProperty("xnat:projectData/description")) + <tr> + <th align="left" valign="top">Description:</th> + <td> + #if($!item.getStringProperty("xnat:projectData/description").length()>300) + <div style="height:100;overflow:auto">$!item.getStringProperty("xnat:projectData/description")</div> + #else + $!item.getStringProperty("xnat:projectData/description") + #end + </td> + </tr> + #end + #if($item.getProperty("xnat:projectData/keywords")) + <tr> + <th align="left">Keywords:</th> + <td>$!item.getStringProperty("xnat:projectData/keywords") + </td> + </tr> + #end + #if($item.getProperty("xnat:projectData/PI")) + <tr> + <th align="left">PI:</th> + <td>$!item.getStringProperty("xnat:projectData/PI/lastname"), $!item.getStringProperty( + "xnat:projectData/PI/firstname") + </td> + </tr> + #end + #if($om.getInvestigators_investigator().size()>0) + <tr> + <th align="left">Investigators:</th> + <td> + #foreach($invest in $om.getInvestigators_investigator()) + #if($velocityCount>1);#end $!invest.getLastname(), $!invest.getFirstname() + #end + </td> + </tr> + #end </table> - #if($data.getSession().getAttribute("userHelper").canCreate($project)) - <BR><A ID="button1" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","edit").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Edit Details</A> - #if($data.getSession().getAttribute("userHelper").canDelete($project) && $turbineUtils.toBoolean($siteConfig.getProperty("UI.allow-project-delete","true"))) - <A ID="button3" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","delete").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Delete</A> - #end - <A ID="button5" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","protocols").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Manage Custom Variables</A> +#if($data.getSession().getAttribute("userHelper").canCreate($project)) +<BR><A ID="button1" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","edit").addPathInfo( + "search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo( + "search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Edit Details</A> + #if($data.getSession().getAttribute( + "userHelper").canDelete($project) && $turbineUtils.toBoolean($siteConfig.getProperty( + "UI.allow-project-delete","true"))) + <A ID="button3" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","delete").addPathInfo( + "search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo( + "search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Delete</A> + #end +<A ID="button5" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","protocols").addPathInfo( + "search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo( + "search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Manage Custom Variables</A> - #end \ No newline at end of file +#end \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_history.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_history.vm index cd61def7..f68521eb 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_history.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_history.vm @@ -1,17 +1,17 @@ #if($workflows && $workflows.size()>0) - #foreach( $workflow in $workflows ) - <DIV class="containerItem" title="$!workflow.getStatus()" - #if($workflow.getStatus()=="Complete") - style="color:black;white-space:nowrap;"> - #elseif($workflow.getStatus()=="Error") - style="color:red;white-space:nowrap;"> - #else - style="color:green;white-space:nowrap;"> - #end - $turbineUtils.formatDate($!workflow.getLaunchTime()): $!workflow.getOnlyPipelineName() - #if($workflow.getStatus()!="Complete") - $!workflow.getPercentagecomplete() - #end - </DIV > - #end + #foreach( $workflow in $workflows ) + <DIV class="containerItem" title="$!workflow.getStatus()" + #if($workflow.getStatus()=="Complete") + style="color:black;white-space:nowrap;"> + #elseif($workflow.getStatus()=="Error") + style="color:red;white-space:nowrap;"> + #else + style="color:green;white-space:nowrap;"> + #end + $turbineUtils.formatDate($!workflow.getLaunchTime()): $!workflow.getOnlyPipelineName() + #if($workflow.getStatus()!="Complete") + $!workflow.getPercentagecomplete() + #end + </DIV> + #end #end \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_management.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_management.vm index 67013b32..bd4ee7ea 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_management.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_management.vm @@ -2,94 +2,126 @@ #* @vtlvariable name="data" type="org.apache.turbine.util.RunData" *# #* @vtlvariable name="turbineUtils" type="org.nrg.xdat.turbine.utils.TurbineUtils" *# #* @vtlvariable name="content" type="org.apache.turbine.services.pull.tools.ContentTool" *# -#set($showUserList = !$turbineUtils.toBoolean($siteConfig.getProperty("restrictUserListAccessToAdmins", "true")) || $data.getSession().getAttribute("user").checkRole("Administrator")) -<script type="text/javascript" src="$content.getURI("scripts/project/userMgmt.js")"></script> +#set($showUserList = !$turbineUtils.toBoolean($siteConfig.getProperty( + "restrictUserListAccessToAdmins", "true")) || $data.getSession().getAttribute("user").checkRole("Administrator")) +<script type="text/javascript" src="$content.getURI("scripts/project/userMgmt.js")"></script> <table class="mgmt_container"> - <tr> - <td valign="top"> - <label><input id="showDeactivatedUsersCheck" type="checkbox" onclick="window.userManager.reloadUsersForProject();">Show Deactivated Users</label> - <div id="user_mgmt_div"></div> - </td> - <td valign="top"> - <div id="user_invite_div"> -<TABLE> - <TR> - <TD COLSPAN="3"><h4 id="add_invite_user_header" style="margin-bottom:0px">Add/Invite User</h4> - Enter the email address of the user to add.</TD> - </TR> - <TR> - <TD COLSPAN="3" NOWRAP><INPUT type="text" name="email" ID="invite_email" style="margin-bottom:3px"/> - <BR><select name="access_level" id="access_level" style="margin-bottom:3px"></select> - <BR><input type="button" value="Add User" name="eventSubmit_doPerform" ID="invite_user_button" ONCLICK="window.userManager.inviteUserFromForm();"/> - </TD> - </TR> - <TR> - <TD COLSPAN="3"> </TD> - </TR> -#if($showUserList) - <TR> - <TD COLSPAN="3"><h4 id="user_list_header" style="margin-bottom:0px">Add Users from List</h4></TD> - </TR> - <TR> - <TD COLSPAN="3" NOWRAP> - <input type="button" id="popup_all_users_button" disabled="true" value="Show List" ONCLICK="window.userManager.popupAllUsersBox();"/> - </TD> - </TR> -#end -</TABLE> - </div> - </td> - </tr> - <tr><td> </td></tr> - <tr> - <td colspan="2" class="highlighted" id="access_container"> -#set($guest=$om.getPublicAccessibility()) -#if($guest=="") -#set($guest="private") -#end -<input type="hidden" id="current_accessibility" value="$guest"/> - <DIV style="font-weight:700;"> Define Default $displayManager.getSingularDisplayNameForProject() Accessibility</DIV> - <TABLE cellpadding="5" cellspacing="0"> - <TR><TD NOWRAP><input id="private_access" onclick="if(document.getElementById('current_accessibility').value!=this.value)document.getElementById('accessibility_save').disabled=false;else document.getElementById('accessibility_save').disabled=true;" type="radio" name="accessibility" value="private" #if($guest=="private")CHECKED#end/> Private</TD><TD>Only you and study members will be able to access study data.</TD></TR> - <TR><TD NOWRAP><input id="protected_access" onclick="if(document.getElementById('current_accessibility').value!=this.value)document.getElementById('accessibility_save').disabled=false;else document.getElementById('accessibility_save').disabled=true;" type="radio" name="accessibility" value="protected" #if($guest=="protected")CHECKED#end /> Protected</TD><TD>All users will be able to see your study title and description, but only collaborators you approve will be able to analyze and download data.</TD></TR> - <TR><TD NOWRAP><input id="public_access" onclick="if(document.getElementById('current_accessibility').value!=this.value)document.getElementById('accessibility_save').disabled=false;else document.getElementById('accessibility_save').disabled=true;" type="radio" name="accessibility" value="public" #if($guest=="public")CHECKED#end/> Public</TD><TD>All users will be able to access study data for analysis and download.</TD></TR> - <TR><TD COLSPAN="2"><input type="button" onclick="(new DefaultAccessibilityManager(document.getElementById('access_container'),'$project.getId()')).set();" id="accessibility_save" value="Save" disabled="true"/></TD></TR> - </TABLE> - </td> - </tr> - <tr> - <td colspan="2" class="highlighted" id="invite_container"> - <DIV style="font-weight:700;"> $displayManager.getSingularDisplayNameForProject() Invitations</DIV> -<script type="text/javascript" src="$content.getURI("scripts/project/parManager.js")"></script> -<div id="pil"></div> -</div> -<script type="text/javascript"> -var parList=new PARManager("pil",{URI:serverRoot+"/REST/projects/$om.getId()/pars",projectBased:true}); -parList.init(); -</script> - </td> - </tr> - </table> + <tr> + <td valign="top"> + <label><input id="showDeactivatedUsersCheck" type="checkbox" onclick="window.userManager.reloadUsersForProject();">Show Deactivated Users</label> + <div id="user_mgmt_div"></div> + </td> + <td valign="top"> + <div id="user_invite_div"> + <TABLE> + <TR> + <TD COLSPAN="3"><h4 id="add_invite_user_header" style="margin-bottom:0px">Add/Invite User</h4> + Enter the email address of the user to add. + </TD> + </TR> + <TR> + <TD COLSPAN="3" NOWRAP> + <INPUT type="text" name="email" ID="invite_email" style="margin-bottom:3px"/> + <BR><select name="access_level" id="access_level" style="margin-bottom:3px"></select> + <BR><input type="button" value="Add User" name="eventSubmit_doPerform" ID="invite_user_button" ONCLICK="window.userManager.inviteUserFromForm();"/> + </TD> + </TR> + <TR> + <TD COLSPAN="3"> </TD> + </TR> + #if($showUserList) + <TR> + <TD COLSPAN="3"><h4 id="user_list_header" style="margin-bottom:0px">Add Users from List</h4> + </TD> + </TR> + <TR> + <TD COLSPAN="3" NOWRAP> + <input type="button" id="popup_all_users_button" disabled="true" value="Show List" ONCLICK="window.userManager.popupAllUsersBox();"/> + </TD> + </TR> + #end + </TABLE> + </div> + </td> + </tr> + <tr> + <td> </td> + </tr> + <tr> + <td colspan="2" class="highlighted" id="access_container"> + #set($guest=$om.getPublicAccessibility()) + #if($guest=="") + #set($guest="private") + #end + <input type="hidden" id="current_accessibility" value="$guest"/> + <DIV style="font-weight:700;"> Define Default $displayManager.getSingularDisplayNameForProject() Accessibility</DIV> + <TABLE cellpadding="5" cellspacing="0"> + <TR> + <TD NOWRAP> + <input id="private_access" onclick="if(document.getElementById('current_accessibility').value!=this.value)document.getElementById('accessibility_save').disabled=false;else document.getElementById('accessibility_save').disabled=true;" type="radio" name="accessibility" value="private" #if($guest== + "private")CHECKED#end/> Private + </TD> + <TD>Only you and study members will be able to access study data.</TD> + </TR> + <TR> + <TD NOWRAP> + <input id="protected_access" onclick="if(document.getElementById('current_accessibility').value!=this.value)document.getElementById('accessibility_save').disabled=false;else document.getElementById('accessibility_save').disabled=true;" type="radio" name="accessibility" value="protected" #if($guest== + "protected")CHECKED#end/> Protected + </TD> + <TD>All users will be able to see your study title and description, but only collaborators you approve will be able to analyze and download data.</TD> + </TR> + <TR> + <TD NOWRAP> + <input id="public_access" onclick="if(document.getElementById('current_accessibility').value!=this.value)document.getElementById('accessibility_save').disabled=false;else document.getElementById('accessibility_save').disabled=true;" type="radio" name="accessibility" value="public" #if($guest== + "public")CHECKED#end/> Public + </TD> + <TD>All users will be able to access study data for analysis and download.</TD> + </TR> + <TR> + <TD COLSPAN="2"> + <input type="button" onclick="(new DefaultAccessibilityManager(document.getElementById('access_container'),'$project.getId()')).set();" id="accessibility_save" value="Save" disabled="true"/> + </TD> + </TR> + </TABLE> + </td> + </tr> + <tr> + <td colspan="2" class="highlighted" id="invite_container"> + <DIV style="font-weight:700;"> $displayManager.getSingularDisplayNameForProject() Invitations</DIV> + <script type="text/javascript" src="$content.getURI("scripts/project/parManager.js")"></script> + <div id="pil"></div> + </div> + <script type="text/javascript"> + var parList = new PARManager("pil", { + URI: serverRoot + "/REST/projects/$om.getId()/pars", + projectBased: true + }); + parList.init(); + </script> + </td> + </tr> +</table> <script language="javascript"> -function summaryUserTabChange(obj){ - if(obj.newValue.get("href")=="#tab3"){ + function summaryUserTabChange(obj){ + if (obj.newValue.get("href") == "#tab3") { if (window.userManager == undefined) { window.userManager = new UserManager("user_mgmt_div", "$project.getId()", $showUserList); } - } -} + } + } -function addUserMgmtMonitor(){ - if(window.summaryTabView.get("activeTab").get("href")=="#tab3"){ + function addUserMgmtMonitor(){ + if (window.summaryTabView.get("activeTab").get("href") == "#tab3") { if (window.userManager == undefined) { window.userManager = new UserManager("user_mgmt_div", "$project.getId()", $showUserList); } - }else{ - window.summaryTabView.subscribe("activeTabChange",summaryUserTabChange); + } + else { + window.summaryTabView.subscribe("activeTabChange", summaryUserTabChange); + } } -} - -YAHOO.util.Event.onDOMReady(addUserMgmtMonitor); - + + YAHOO.util.Event.onDOMReady(addUserMgmtMonitor); + </script> \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_pipeline.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_pipeline.vm index 5c2594c3..707ab8f8 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_pipeline.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_pipeline.vm @@ -1,10 +1,10 @@ - <!-- Source file --> - <script type="text/javascript" src="$content.getURI("scripts/yui/build/logger/logger-min.js")"></script> +<!-- Source file --> +<script type="text/javascript" src="$content.getURI("scripts/yui/build/logger/logger-min.js")"></script> - <link type="text/css" rel="stylesheet" href="$content.getURI("scripts/yui/build/fonts/fonts.css")"> - <!--<link type="text/css" rel="stylesheet" href="$content.getURI("scripts/yui/build/reset/reset.css")">--> +<link type="text/css" rel="stylesheet" href="$content.getURI("scripts/yui/build/fonts/fonts.css")"> +<!--<link type="text/css" rel="stylesheet" href="$content.getURI("scripts/yui/build/reset/reset.css")">--> - <script type="text/javascript" src="$content.getURI("scripts/yui/build/animation/animation.js")" ></script> +<script type="text/javascript" src="$content.getURI("scripts/yui/build/animation/animation.js")"></script> <script type="text/javascript" src="$content.getURI("scripts/project/pipelineMgmt.js")"></script> @@ -13,28 +13,30 @@ <table class="mgmt_container"> - <tr> - <td valign="top" > - <div id="pipeline_mgmt_div"></div> - </td> - </tr> - <tr> - <td valign="top"> - <div id="buttons"> + <tr> + <td valign="top"> + <div id="pipeline_mgmt_div"></div> + </td> + </tr> + <tr> + <td valign="top"> + <div id="buttons"> <span id="add" class="yui-button yui-push-button"> <span class="first-child"> <button type="button">Add More Pipelines</button> </span> - </span> - </div> - - </td> - </tr> -<tr> - <td ><div id="myLogger"></div> </td> -</tr> + </span> + </div> -<div id="content"></div> + </td> + </tr> + <tr> + <td> + <div id="myLogger"></div> + </td> + </tr> + + <div id="content"></div> </table> @@ -47,87 +49,91 @@ - var handleOK = function() { - this.hide(); - }; - - -var dlg = new YAHOO.widget.SimpleDialog('widget_alert', { - visible:false, - width: '20em', - zIndex: 9999, - close: false, - fixedcenter: true, - modal: false, - draggable: true, - constraintoviewport: true, - icon: YAHOO.widget.SimpleDialog.ICON_WARN, - buttons: [ - { text: 'OK', handler: handleOK, isDefault: true } - ] - }); - -function summaryTabChange(obj){ - if(obj.newValue.get("href")=="#tab4"){ - if(window.pipelineManager==undefined)window.pipelineManager = new PipelineManager("pipeline_mgmt_div","$project.getId()"); - window.pipelineManager.getPipelines(); - } -}; - -var xnatalert = function(str) { - dlg.setBody(str); - dlg.cfg.queueProperty('icon', YAHOO.widget.SimpleDialog.ICON_WARN); - dlg.cfg.queueProperty('zIndex', 9999); - dlg.render(document.body); - if (dlg.bringToTop) { - dlg.bringToTop(); - } - dlg.show(); - }; - -function initComponents() { - dlg.setHeader("Alert!"); - dlg.setBody('Alert body passed to window.alert'); // Bug in panel, must have a body when rendered - dlg.render(document.body); - - - var addButton = new YAHOO.widget.Button("add"); - - function addClick(e) { - var label = this.get("label"); - var addMoreText = "Add More Pipelines"; - var showMineText = "Show $displayManager.getSingularDisplayNameForProject() Pipelines"; - - if (label == addMoreText) { - window.pipelineManager.getAdditionalPipelines(); - addButton.set('label',showMineText); - }else { - window.pipelineManager.getPipelines(); - addButton.set('label',addMoreText); - } - }; - - addButton.on("click", addClick); - -} - - -function addMonitor(){ - initComponents(); - - if(window.summaryTabView.get("activeTab").get("href")=="#tab4"){ - if(window.pipelineManager==undefined) { - window.pipelineManager = new PipelineManager("pipeline_mgmt_div","$project.getId()"); - window.pipelineManager.getPipelines(); - } - }else{ - window.summaryTabView.subscribe("activeTabChange",summaryTabChange); + var handleOK = function(){ + this.hide(); + }; + + + var dlg = new YAHOO.widget.SimpleDialog('widget_alert', { + visible: false, + width: '20em', + zIndex: 9999, + close: false, + fixedcenter: true, + modal: false, + draggable: true, + constraintoviewport: true, + icon: YAHOO.widget.SimpleDialog.ICON_WARN, + buttons: [ + { text: 'OK', handler: handleOK, isDefault: true } + ] + }); + + function summaryTabChange(obj){ + if (obj.newValue.get("href") == "#tab4") { + if (window.pipelineManager == undefined)window.pipelineManager = new PipelineManager("pipeline_mgmt_div", "$project.getId()"); + window.pipelineManager.getPipelines(); + } + } + ; + + var xnatalert = function(str){ + dlg.setBody(str); + dlg.cfg.queueProperty('icon', YAHOO.widget.SimpleDialog.ICON_WARN); + dlg.cfg.queueProperty('zIndex', 9999); + dlg.render(document.body); + if (dlg.bringToTop) { + dlg.bringToTop(); + } + dlg.show(); + }; + + function initComponents(){ + dlg.setHeader("Alert!"); + dlg.setBody('Alert body passed to window.alert'); // Bug in panel, must have a body when rendered + dlg.render(document.body); + + + var addButton = new YAHOO.widget.Button("add"); + + function addClick(e){ + var label = this.get("label"); + var addMoreText = "Add More Pipelines"; + var showMineText = "Show $displayManager.getSingularDisplayNameForProject() Pipelines"; + + if (label == addMoreText) { + window.pipelineManager.getAdditionalPipelines(); + addButton.set('label', showMineText); + } + else { + window.pipelineManager.getPipelines(); + addButton.set('label', addMoreText); + } + }; + + addButton.on("click", addClick); + + } + + + function addMonitor(){ + initComponents(); + + if (window.summaryTabView.get("activeTab").get("href") == "#tab4") { + if (window.pipelineManager == undefined) { + window.pipelineManager = new PipelineManager("pipeline_mgmt_div", "$project.getId()"); + window.pipelineManager.getPipelines(); + } + } + else { + window.summaryTabView.subscribe("activeTabChange", summaryTabChange); + } } -}; - -YAHOO.util.Event.onDOMReady(addMonitor); + ; + + YAHOO.util.Event.onDOMReady(addMonitor); + - </script> diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_publications.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_publications.vm index 77aa8ca1..32436b8b 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_publications.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_publications.vm @@ -1,76 +1,85 @@ - Publications: #if($project.getPublications_publication().size() > 0) - #set($primarys = $project.getPublicationsByType("PRIMARY")) - #set($refs = $project.getPublicationsByType("REFERENCE")) - #set($facts = $project.getPublicationsByType("FACT SHEET")) -#if($primarys.size()>0) - <DIV class="containerItem"><table> - #foreach($res in $primarys) - <tr> - <td>#if($res.getUri()) <A HREF="$res.getUri()">#end - #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end - #if($res.getUri())</A> #end - #if($res.getPubmed()) <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end - #if($res.getDoi()) DOI: $res.getDoi() #end - #if($res.getMedline()) MEDLINE: $res.getMedline() #end - #if($res.getOther()) OTHER: $res.getOther() #end - </td> - </tr> - #end - </table> - </DIV> - #end + #set($primarys = $project.getPublicationsByType("PRIMARY")) + #set($refs = $project.getPublicationsByType("REFERENCE")) + #set($facts = $project.getPublicationsByType("FACT SHEET")) + #if($primarys.size()>0) + <DIV class="containerItem"> + <table> + #foreach($res in $primarys) + <tr> + <td>#if($res.getUri()) <A HREF="$res.getUri()">#end + #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end + #if($res.getUri())</A> #end + #if($res.getPubmed()) + <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end + #if($res.getDoi()) DOI: $res.getDoi() #end + #if($res.getMedline()) MEDLINE: $res.getMedline() #end + #if($res.getOther()) OTHER: $res.getOther() #end + </td> + </tr> + #end + </table> + </DIV> + #end -#if($refs.size()>0) - <DIV class="containerItem"><table> - #foreach($res in $refs) - <tr> - <td>#if($res.getUri()) <A HREF="$res.getUri()">#end - #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end - #if($res.getUri())</A> #end - #if($res.getPubmed()) <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end - #if($res.getDoi()) DOI: $res.getDoi() #end - #if($res.getMedline()) MEDLINE: $res.getMedline() #end - #if($res.getOther()) OTHER: $res.getOther() #end - </td> - </tr> - #end - </table> - </DIV> -#end + #if($refs.size()>0) + <DIV class="containerItem"> + <table> + #foreach($res in $refs) + <tr> + <td>#if($res.getUri()) <A HREF="$res.getUri()">#end + #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end + #if($res.getUri())</A> #end + #if($res.getPubmed()) + <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end + #if($res.getDoi()) DOI: $res.getDoi() #end + #if($res.getMedline()) MEDLINE: $res.getMedline() #end + #if($res.getOther()) OTHER: $res.getOther() #end + </td> + </tr> + #end + </table> + </DIV> + #end -#if($facts.size()>0) - <DIV class="containerItem"><table> - #foreach($res in $facts) - <tr> - <td>#if($res.getUri()) <A HREF="$res.getUri()">#end - #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end - #if($res.getUri())</A> #end - #if($res.getPubmed()) <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end - #if($res.getDoi()) DOI: $res.getDoi() #end - #if($res.getMedline()) MEDLINE: $res.getMedline() #end - #if($res.getOther()) OTHER: $res.getOther() #end - </td> - </tr> - #end - </table> - </DIV> - #end + #if($facts.size()>0) + <DIV class="containerItem"> + <table> + #foreach($res in $facts) + <tr> + <td>#if($res.getUri()) <A HREF="$res.getUri()">#end + #if($res.getCitation())$res.getCitation()#else$res.getTitle()#end + #if($res.getUri())</A> #end + #if($res.getPubmed()) + <A HREF="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=$res.getPubmed()[UID]">PUBMED</A> #end + #if($res.getDoi()) DOI: $res.getDoi() #end + #if($res.getMedline()) MEDLINE: $res.getMedline() #end + #if($res.getOther()) OTHER: $res.getOther() #end + </td> + </tr> + #end + </table> + </DIV> + #end - #else - None - #end - #set($resources=$project.getResources_resource()) - #if($resources.size()>0) - #foreach($resource in $resources) - #if($resource.getUri()) -<DIV class="containerItem"><A title="$!resource.getDescription()" href="$resource.getUri()">Download $!resource.getLabel()</A></DIV> - #end +#else +None +#end +#set($resources=$project.getResources_resource()) +#if($resources.size()>0) + #foreach($resource in $resources) + #if($resource.getUri()) + <DIV class="containerItem"> + <A title="$!resource.getDescription()" href="$resource.getUri()">Download $!resource.getLabel()</A></DIV> + #end - #end + #end - #end +#end #if($data.getSession().getAttribute("userHelper").canCreate($project)) - <BR/><BR/><A ID="button2" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","publications").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Edit Publications</A> +<BR/><BR/><A ID="button2" href="$link.setAction("XDATActionRouter").addPathInfo( + "xdataction","publications").addPathInfo("search_element","xnat:projectData").addPathInfo( + "search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo( + "popup","$!popup")">Edit Publications</A> #end \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_status.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_status.vm index 7b463acf..17cccd68 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_status.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_status.vm @@ -1,11 +1,14 @@ - #set($exptCounts = $project.getExperimentCountByXSIType()) -<DIV class="containerItem">$!subject_count $!data.getSession().getAttribute("userHelper").getBrowseableElementDisplay("xnat:subjectData").getSchemaElement().getPluralDescription()</DIV> - #foreach($key in $exptCounts.keySet()) - <DIV class="containerItem">$exptCounts.get($key) $!data.getSession().getAttribute("userHelper").getBrowseableElementDisplay($key).getSchemaElement().getPluralDescription()</DIV> - #end - - #if($data.getSession().getAttribute("userHelper").canCreate($project)) - <BR><A ID="button5" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","protocols").addPathInfo("search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo("search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Manage Custom Variables</A> - #end \ No newline at end of file +<DIV class="containerItem">$!subject_count $!data.getSession().getAttribute("userHelper").getBrowseableElementDisplay( + "xnat:subjectData").getSchemaElement().getPluralDescription()</DIV> +#foreach($key in $exptCounts.keySet()) +<DIV class="containerItem">$exptCounts.get($key) $!data.getSession().getAttribute( + "userHelper").getBrowseableElementDisplay($key).getSchemaElement().getPluralDescription()</DIV> +#end + +#if($data.getSession().getAttribute("userHelper").canCreate($project)) +<BR><A ID="button5" href="$link.setAction("XDATActionRouter").addPathInfo("xdataction","protocols").addPathInfo( + "search_element","xnat:projectData").addPathInfo("search_field","xnat:projectData.ID").addPathInfo( + "search_value","$!{project.getId()}").addPathInfo("popup","$!popup")">Manage Custom Variables</A> +#end \ No newline at end of file diff --git a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_tabs.vm b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_tabs.vm index 18d575d5..b734819a 100644 --- a/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_tabs.vm +++ b/src/main/webapp/xnat-templates/screens/xnat_projectData/xnat_projectData_summary_tabs.vm @@ -1,45 +1,44 @@ <!-- BEGIN xnat-templates/screens/xnat_projectData/xnat_projectData_summary_tabs.vm --> -<style> -span.spacer{ -height:12px; -width:1px; -} -</style> <div ID="project_summary_module" style="display:none"> - <div id="projectSummary" class="yui-navset"> - <ul class="yui-nav"> - <li class="selected"><a href="#tab1"><em>Details<span class="spacer"></span></em></a></li> -#set($canReadSubjects=$data.getSession().getAttribute("userHelper").canRead("xnat:subjectData/project","$project.getId()")) -#if($canReadSubjects) - #if($data.getSession().getAttribute("userHelper").canDelete($project)) - <li><a href="#tab3"><em>Access<span class="spacer"></span></em></a></li> - <li><a href="#othermgmt"><em>Manage<span class="spacer"></span></em></a></li> - <li><a href="#tab4"><em>Pipelines<span class="spacer"></span></em></a></li> - #end -#end + <div id="projectSummary" class="yui-navset"> + <ul class="yui-nav"> + <li class="selected"><a href="#tab1"><em>Details</em></a></li> + #set($canReadSubjects=$data.getSession().getAttribute("userHelper").canRead( + "xnat:subjectData/project","$project.getId()")) + #if($canReadSubjects) + #if($data.getSession().getAttribute("userHelper").canDelete($project)) + <li><a href="#tab3"><em>Access</em></a></li> + <li><a href="#othermgmt"><em>Manage</em></a></li> + <li><a href="#tab4"><em>Pipelines</em></a></li> + #end + #end #foreach($tab in $tabs) - <li><a href="#$tab.getProperty("divName")"><em>$tab.getProperty("title")<span class="spacer"></span></em></a></li> + <li><a href="#$tab.getProperty("divName")"><em>$tab.getProperty("title") + </em></a></li> #end - </ul> - <div class="yui-content"> - <div id="tab1"> - <p>#parse($turbineUtils.getTemplateName("_summary_details","xnat:projectData",$project.getId()))</p> - </div> + </ul> + <div class="yui-content"> + <div id="tab1"> + <p>#parse($turbineUtils.getTemplateName("_summary_details","xnat:projectData",$project.getId()))</p> + </div> -#if($canReadSubjects) - #if($data.getSession().getAttribute("userHelper").canCreate($project)) - <div id="tab3"> - <p>#parse($turbineUtils.getTemplateName("_summary_management","xnat:projectData",$project.getId()))</p> - </div> - <div id="othermgmt"> - <p>#parse($turbineUtils.getTemplateName("_summary_manage","xnat:projectData",$project.getId()))</p> - </div> - <div id="tab4"> - <p>#parse($turbineUtils.getTemplateName("_summary_pipeline","xnat:projectData",$project.getId()))</p> - </div> - #end -#end + #if($canReadSubjects) + #if($data.getSession().getAttribute("userHelper").canCreate($project)) + <div id="tab3"> + <p>#parse($turbineUtils.getTemplateName( + "_summary_management","xnat:projectData",$project.getId()))</p> + </div> + <div id="othermgmt"> + <p>#parse($turbineUtils.getTemplateName( + "_summary_manage","xnat:projectData",$project.getId()))</p> + </div> + <div id="tab4"> + <p>#parse($turbineUtils.getTemplateName( + "_summary_pipeline","xnat:projectData",$project.getId()))</p> + </div> + #end + #end #foreach($tab in $tabs) <div id="$tab.getProperty("divName")"> #set($path = "screens/xnat_projectData/tabs/${tab.getProperty('fileName')}") @@ -47,63 +46,67 @@ width:1px; </div> #end - </div> -</div> + </div> + </div> </div> -<script type="text/javascript"> -function summaryIndexChanged(){ - var activeIndex=this.get("activeIndex"); - YAHOO.util.Cookie.set("${project.getId()}.summary.index",activeIndex); -} - -function summaryTabManagerInit(){ - window.summaryTabView = new YAHOO.widget.TabView('projectSummary'); - var oButton1= new YAHOO.widget.Button("button1"); - var oButton2= new YAHOO.widget.Button("button2"); -#if($canReadSubjects) - #if($data.getSession().getAttribute("userHelper").canDelete($project)) - var oButton3= new YAHOO.widget.Button("button3"); - #end - #if($data.getSession().getAttribute("userHelper").canCreate($project)) - var oButton4= new YAHOO.widget.Button("button4"); - var oButton5= new YAHOO.widget.Button("button5"); - #end -#end +<script type="text/javascript"> + function summaryIndexChanged(){ + var activeIndex = this.get("activeIndex"); + YAHOO.util.Cookie.set("${project.getId()}.summary.index", activeIndex); + } + + function summaryTabManagerInit(){ + window.summaryTabView = new YAHOO.widget.TabView('projectSummary'); + var oButton1 = new YAHOO.widget.Button("button1"); + var oButton2 = new YAHOO.widget.Button("button2"); + #if($canReadSubjects) + #if($data.getSession().getAttribute("userHelper").canDelete($project)) + var oButton3 = new YAHOO.widget.Button("button3"); + #end + #if($data.getSession().getAttribute("userHelper").canCreate($project)) + var oButton4 = new YAHOO.widget.Button("button4"); + var oButton5 = new YAHOO.widget.Button("button5"); + #end + #end - window.project_summary_module = new YAHOO.widget.Module("project_summary_module",{visible:false,zIndex:5}); - -#addCustomScreenJS($om.getXSIType() "report/tabs_js") - - window.project_summary_module.show(); - -#if($canReadSubjects) - #if($topTab) - var i=0; - var found=false; - while(window.summaryTabView.getTab(i)!=null && !found){ - var tabLabel=window.summaryTabView.getTab(i).get('label'); - var parseTabLabel=tabLabel.split('<'); - //alert("tab #" + i + ": " + parseTabLabel[0] + ", $!topTab"); - if(parseTabLabel[0]=="$!topTab") { - // We have a match! - window.summaryTabView.set('activeIndex', i); - found=true; - } - i++; - } - if (!found) { - window.summaryTabView.set('activeIndex', 0); - } - #else - var tabIndex=YAHOO.util.Cookie.get("${project.getId()}.summary.index"); - window.summaryTabView.set('activeIndex',tabIndex||0); - #end - window.summaryTabView.subscribe("activeTabChange",summaryIndexChanged); -#end - - } - summaryTabManagerInit(); + window.project_summary_module = new YAHOO.widget.Module("project_summary_module", { + visible: false, + zIndex: 5 + }); + + #addCustomScreenJS($om.getXSIType() "report/tabs_js") + + window.project_summary_module.show(); + + #if($canReadSubjects) + #if($topTab) + var i = 0; + var found = false; + while (window.summaryTabView.getTab(i) != null && !found) { + var tabLabel = window.summaryTabView.getTab(i).get('label'); + var parseTabLabel = tabLabel.split('<'); + //alert("tab #" + i + ": " + parseTabLabel[0] + ", $!topTab + "); + if (parseTabLabel[0] == "$!topTab") { + // We have a match! + window.summaryTabView.set('activeIndex', i); + found = true; + } + i++; + } + if (!found) { + window.summaryTabView.set('activeIndex', 0); + } + #else + var tabIndex = YAHOO.util.Cookie.get("${project.getId()}.summary.index"); + window.summaryTabView.set('activeIndex', tabIndex || 0); + #end + window.summaryTabView.subscribe("activeTabChange", summaryIndexChanged); + #end + + } + summaryTabManagerInit(); </script> <!-- END xnat-templates/screens/xnat_projectData/xnat_projectData_summary_tabs.vm --> -- GitLab