Skip to content

Commit 54e388c

Browse files
committed
refs #8477
1 parent 793fde9 commit 54e388c

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

src/main/webapp/views/bill-html.jsp

+31-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<%@ page language="java" import="gov.nysenate.openleg.util.*, java.util.Date, java.util.HashMap, java.util.ArrayList, java.util.Collections, java.util.List, java.util.Hashtable, java.util.TreeSet, java.util.StringTokenizer, java.util.regex.*, java.util.Iterator, java.text.* ,gov.nysenate.openleg.model.*" contentType="text/html" pageEncoding="utf-8"%>
1+
<%@ page language="java" import="gov.nysenate.openleg.util.*, java.util.regex.*, java.text.* ,gov.nysenate.openleg.model.*" contentType="text/html" pageEncoding="utf-8"%>
2+
<%@ page import="java.util.*" %>
3+
<%@ page import="gov.nysenate.openleg.model.Calendar" %>
24
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
35
<%!
46
public <T> ArrayList<T> defaultList(ArrayList<T> list) {
@@ -68,6 +70,22 @@
6870
return new ArrayList<Action>(set);
6971
}
7072
%>
73+
74+
<%
75+
/** This is related to http://dev.nysenate.gov/issues/8477. */
76+
HashMap<String, String> billsWithExternalPdfLinks = new HashMap<String, String>();
77+
billsWithExternalPdfLinks.put("S2000-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/StateOpsBudget.pdf");
78+
billsWithExternalPdfLinks.put("A3000-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/StateOpsBudget.pdf");
79+
billsWithExternalPdfLinks.put("S2001-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/Leg-Judi.pdf");
80+
billsWithExternalPdfLinks.put("A3001-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/Leg-Judi.pdf");
81+
billsWithExternalPdfLinks.put("S2002-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/DEBT.pdf");
82+
billsWithExternalPdfLinks.put("A3002-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/DEBT.pdf");
83+
billsWithExternalPdfLinks.put("S2003-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/Local.pdf");
84+
billsWithExternalPdfLinks.put("A3003-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/Local.pdf");
85+
billsWithExternalPdfLinks.put("S2004-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/CapitalProjectsBudget.pdf");
86+
billsWithExternalPdfLinks.put("A3004-2015", "https://www.budget.ny.gov/pubs/executive/eBudget1516/fy1516appropbills/CapitalProjectsBudget.pdf");
87+
%>
88+
7189
<%
7290
Bill bill = (Bill)request.getAttribute("bill");
7391
@@ -143,8 +161,12 @@
143161
<div class='item-actions'>
144162
<ul>
145163
<li><a href="#" onclick="window.print(); return false;">Print Page</a></li>
146-
<li><a href="<%=appPath%>/api/1.0/pdf/bill/<%=bill.getBillId()%>">Original Bill Format (PDF)</a></li>
147-
<li><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=51a57fb0-3a12-4a9e-8dd0-2caebc74d677&amp;type=website"></script></li>
164+
<% if (billsWithExternalPdfLinks.containsKey(bill.getOid()) && bill.getFulltext().isEmpty()) { %>
165+
<%= "<li><a href=" + billsWithExternalPdfLinks.get(bill.getOid()) + " >Original Bill Format (PDF)</a></li>" %>
166+
<% } else { %>
167+
<li><a href="<%=appPath%>/api/1.0/pdf/bill/<%=bill.getBillId()%>">Original Bill Format (PDF)</a></li>
168+
<% } %>
169+
<li><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=51a57fb0-3a12-4a9e-8dd0-2caebc74d677&amp;type=website"></script></li>
148170
<li><a href="#Comments">Read or Leave Comments</a></li>
149171
</ul>
150172
</div>
@@ -377,7 +399,12 @@
377399
<br/>
378400
<div class="pagebreak"></div>
379401
<h3 class="section" ><a id="Text" href="#Text" class="anchor ui-icon ui-icon-link"></a> Text</h3>
380-
<pre><%=TextFormatter.htmlTextPrintable(bill)%></pre>
402+
<% if (billsWithExternalPdfLinks.containsKey(bill.getOid()) && bill.getFulltext().isEmpty()) { %>
403+
<%= "<p style='text-align:center'>Note: The full text of this budget bill is currently available <a href=" + billsWithExternalPdfLinks.get(bill.getOid()) + " >here.</a></p>" %>
404+
<% } %>
405+
<pre><%=TextFormatter.htmlTextPrintable(bill)%></pre>
406+
407+
381408
<br/>
382409
</div>
383410
</div>

0 commit comments

Comments
 (0)