Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions pepdb/src/org/scharp/atlas/pepdb/PepDBBaseController.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.labkey.api.util.DateUtil;
import org.labkey.api.util.HtmlString;
import org.labkey.api.util.HtmlStringBuilder;
import org.labkey.api.util.Link;
import org.labkey.api.util.LinkBuilder;
import org.labkey.api.view.ActionURL;
import org.labkey.api.writer.HtmlWriter;
import org.scharp.atlas.pepdb.model.PeptideGroup;
Expand All @@ -26,8 +26,6 @@
import org.scharp.atlas.pepdb.model.ProteinCategory;
import org.springframework.validation.Errors;

import java.io.IOException;
import java.io.Writer;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -452,10 +450,9 @@ public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
Integer peptideId = (Integer) rowMap.get(c.getName());
try
{
new Link.LinkBuilder("P" + peptideId).clearClasses()
LinkBuilder.simpleLink("P" + peptideId, new ActionURL(PepDBController.DisplayPeptideAction.class, getContainer())
.addParameter(PepDBSchema.COLUMN_PEPTIDE_ID, peptideId))
.target("_self")
.href(new ActionURL(PepDBController.DisplayPeptideAction.class, getContainer())
.addParameter(PepDBSchema.COLUMN_PEPTIDE_ID, peptideId))
.build()
.appendTo(out);
}
Expand Down Expand Up @@ -528,10 +525,9 @@ public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
Integer peptidePoolId = (Integer) rowMap.get(c.getName());
try
{
new Link.LinkBuilder("PP" + peptidePoolId).clearClasses()
LinkBuilder.simpleLink("PP" + peptidePoolId, new ActionURL(PepDBController.DisplayPeptidePoolInformationAction.class, getContainer())
.addParameter(PepDBSchema.COLUMN_PEPTIDE_POOL_ID, peptidePoolId))
.target("_self")
.href(new ActionURL(PepDBController.DisplayPeptidePoolInformationAction.class, getContainer())
.addParameter(PepDBSchema.COLUMN_PEPTIDE_POOL_ID, peptidePoolId))
.build()
.appendTo(out);
}
Expand Down Expand Up @@ -606,10 +602,9 @@ public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
{
if(parentPoolId != null)
{
new Link.LinkBuilder("PP" + parentPoolId).clearClasses()
LinkBuilder.simpleLink("PP" + parentPoolId, new ActionURL(PepDBController.DisplayPeptidePoolInformationAction.class, getContainer())
.addParameter(PepDBSchema.COLUMN_PEPTIDE_POOL_ID, parentPoolId))
.target("_self")
.href(new ActionURL(PepDBController.DisplayPeptidePoolInformationAction.class, getContainer())
.addParameter(PepDBSchema.COLUMN_PEPTIDE_POOL_ID, parentPoolId))
.build()
.appendTo(out);
}
Expand Down
14 changes: 7 additions & 7 deletions pepdb/src/org/scharp/atlas/pepdb/view/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
If you need to enter any data contact Atlas Administrator.</h4>
<h3 style="color:blue;font:italic">Peptide Groups : </h3>
<ul>
<li><%= link("List Peptide Groups").href(urlFor(PepDBController.ShowAllPeptideGroupsAction.class)).clearClasses() %></li>
<li><%= simpleLink("List Peptide Groups", urlFor(PepDBController.ShowAllPeptideGroupsAction.class)) %></li>
<%
if(canUpdate){%>
<li><%= link("Insert a New Group").href(urlFor(PepDBController.InsertPeptideGroupAction.class)).clearClasses() %></li>
<li><%= simpleLink("Insert a New Group", urlFor(PepDBController.InsertPeptideGroupAction.class)) %></li>
<%}else{%>
<li>Insert a New Group</li>
<%}%>
</ul>
<h3 style="color:blue;font:italic">Peptides : </h3>
<ul>
<li><%= link("Search for Peptides by Criteria").href(urlFor(PepDBController.SearchForPeptidesAction.class)).clearClasses() %></li>
<li><%= simpleLink("Search for Peptides by Criteria", urlFor(PepDBController.SearchForPeptidesAction.class)) %></li>
<%if(canUpdate){%>
<li><%= link("Import Peptides").href(urlFor(PepDBController.ImportPeptidesAction.class)).clearClasses() %></li>
<li><%= simpleLink("Import Peptides", urlFor(PepDBController.ImportPeptidesAction.class)) %></li>
<%}else{%>
<li>Import Peptides</li>
<%}%>
<li><%= link("Peptides From Last Import").href(urlFor(PepDBController.DisplayResultAction.class)).clearClasses() %></li>
<li><%= simpleLink("Peptides From Last Import", urlFor(PepDBController.DisplayResultAction.class)) %></li>
</ul>
<labkey:errors/>
<%
Expand All @@ -45,9 +45,9 @@ Lookup Peptide by Id: <input type="text" name="peptide_id" size="10" value="<%=h
<h3 style="color:blue;font:italic">Peptide Pools :</h3>
<ul>
<%if(canUpdate){%>
<li><%= link("Import Peptide Pools").href(urlFor(PepDBController.ImportPeptidePoolsAction.class)).clearClasses() %></li>
<li><%= simpleLink("Import Peptide Pools", urlFor(PepDBController.ImportPeptidePoolsAction.class)) %></li>
<%}else{%>
<li>Import Peptide Pools</li>
<%}%>
<li><%= link("List All Peptide Pools").href(urlFor(PepDBController.ShowAllPeptidePoolsAction.class)).clearClasses() %></li>
<li><%= simpleLink("List All Peptide Pools", urlFor(PepDBController.ShowAllPeptidePoolsAction.class)) %></li>
</ul>
8 changes: 4 additions & 4 deletions pepdb/src/org/scharp/atlas/pepdb/view/peptideDetails.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

<tr>
<td>
<%= link(source.getPeptide_group_name()).href(urlFor(PepDBController.DisplayPeptideGroupInformationAction.class)
.addParameter("peptide_group_id", source.getPeptide_group_id().toString())).clearClasses() %>
<%= simpleLink(source.getPeptide_group_name(), urlFor(PepDBController.DisplayPeptideGroupInformationAction.class)
.addParameter("peptide_group_id", source.getPeptide_group_id().toString())) %>
(PEPTIDE NUMBER =<%=h(source.getPeptide_id_in_group())%>)
<%if(source.getFrequency_number() != null){%>
- Frequency Number =
Expand All @@ -47,8 +47,8 @@
{%>
<tr>
<td>
<%= link("PP"+pool.getPeptide_pool_id()).href(urlFor(PepDBController.DisplayPeptidePoolInformationAction.class)
.addParameter("peptide_pool_id", pool.getPeptide_pool_id())).clearClasses() %> -
<%= simpleLink("PP"+pool.getPeptide_pool_id(), urlFor(PepDBController.DisplayPeptidePoolInformationAction.class)
.addParameter("peptide_pool_id", pool.getPeptide_pool_id())) %> -
<%=h(pool.getPeptide_pool_name())%>
<%=h(pool.getPool_type_desc())%>
</td>
Expand Down