show the citation report also in ViewFile

pull/1/head
Michael Peter Christen 12 years ago
parent 1a92b61d69
commit 0600d510e1

@ -114,6 +114,7 @@ function updatepage(str) {
<option value="sentences"#(vMode-sentences)#:: selected="selected"#(/vMode-sentences)#>Parsed Sentences</option>
<option value="words"#(vMode-words)#:: selected="selected"#(/vMode-words)#>Parsed Tokens/Words</option>
<option value="links"#(vMode-links)#:: selected="selected"#(/vMode-links)#>Link List</option>
<option value="iframeCitations"#(vMode-iframeCitations)#:: selected="selected"#(/vMode-iframeCitations)#>Citation Report</option>
</select>
<noscript><input type="submit" name="show" value="Show" /></noscript>
</dd>
@ -205,6 +206,10 @@ function updatepage(str) {
<li class="tt"><tt>#[word]#</tt></li>#{/words}#
</ol>
</fieldset>
:: <!-- 8 -->
<fieldset><legend>CitationReport</legend>
<iframe src="/api/citation.html?url=#[url]#" width="800" height="400" />
</fieldset>
#(/viewMode)#
</td></tr></table>

@ -75,6 +75,7 @@ public class ViewFile {
public static final int VIEW_MODE_AS_IFRAME_FROM_CACHE = 5;
public static final int VIEW_MODE_AS_LINKLIST = 6;
public static final int VIEW_MODE_AS_PARSED_WORDS = 7;
public static final int VIEW_MODE_AS_IFRAME_FROM_CITATION_REPORT = 8;
private static final String HIGHLIGHT_CSS = "searchHighlight";
private static final int MAX_HIGHLIGHTS = 6;
@ -218,6 +219,9 @@ public class ViewFile {
prop.put("viewMode_html", 1);
prop.put("viewMode_html_url", url.toNormalform(true));
}
} else if (viewMode.equals("iframeCitations")) {
prop.put("viewMode", VIEW_MODE_AS_IFRAME_FROM_CITATION_REPORT);
prop.put("viewMode_url", url.toNormalform(true));
} else if (viewMode.equals("parsed") || viewMode.equals("sentences") || viewMode.equals("words") || viewMode.equals("links")) {
// parsing the resource content
Document document = null;

Loading…
Cancel
Save