|
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" %> |
2 | 4 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
3 | 5 | <%! |
4 | 6 | public <T> ArrayList<T> defaultList(ArrayList<T> list) { |
|
68 | 70 | return new ArrayList<Action>(set); |
69 | 71 | } |
70 | 72 | %> |
| 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 | + |
71 | 89 | <% |
72 | 90 | Bill bill = (Bill)request.getAttribute("bill"); |
73 | 91 | |
|
143 | 161 | <div class='item-actions'> |
144 | 162 | <ul> |
145 | 163 | <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&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&type=website"></script></li> |
148 | 170 | <li><a href="#Comments">Read or Leave Comments</a></li> |
149 | 171 | </ul> |
150 | 172 | </div> |
|
377 | 399 | <br/> |
378 | 400 | <div class="pagebreak"></div> |
379 | 401 | <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 | + |
381 | 408 | <br/> |
382 | 409 | </div> |
383 | 410 | </div> |
|
0 commit comments