<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!--
This file was generated by Devel::Cover Version 1.26
Devel::Cover is copyright 2001-2012, Paul Johnson (paul@pjcj.net)
Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<meta http-equiv="Content-Language" content="en-us"></meta>
<link rel="stylesheet" type="text/css" href="cover.css"></link>
<link rel="stylesheet" type="text/css" href="cover.css"></link>
<title>File Coverage: lib/Yukki/Web/View/Page.pm</title>
</head>
<body>
<h1>File Coverage</h1>
<table>
<tr><td class="h" align="right">File:</td><td align="left">lib/Yukki/Web/View/Page.pm</td></tr>
<tr><td class="h" align="right">Coverage:</td><td align="left" class="c0">35.2%</td></tr>
</table>
<div><br/></div>
<table>
<tr><th>line</th><th>stmt</th><th>bran</th><th>cond</th><th>sub</th><th>pod</th><th>time</th><th>code</th></tr>
<tr><td class="h">1</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">package Yukki::Web::View::Page;</td></tr>
<tr><td class="h">2</td><td colspan="7"></td></tr><tr><td class="h">3</td><td><div class="c3">1</div><div class="c3">1</div></td><td></td><td></td><td><div class="c3"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L3">1</a></div></td><td></td><td><div>3348</div><div>10</div></td><td class="s">use v5.24;</td></tr>
<tr><td class="h">4</td><td><div class="c3">1</div><div class="c3">1</div><div class="c3">1</div></td><td></td><td></td><td><div class="c3"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L4">1</a></div></td><td></td><td><div>9</div><div>4</div><div>19</div></td><td class="s">use utf8;</td></tr>
<tr><td class="h">5</td><td><div class="c3">1</div><div class="c3">1</div><div class="c3">1</div></td><td></td><td></td><td><div class="c3"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L5">1</a></div></td><td></td><td><div>38</div><div>4</div><div>21</div></td><td class="s">use Moo;</td></tr>
<tr><td class="h">6</td><td colspan="7"></td></tr><tr><td class="h">7</td><td><div class="c3">1</div><div class="c3">1</div><div class="c3">1</div></td><td></td><td></td><td><div class="c3"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L7">1</a></div></td><td></td><td><div>588</div><div>4</div><div>20</div></td><td class="s">use Type::Utils;</td></tr>
<tr><td class="h">8</td><td colspan="7"></td></tr><tr><td class="h">9</td><td><div class="c3">1</div><div class="c3">1</div><div class="c3">1</div></td><td></td><td></td><td><div class="c3"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L9">1</a></div></td><td></td><td><div>1581</div><div>2</div><div>15</div></td><td class="s">use namespace::clean;</td></tr>
<tr><td class="h">10</td><td colspan="7"></td></tr><tr><td class="h">11</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">extends 'Yukki::Web::View';</td></tr>
<tr><td class="h">12</td><td colspan="7"></td></tr><tr><td class="h">13</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"># ABSTRACT: render HTML for viewing and editing wiki pages</td></tr>
<tr><td class="h">14</td><td colspan="7"></td></tr><tr><td class="h">15 - 19</td><td colspan="6"></td><td class="s"><pre>=head1 DESCRIPTION
Renders wiki pages.
=cut</pre></td></tr>
<tr><td class="h">20</td><td colspan="7"></td></tr><tr><td class="h">21</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">has blank_template => (</td></tr>
<tr><td class="h">22</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> is => 'ro',</td></tr>
<tr><td class="h">23</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> isa => class_type('Template::Pure'),</td></tr>
<tr><td class="h">24</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> lazy => 1,</td></tr>
<tr><td class="h">25</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> builder => '_build_blank_template',</td></tr>
<tr><td class="h">26</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">);</td></tr>
<tr><td class="h">27</td><td colspan="7"></td></tr><tr><td class="h">28</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub _build_blank_template {</td></tr>
<tr><td class="h">29</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> shift->prepare_template(</td></tr>
<tr><td class="h">30</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L30">0</a></div></td><td></td><td><div>0</div></td><td class="s"> template => 'page/blank.html',</td></tr>
<tr><td class="h">31</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> directives => [</td></tr>
<tr><td class="h">32</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#yukkiname' => 'page',</td></tr>
<tr><td class="h">33</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#create-page@href' => 'link',</td></tr>
<tr><td class="h">34</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#file-list' => 'attachments | encoded_string',</td></tr>
<tr><td class="h">35</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">36</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">37</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">38</td><td colspan="7"></td></tr><tr><td class="h">39</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">has view_template => (</td></tr>
<tr><td class="h">40</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> is => 'ro',</td></tr>
<tr><td class="h">41</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> isa => class_type('Template::Pure'),</td></tr>
<tr><td class="h">42</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> lazy => 1,</td></tr>
<tr><td class="h">43</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> builder => '_build_view_template',</td></tr>
<tr><td class="h">44</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">);</td></tr>
<tr><td class="h">45</td><td colspan="7"></td></tr><tr><td class="h">46</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub _build_view_template {</td></tr>
<tr><td class="h">47</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> shift->prepare_template(</td></tr>
<tr><td class="h">48</td><td><div class="c3">1</div></td><td></td><td></td><td><div class="c3"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L48">1</a></div></td><td></td><td><div>28</div></td><td class="s"> template => 'page/view.html',</td></tr>
<tr><td class="h">49</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> directives => [</td></tr>
<tr><td class="h">50</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#yukkitext' => 'html | encoded_string',</td></tr>
<tr><td class="h">51</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">52</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">53</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">54</td><td colspan="7"></td></tr><tr><td class="h">55</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">has history_template => (</td></tr>
<tr><td class="h">56</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> is => 'ro',</td></tr>
<tr><td class="h">57</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> isa => class_type('Template::Pure'),</td></tr>
<tr><td class="h">58</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> lazy => 1,</td></tr>
<tr><td class="h">59</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> builder => '_build_history_template',</td></tr>
<tr><td class="h">60</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">);</td></tr>
<tr><td class="h">61</td><td colspan="7"></td></tr><tr><td class="h">62</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub _build_history_template {</td></tr>
<tr><td class="h">63</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> shift->prepare_template(</td></tr>
<tr><td class="h">64</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => 'page/history.html',</td></tr>
<tr><td class="h">65</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> directives => [</td></tr>
<tr><td class="h">66</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> 'form@action' => 'form_action',</td></tr>
<tr><td class="h">67</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.revision' => {</td></tr>
<tr><td class="h">68</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> 'rev<-revisions' => [</td></tr>
<tr><td class="h">69</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.first-revision input@value' => 'rev.object_id',</td></tr>
<tr><td class="h">70</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.second-revision input@value' => 'rev.object_id',</td></tr>
<tr><td class="h">71</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.date' => 'rev.time_ago',</td></tr>
<tr><td class="h">72</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.author' => 'rev.author_name',</td></tr>
<tr><td class="h">73</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.diffstat' => '+={rev.lines_added}/-={rev.lines_removed}',</td></tr>
<tr><td class="h">74</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.comment' => 'rev.comment | default("(no comment)")',</td></tr>
<tr><td class="h">75</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.first-revision input' => sub {</td></tr>
<tr><td class="h">76</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L76">0</a></div></td><td></td><td><div>0</div></td><td class="s"> my ($t, $input, $vars) = @_;</td></tr>
<tr><td class="h">77</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $input->attr(checked => 'checked')</td></tr>
<tr><td class="h">78</td><td><div class="c0">0</div></td><td><div class="c0" title="-/-"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L78">0</a></div></td><td></td><td></td><td></td><td><div>0</div></td><td class="s"> if $vars->{index} == 2;</td></tr>
<tr><td class="h">79</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">80</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.second-revision input' => sub {</td></tr>
<tr><td class="h">81</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L81">0</a></div></td><td></td><td><div>0</div></td><td class="s"> my ($t, $input, $vars) = @_;</td></tr>
<tr><td class="h">82</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $input->attr(checked => 'checked')</td></tr>
<tr><td class="h">83</td><td><div class="c0">0</div></td><td><div class="c0" title="-/-"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L83">0</a></div></td><td></td><td></td><td></td><td><div>0</div></td><td class="s"> if $vars->{index} == 1;</td></tr>
<tr><td class="h">84</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">85</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L85">0</a></div></td><td></td><td><div>0</div></td><td class="s"> ],</td></tr>
<tr><td class="h">86</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">87</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">88</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">89</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">90</td><td colspan="7"></td></tr><tr><td class="h">91</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">has diff_template => (</td></tr>
<tr><td class="h">92</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> is => 'ro',</td></tr>
<tr><td class="h">93</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> isa => class_type('Template::Pure'),</td></tr>
<tr><td class="h">94</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> lazy => 1,</td></tr>
<tr><td class="h">95</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> builder => '_build_diff_template',</td></tr>
<tr><td class="h">96</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">);</td></tr>
<tr><td class="h">97</td><td colspan="7"></td></tr><tr><td class="h">98</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub _build_diff_template {</td></tr>
<tr><td class="h">99</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> shift->prepare_template(</td></tr>
<tr><td class="h">100</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L100">0</a></div></td><td></td><td><div>0</div></td><td class="s"> template => 'page/diff.html',</td></tr>
<tr><td class="h">101</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> directives => [</td></tr>
<tr><td class="h">102</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#diff' => 'html | encoded_string',</td></tr>
<tr><td class="h">103</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">104</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">105</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">106</td><td colspan="7"></td></tr><tr><td class="h">107</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">has edit_template => (</td></tr>
<tr><td class="h">108</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> is => 'ro',</td></tr>
<tr><td class="h">109</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> isa => class_type('Template::Pure'),</td></tr>
<tr><td class="h">110</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> lazy => 1,</td></tr>
<tr><td class="h">111</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> builder => '_build_edit_template',</td></tr>
<tr><td class="h">112</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">);</td></tr>
<tr><td class="h">113</td><td colspan="7"></td></tr><tr><td class="h">114</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub _build_edit_template {</td></tr>
<tr><td class="h">115</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> shift->prepare_template(</td></tr>
<tr><td class="h">116</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L116">0</a></div></td><td></td><td><div>0</div></td><td class="s"> template => 'page/edit.html',</td></tr>
<tr><td class="h">117</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> directives => [</td></tr>
<tr><td class="h">118</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#yukkiname' => 'page',</td></tr>
<tr><td class="h">119</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#yukkitext' => 'source',</td></tr>
<tr><td class="h">120</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#yukkitext_position@value' => 'position',</td></tr>
<tr><td class="h">121</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#preview-yukkitext' => 'html | encoded_string',</td></tr>
<tr><td class="h">122</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#attachments-list' => 'attachments | encoded_string',</td></tr>
<tr><td class="h">123</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">124</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">125</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">126</td><td colspan="7"></td></tr><tr><td class="h">127</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">has rename_template => (</td></tr>
<tr><td class="h">128</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> is => 'ro',</td></tr>
<tr><td class="h">129</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> isa => class_type('Template::Pure'),</td></tr>
<tr><td class="h">130</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> lazy => 1,</td></tr>
<tr><td class="h">131</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> builder => '_build_rename_template',</td></tr>
<tr><td class="h">132</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">);</td></tr>
<tr><td class="h">133</td><td colspan="7"></td></tr><tr><td class="h">134</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub _build_rename_template {</td></tr>
<tr><td class="h">135</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> shift->prepare_template(</td></tr>
<tr><td class="h">136</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L136">0</a></div></td><td></td><td><div>0</div></td><td class="s"> template => 'page/rename.html',</td></tr>
<tr><td class="h">137</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> directives => [</td></tr>
<tr><td class="h">138</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#yukkiname' => 'page',</td></tr>
<tr><td class="h">139</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#yukkiname_new@value' => 'page',</td></tr>
<tr><td class="h">140</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">141</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">142</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">143</td><td colspan="7"></td></tr><tr><td class="h">144</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">has remove_template => (</td></tr>
<tr><td class="h">145</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> is => 'ro',</td></tr>
<tr><td class="h">146</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> isa => class_type('Template::Pure'),</td></tr>
<tr><td class="h">147</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> lazy => 1,</td></tr>
<tr><td class="h">148</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> builder => '_build_remove_template',</td></tr>
<tr><td class="h">149</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">);</td></tr>
<tr><td class="h">150</td><td colspan="7"></td></tr><tr><td class="h">151</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub _build_remove_template {</td></tr>
<tr><td class="h">152</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> shift->prepare_template(</td></tr>
<tr><td class="h">153</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L153">0</a></div></td><td></td><td><div>0</div></td><td class="s"> template => 'page/remove.html',</td></tr>
<tr><td class="h">154</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> directives => [</td></tr>
<tr><td class="h">155</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.yukkiname' => 'page',</td></tr>
<tr><td class="h">156</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '#cancel_remove@href' => 'return_link',</td></tr>
<tr><td class="h">157</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">158</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">159</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">160</td><td colspan="7"></td></tr><tr><td class="h">161</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">has attachments_template => (</td></tr>
<tr><td class="h">162</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> is => 'ro',</td></tr>
<tr><td class="h">163</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> isa => class_type('Template::Pure'),</td></tr>
<tr><td class="h">164</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> lazy => 1,</td></tr>
<tr><td class="h">165</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> builder => '_build_attachments_template',</td></tr>
<tr><td class="h">166</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">);</td></tr>
<tr><td class="h">167</td><td colspan="7"></td></tr><tr><td class="h">168</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub _build_attachments_template {</td></tr>
<tr><td class="h">169</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> shift->prepare_template(</td></tr>
<tr><td class="h">170</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L170">0</a></div></td><td></td><td><div>0</div></td><td class="s"> template => 'page/attachments.html',</td></tr>
<tr><td class="h">171</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> directives => [</td></tr>
<tr><td class="h">172</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.file' => {</td></tr>
<tr><td class="h">173</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> 'file<-files' => [</td></tr>
<tr><td class="h">174</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '@id' => 'file.file_id',</td></tr>
<tr><td class="h">175</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.filename' => 'file.file_name | encoded_string',</td></tr>
<tr><td class="h">176</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.size' => 'file.file_size',</td></tr>
<tr><td class="h">177</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> '.action' => 'file.action | encoded_string',</td></tr>
<tr><td class="h">178</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">179</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">180</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> ],</td></tr>
<tr><td class="h">181</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">182</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">183</td><td colspan="7"></td></tr><tr><td class="h">184 - 191</td><td colspan="6"></td><td class="s"><pre>=head1 METHODS
=head2 blank
Renders a page that links to the edit page for this location. This helps you
create the links.
=cut</pre></td></tr>
<tr><td class="h">192</td><td colspan="7"></td></tr><tr><td class="h">193</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub blank {</td></tr>
<tr><td class="h">194</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L194">0</a></div></td><td><div class="c3">1</div></td><td><div>0</div></td><td class="s"> my ($self, $ctx, $vars) = @_;</td></tr>
<tr><td class="h">195</td><td colspan="7"></td></tr><tr><td class="h">196</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td><div>0</div></td><td class="s"> my $link = "/page/edit/$vars->{repository}/$vars->{page}";</td></tr>
<tr><td class="h">197</td><td colspan="7"></td></tr><tr><td class="h">198</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td><div>0</div></td><td class="s"> $ctx->response->page_title($vars->{title});</td></tr>
<tr><td class="h">199</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td><div>0</div></td><td class="s"> $ctx->response->breadcrumb($vars->{breadcrumb});</td></tr>
<tr><td class="h">200</td><td colspan="7"></td></tr><tr><td class="h">201</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $self->render_page(</td></tr>
<tr><td class="h">202</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => $self->blank_template,</td></tr>
<tr><td class="h">203</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">204</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> vars => {</td></tr>
<tr><td class="h">205</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> page => $vars->{page},</td></tr>
<tr><td class="h">206</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> link => $link,</td></tr>
<tr><td class="h">207</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td><div>0</div></td><td class="s"> attachments => $self->attachments($ctx, $vars->{files}),</td></tr>
<tr><td class="h">208</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">209</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">210</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">211</td><td colspan="7"></td></tr><tr><td class="h">212 - 216</td><td colspan="6"></td><td class="s"><pre>=head2 page_navigation
Sets up the page navigation menu.
=cut</pre></td></tr>
<tr><td class="h">217</td><td colspan="7"></td></tr><tr><td class="h">218</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub page_navigation {</td></tr>
<tr><td class="h">219</td><td><div class="c3">1</div></td><td></td><td></td><td><div class="c3"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L219">1</a></div></td><td><div class="c3">1</div></td><td><div>14</div></td><td class="s"> my ($self, $response, $this_action, $vars) = @_;</td></tr>
<tr><td class="h">220</td><td colspan="7"></td></tr><tr><td class="h">221</td><td><div class="c3">1</div></td><td></td><td></td><td></td><td></td><td><div>4</div></td><td class="s"> for my $action (qw( edit history rename remove )) {</td></tr>
<tr><td class="h">222</td><td><div class="c3">4</div></td><td><div class="c0" title="-/F"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L222">50</a></div></td><td></td><td></td><td></td><td><div>21</div></td><td class="s"> next if $action eq $this_action;</td></tr>
<tr><td class="h">223</td><td colspan="7"></td></tr><tr><td class="h">224</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $response->add_navigation_item([ qw( page page_bottom ) ] => {</td></tr>
<tr><td class="h">225</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> label => ucfirst $action,</td></tr>
<tr><td class="h">226</td><td><div class="c3">4</div></td><td></td><td></td><td></td><td></td><td><div>24</div></td><td class="s"> href => join('/', 'page', $action, $vars->{repository}, $vars->{page}),</td></tr>
<tr><td class="h">227</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> sort => 20,</td></tr>
<tr><td class="h">228</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> });</td></tr>
<tr><td class="h">229</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
<tr><td class="h">230</td><td colspan="7"></td></tr><tr><td class="h">231</td><td><div class="c3">1</div><div class="c3">1</div></td><td></td><td></td><td></td><td></td><td><div>7</div><div>38</div></td><td class="s"> for my $view_name (keys %{ $self->app->settings->page_views }) {</td></tr>
<tr><td class="h">232</td><td><div class="c3">3</div></td><td></td><td></td><td></td><td></td><td><div>55</div></td><td class="s"> my $view_info = $self->app->settings->page_views->{$view_name};</td></tr>
<tr><td class="h">233</td><td colspan="7"></td></tr><tr><td class="h">234</td><td><div class="c3">3</div></td><td><div class="c3" title="T/F"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L234">100</a></div></td><td></td><td></td><td></td><td><div>22</div></td><td class="s"> next if $view_info->{hide};</td></tr>
<tr><td class="h">235</td><td colspan="7"></td></tr><tr><td class="h">236</td><td><div class="c3">2</div></td><td></td><td></td><td></td><td></td><td><div>5</div></td><td class="s"> my $args = "?view=$view_name";</td></tr>
<tr><td class="h">237</td><td><div class="c3">2</div></td><td><div class="c3" title="T/F"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L237">100</a></div></td><td></td><td></td><td></td><td><div>6</div></td><td class="s"> $args = '' if $view_name eq 'default';</td></tr>
<tr><td class="h">238</td><td colspan="7"></td></tr><tr><td class="h">239</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $response->add_navigation_item([ qw( page page_bottom ) ] => {</td></tr>
<tr><td class="h">240</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> label => $view_info->{label},</td></tr>
<tr><td class="h">241</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> href => join('/', 'page/view', $vars->{repository}, $vars->{page})</td></tr>
<tr><td class="h">242</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> . $args,</td></tr>
<tr><td class="h">243</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> sort => $view_info->{sort},</td></tr>
<tr><td class="h">244</td><td><div class="c3">2</div></td><td></td><td></td><td></td><td></td><td><div>13</div></td><td class="s"> });</td></tr>
<tr><td class="h">245</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
<tr><td class="h">246</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">247</td><td colspan="7"></td></tr><tr><td class="h">248 - 252</td><td colspan="6"></td><td class="s"><pre>=head2 view
Renders a page as a view.
=cut</pre></td></tr>
<tr><td class="h">253</td><td colspan="7"></td></tr><tr><td class="h">254</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub view {</td></tr>
<tr><td class="h">255</td><td><div class="c3">1</div></td><td></td><td></td><td><div class="c3"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L255">1</a></div></td><td><div class="c3">1</div></td><td><div>6</div></td><td class="s"> my ($self, $ctx, $vars) = @_;</td></tr>
<tr><td class="h">256</td><td><div class="c3">1</div></td><td></td><td></td><td></td><td></td><td><div>5</div></td><td class="s"> my $file = $vars->{file};</td></tr>
<tr><td class="h">257</td><td colspan="7"></td></tr><tr><td class="h">258</td><td><div class="c3">1</div></td><td></td><td></td><td></td><td></td><td><div>54</div></td><td class="s"> $ctx->response->page_title($vars->{title});</td></tr>
<tr><td class="h">259</td><td><div class="c3">1</div></td><td></td><td></td><td></td><td></td><td><div>80</div></td><td class="s"> $ctx->response->breadcrumb($vars->{breadcrumb});</td></tr>
<tr><td class="h">260</td><td colspan="7"></td></tr><tr><td class="h">261</td><td><div class="c3">1</div></td><td></td><td></td><td></td><td></td><td><div>77</div></td><td class="s"> my $html = $file->fetch_formatted($ctx, -1);</td></tr>
<tr><td class="h">262</td><td colspan="7"></td></tr><tr><td class="h">263</td><td><div class="c3">1</div></td><td></td><td></td><td></td><td></td><td><div>26</div></td><td class="s"> $self->page_navigation($ctx->response, 'view', $vars);</td></tr>
<tr><td class="h">264</td><td colspan="7"></td></tr><tr><td class="h">265</td><td><div class="c3">1</div></td><td></td><td></td><td></td><td></td><td><div>23</div></td><td class="s"> return $self->render_page(</td></tr>
<tr><td class="h">266</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => $self->view_template,</td></tr>
<tr><td class="h">267</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">268</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> vars => {</td></tr>
<tr><td class="h">269</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> 'html' => $html,</td></tr>
<tr><td class="h">270</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">271</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">272</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">273</td><td colspan="7"></td></tr><tr><td class="h">274 - 278</td><td colspan="6"></td><td class="s"><pre>=head2 history
Display the history for a page.
=cut</pre></td></tr>
<tr><td class="h">279</td><td colspan="7"></td></tr><tr><td class="h">280</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub history {</td></tr>
<tr><td class="h">281</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L281">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $vars) = @_;</td></tr>
<tr><td class="h">282</td><td colspan="7"></td></tr><tr><td class="h">283</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->page_title($vars->{title});</td></tr>
<tr><td class="h">284</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->breadcrumb($vars->{breadcrumb});</td></tr>
<tr><td class="h">285</td><td colspan="7"></td></tr><tr><td class="h">286</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $self->page_navigation($ctx->response, 'history', $vars);</td></tr>
<tr><td class="h">287</td><td colspan="7"></td></tr><tr><td class="h">288</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $i = 0;</td></tr>
<tr><td class="h">289</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $self->render_page(</td></tr>
<tr><td class="h">290</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => $self->history_template,</td></tr>
<tr><td class="h">291</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">292</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> vars => {</td></tr>
<tr><td class="h">293</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> 'form_action' => join('/', '/page/diff', $vars->{repository}, $vars->{page}),</td></tr>
<tr><td class="h">294</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> 'revisions' => $vars->{revisions},</td></tr>
<tr><td class="h">295</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">296</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">297</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">298</td><td colspan="7"></td></tr><tr><td class="h">299 - 303</td><td colspan="6"></td><td class="s"><pre>=head2 diff
Display a diff for a file.
=cut</pre></td></tr>
<tr><td class="h">304</td><td colspan="7"></td></tr><tr><td class="h">305</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub diff {</td></tr>
<tr><td class="h">306</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L306">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $vars) = @_;</td></tr>
<tr><td class="h">307</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $file = $vars->{file};</td></tr>
<tr><td class="h">308</td><td colspan="7"></td></tr><tr><td class="h">309</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->page_title($vars->{title});</td></tr>
<tr><td class="h">310</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->breadcrumb($vars->{breadcrumb});</td></tr>
<tr><td class="h">311</td><td colspan="7"></td></tr><tr><td class="h">312</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $self->page_navigation($ctx->response, 'diff', $vars);</td></tr>
<tr><td class="h">313</td><td colspan="7"></td></tr><tr><td class="h">314</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $html = $file->fetch_formatted($ctx);</td></tr>
<tr><td class="h">315</td><td colspan="7"></td></tr><tr><td class="h">316</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $self->render_page(</td></tr>
<tr><td class="h">317</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => $self->diff_template,</td></tr>
<tr><td class="h">318</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">319</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> vars => {</td></tr>
<tr><td class="h">320</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> html => $html,</td></tr>
<tr><td class="h">321</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">322</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">323</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">324</td><td colspan="7"></td></tr><tr><td class="h">325 - 329</td><td colspan="6"></td><td class="s"><pre>=head2 edit
Renders the editor for a page.
=cut</pre></td></tr>
<tr><td class="h">330</td><td colspan="7"></td></tr><tr><td class="h">331</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub edit {</td></tr>
<tr><td class="h">332</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L332">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $vars) = @_;</td></tr>
<tr><td class="h">333</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $file = $vars->{file};</td></tr>
<tr><td class="h">334</td><td colspan="7"></td></tr><tr><td class="h">335</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->page_title($vars->{title});</td></tr>
<tr><td class="h">336</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->breadcrumb($vars->{breadcrumb});</td></tr>
<tr><td class="h">337</td><td colspan="7"></td></tr><tr><td class="h">338</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $html = $file->fetch_formatted($ctx, $vars->{position});</td></tr>
<tr><td class="h">339</td><td colspan="7"></td></tr><tr><td class="h">340</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $self->page_navigation($ctx->response, 'edit', $vars);</td></tr>
<tr><td class="h">341</td><td colspan="7"></td></tr><tr><td class="h">342</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $self->render_page(</td></tr>
<tr><td class="h">343</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => $self->edit_template,</td></tr>
<tr><td class="h">344</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">345</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> vars => {</td></tr>
<tr><td class="h">346</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> page => $vars->{page},</td></tr>
<tr><td class="h">347</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> source => scalar $vars->{file}->fetch // '',</td></tr>
<tr><td class="h">348</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> position => $vars->{position},</td></tr>
<tr><td class="h">349</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> html => $html,</td></tr>
<tr><td class="h">350</td><td><div class="c0">0</div></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--condition.html#L350">0</a></div></td><td></td><td></td><td></td><td class="s"> attachments => $self->attachments($ctx, $vars->{attachments}),</td></tr>
<tr><td class="h">351</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">352</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">353</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">354</td><td colspan="7"></td></tr><tr><td class="h">355 - 359</td><td colspan="6"></td><td class="s"><pre>=head2 rename
Renders the rename form for a page.
=cut</pre></td></tr>
<tr><td class="h">360</td><td colspan="7"></td></tr><tr><td class="h">361</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub rename {</td></tr>
<tr><td class="h">362</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L362">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $vars) = @_;</td></tr>
<tr><td class="h">363</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $file = $vars->{file};</td></tr>
<tr><td class="h">364</td><td colspan="7"></td></tr><tr><td class="h">365</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->page_title($vars->{title});</td></tr>
<tr><td class="h">366</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->breadcrumb($vars->{breadcrumb});</td></tr>
<tr><td class="h">367</td><td colspan="7"></td></tr><tr><td class="h">368</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $self->page_navigation($ctx->response, 'rename', $vars)</td></tr>
<tr><td class="h">369</td><td><div class="c0">0</div></td><td><div class="c0" title="-/-"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L369">0</a></div></td><td></td><td></td><td></td><td></td><td class="s"> unless $ctx->request->path_parameters->{file};</td></tr>
<tr><td class="h">370</td><td colspan="7"></td></tr><tr><td class="h">371</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $self->render_page(</td></tr>
<tr><td class="h">372</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => $self->rename_template,</td></tr>
<tr><td class="h">373</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">374</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> vars => {</td></tr>
<tr><td class="h">375</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> page => $vars->{page},</td></tr>
<tr><td class="h">376</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">377</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">378</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">379</td><td colspan="7"></td></tr><tr><td class="h">380 - 384</td><td colspan="6"></td><td class="s"><pre>=head2 remove
Renders the remove confirmation page.
=cut</pre></td></tr>
<tr><td class="h">385</td><td colspan="7"></td></tr><tr><td class="h">386</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub remove {</td></tr>
<tr><td class="h">387</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L387">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $vars) = @_;</td></tr>
<tr><td class="h">388</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $file = $vars->{file};</td></tr>
<tr><td class="h">389</td><td colspan="7"></td></tr><tr><td class="h">390</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->page_title($vars->{title});</td></tr>
<tr><td class="h">391</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $ctx->response->breadcrumb($vars->{breadcrumb});</td></tr>
<tr><td class="h">392</td><td colspan="7"></td></tr><tr><td class="h">393</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $self->page_navigation($ctx->response, 'remove', $vars)</td></tr>
<tr><td class="h">394</td><td><div class="c0">0</div></td><td><div class="c0" title="-/-"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L394">0</a></div></td><td></td><td></td><td></td><td></td><td class="s"> unless $ctx->request->path_parameters->{file};</td></tr>
<tr><td class="h">395</td><td colspan="7"></td></tr><tr><td class="h">396</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $self->render_page(</td></tr>
<tr><td class="h">397</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => $self->remove_template,</td></tr>
<tr><td class="h">398</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">399</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> vars => {</td></tr>
<tr><td class="h">400</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> page => $vars->{page},</td></tr>
<tr><td class="h">401</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return_link => $vars->{return_link},</td></tr>
<tr><td class="h">402</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">403</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">404</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">405</td><td colspan="7"></td></tr><tr><td class="h">406 - 410</td><td colspan="6"></td><td class="s"><pre>=head2 attachments
Renders the attachments table.
=cut</pre></td></tr>
<tr><td class="h">411</td><td colspan="7"></td></tr><tr><td class="h">412</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub attachments {</td></tr>
<tr><td class="h">413</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L413">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $attachments) = @_;</td></tr>
<tr><td class="h">414</td><td colspan="7"></td></tr><tr><td class="h">415</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $self->render(</td></tr>
<tr><td class="h">416</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> template => $self->attachments_template,</td></tr>
<tr><td class="h">417</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">418</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> vars => {</td></tr>
<tr><td class="h">419</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> files => @$attachments ? [ map {</td></tr>
<tr><td class="h">420</td><td><div class="c0">0</div><div class="c0">0</div></td><td><div class="c0" title="-/-"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L420">0</a></div></td><td></td><td></td><td></td><td></td><td class="s"> my @links = $self->attachment_links($ctx, $_);</td></tr>
<tr><td class="h">421</td><td colspan="7"></td></tr><tr><td class="h">422</td><td><div class="c0">0</div><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my %primary_link = %{ $links[0] };</td></tr>
<tr><td class="h">423</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $primary_link{label} = $_->file_name;</td></tr>
<tr><td class="h">424</td><td colspan="7"></td></tr><tr><td class="h">425</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $file_name = $self->render_links(</td></tr>
<tr><td class="h">426</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> context => $ctx,</td></tr>
<tr><td class="h">427</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> links => [ \%primary_link ],</td></tr>
<tr><td class="h">428</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">429</td><td colspan="7"></td></tr><tr><td class="h">430</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> {</td></tr>
<tr><td class="h">431</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> file_id => $_->file_id,</td></tr>
<tr><td class="h">432</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> file_name => $file_name,</td></tr>
<tr><td class="h">433</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> file_size => $_->formatted_file_size,</td></tr>
<tr><td class="h">434</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> action => $self->render_attachment_links($ctx, \@links),</td></tr>
<tr><td class="h">435</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
<tr><td class="h">436</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> } @$attachments ] : undef,</td></tr>
<tr><td class="h">437</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
<tr><td class="h">438</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
<tr><td class="h">439</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">440</td><td colspan="7"></td></tr><tr><td class="h">441 - 443</td><td colspan="6"></td><td class="s"><pre>=head2 attachment_links
=cut</pre></td></tr>
<tr><td class="h">444</td><td colspan="7"></td></tr><tr><td class="h">445</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub attachment_links {</td></tr>
<tr><td class="h">446</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L446">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $attachment) = @_;</td></tr>
<tr><td class="h">447</td><td colspan="7"></td></tr><tr><td class="h">448</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my @links;</td></tr>
<tr><td class="h">449</td><td colspan="7"></td></tr><tr><td class="h">450</td><td><div class="c0">0</div></td><td><div class="c0" title="-/-"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L450">0</a></div></td><td></td><td></td><td></td><td></td><td class="s"> if ($attachment->has_format) {</td></tr>
<tr><td class="h">451</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> push @links, {</td></tr>
<tr><td class="h">452</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> label => 'View',</td></tr>
<tr><td class="h">453</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> href => join('/', 'page', 'view',</td></tr>
<tr><td class="h">454</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->repository_name,</td></tr>
<tr><td class="h">455</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->full_path),</td></tr>
<tr><td class="h">456</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> };</td></tr>
<tr><td class="h">457</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
<tr><td class="h">458</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
<tr><td class="h">459</td><td><div class="c0">0</div></td><td><div class="c0" title="-/-"><a href="lib-Yukki-Web-View-Page-pm--branch.html#L459">0</a></div></td><td></td><td></td><td></td><td></td><td class="s"> push @links, {</td></tr>
<tr><td class="h">460</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> label => 'View',</td></tr>
<tr><td class="h">461</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> href => join('/', 'attachment', 'view',</td></tr>
<tr><td class="h">462</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->repository_name,</td></tr>
<tr><td class="h">463</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->full_path),</td></tr>
<tr><td class="h">464</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> } if $attachment->media_type ne 'application/octet';</td></tr>
<tr><td class="h">465</td><td colspan="7"></td></tr><tr><td class="h">466</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> push @links, {</td></tr>
<tr><td class="h">467</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> label => 'Download',</td></tr>
<tr><td class="h">468</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> href => join('/', 'attachment', 'download',</td></tr>
<tr><td class="h">469</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->repository_name,</td></tr>
<tr><td class="h">470</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->full_path),</td></tr>
<tr><td class="h">471</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> };</td></tr>
<tr><td class="h">472</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
<tr><td class="h">473</td><td colspan="7"></td></tr><tr><td class="h">474</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> push @links, {</td></tr>
<tr><td class="h">475</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> label => 'Rename',</td></tr>
<tr><td class="h">476</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> href => join('/', 'attachment', 'rename',</td></tr>
<tr><td class="h">477</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->repository_name,</td></tr>
<tr><td class="h">478</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->full_path),</td></tr>
<tr><td class="h">479</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> };</td></tr>
<tr><td class="h">480</td><td colspan="7"></td></tr><tr><td class="h">481</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> push @links, {</td></tr>
<tr><td class="h">482</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> label => 'Remove',</td></tr>
<tr><td class="h">483</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> href => join('/', 'attachment', 'remove',</td></tr>
<tr><td class="h">484</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->repository_name,</td></tr>
<tr><td class="h">485</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> $attachment->full_path),</td></tr>
<tr><td class="h">486</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s"> };</td></tr>
<tr><td class="h">487</td><td colspan="7"></td></tr><tr><td class="h">488</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return @links;</td></tr>
<tr><td class="h">489</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">490</td><td colspan="7"></td></tr><tr><td class="h">491 - 495</td><td colspan="6"></td><td class="s"><pre>=head2 render_attachment_links
Renders the links listed in the action column of the attachments table.
=cut</pre></td></tr>
<tr><td class="h">496</td><td colspan="7"></td></tr><tr><td class="h">497</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub render_attachment_links {</td></tr>
<tr><td class="h">498</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L498">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $links) = @_;</td></tr>
<tr><td class="h">499</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $self->render_links(context => $ctx, links => $links);</td></tr>
<tr><td class="h">500</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">501</td><td colspan="7"></td></tr><tr><td class="h">502 - 506</td><td colspan="6"></td><td class="s"><pre>=head2 preview
Renders a preview of an edit in progress.
=cut</pre></td></tr>
<tr><td class="h">507</td><td colspan="7"></td></tr><tr><td class="h">508</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">sub preview {</td></tr>
<tr><td class="h">509</td><td><div class="c0">0</div></td><td></td><td></td><td><div class="c0"><a href="lib-Yukki-Web-View-Page-pm--subroutine.html#L509">0</a></div></td><td><div class="c3">1</div></td><td></td><td class="s"> my ($self, $ctx, $vars) = @_;</td></tr>
<tr><td class="h">510</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $file = $vars->{file};</td></tr>
<tr><td class="h">511</td><td colspan="7"></td></tr><tr><td class="h">512</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> my $html = $file->fetch_formatted($ctx);</td></tr>
<tr><td class="h">513</td><td colspan="7"></td></tr><tr><td class="h">514</td><td><div class="c0">0</div></td><td></td><td></td><td></td><td></td><td></td><td class="s"> return $html;</td></tr>
<tr><td class="h">515</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h">516</td><td colspan="7"></td></tr><tr><td class="h">517</td><td></td><td></td><td></td><td></td><td></td><td></td><td class="s">1;</td></tr>
</table>
</body>
</html>