-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathobject.html.ep
104 lines (95 loc) · 4.29 KB
/
object.html.ep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
% layout 'default',
% title => $report->identifier.' - '.$report->title,
% description => $report->identifier.', '.( $report->summary ? $report->stringify.' : '.$report->summary : $report->stringify);
% my $table = $object->meta->table;
<center>
<h2><%= join ' ', map ucfirst, split /_/, ($report->report_type_identifier || 'report') %> : <%= $report->identifier %>
</center>
%= include 'edit_buttons';
% my $numeric_link = begin
% my ($count,$what,$list_page) = @_;
% my $method = $what.'s';
% $list_page ||= 'list_all_'.$method;
% if ($count==1) {
% if ($method eq 'regions') {
<%= obj_link_to $report->get_publication->$method->[0] => 'show' => begin =%><%= pl($what,$count) =%><%= end =%>
% } else {
<%= obj_link_to $report->$method->[0] => 'show' => begin =%><%= pl($what,$count) =%><%= end =%>
% }
% } else {
<%= link_to $list_page, { report_identifier => $report->identifier } => begin =%><%= pl($what, $count) =%><%= end =%>
% }
% end
<div itemscope itemtype="http://schema.org/CreativeWork" class='row well'>
% my $pub = $report->get_publication;
<div class="col-md-12">
<h2 itemprop="name"><%= $report->title %></h2>
<h5><span itemprop="copyrightYear"><%= $report->publication_year %></span>
<%= labelize($report->report_type_identifier // '') %>
<small><%= $report->frequency ? "published every ".human_duration($report->frequency) : "" %></small></h5>
</div>
<div class="col-md-8 col-lg-8 col-sm-12 col-xs-12">
%= include 'h/contributors', object => $report, role_exclude => 'advisor';
</div>
<div class='pull-right col-lg-3 col-md-4 col-sm-12 col-xs-12' style='top:2px;'>
%= include 'h/thumbnail', pub => $pub;
%= include 'h/regions', obj => $report;
%= include 'h/keywords', obj => $report;
</div>
<div class="col-md-8 col-lg-8 col-sm-12 col-xs-12">
<p itemprop="description" class='linebreaks'><%= tbibs_to_links($report->summary) %></p>
% my ($chp, $fig, $fin,$tab, $ref, $img, $reg) = (
% $report->count_chapters,
% $report->count_figures,
% $report->count_findings,
% $report->count_tables,
% $report->reference_count,
% $report->count_images,
% $report->region_count
% );
% if ($fig > 0 && ($chp + $fin + $tab + $ref == 0)) {
<p>This report has <%== $numeric_link->($fig,'figure') %>
% if ($img > 0) { =%>
(<%= $numeric_link->($img => 'image', 'list_report_images'); %>).
% }
<br/>
% } elsif ($chp + $fig + $fin + $ref + $tab > 0) {
<p>
This report has
<%== $numeric_link->($chp => 'chapter', 'list_chapter') %>,
<%== $numeric_link->($fig => 'figure') %>
% if ($img > 0) {
(<%= $numeric_link->($img => 'image', 'list_report_images'); =%>)
<% } %>,
<%== $numeric_link->($fin => 'finding') %>,
<%== $numeric_link->($tab => 'table') %>
and
<%== $numeric_link->($ref => 'reference' => 'list_reference_report' ) %>.
<br/>
% }
% if ($reg > 0 ) {
This report covers <%== $numeric_link->($reg => 'region', 'list_report_regions') %>.
% }
</p>
% if (my $to = fix_url($report->url)) {
<p><%= link_to $to => target => "_blank" => begin %><%= $report->url %><%= end %></p>
% }
% if (my $doi = $report->doi) {
<p>DOI : <%= link_to "http://dx.doi.org/$doi" => target => "_blank" => begin %><%= $doi %><%= end %></p>
% }
%= include 'h/cited_by', pub => $pub;
%= include 'h/prov', pub => $pub;
% if (my $contact_note = $object->contact_note) {
% if (my $contact_email = $object->contact_email) {
% my $uri = $object->uri($self);
% $contact_note = b($contact_note)->xml_escape;
% $contact_note =~ s{\[([^]]+)\]}{<a href="mailto:$contact_email?subject=$uri">$1</a>};
% }
<div style='position:absolute;bottom:0px;'>
<i><%== $contact_note %></i>
</div>
% }
%= include 'h/other_identifiers', gcid => $report->uri($self)
</div>
</div>
<%= include 'h/other_formats'; =%>