gitprep / templates / main / blob.html.ep /
Newer Older
40 lines | 1.405kb
copy gitweblite soruce code
root authored on 2012-11-23
1
% layout 'common';
2
  %= include '/include/header', title => 'Blob', project => $project;
3
  %= include '/include/current_directory', home_ns => $home_ns, home => $home;
4
  %= include '/include/page_navi', current => 'blob', head_id => $id, project_ns => $project_ns;
5
  <div class="page_nav">
6
    <a href="<%= url_for('blob_plain', project => $project_ns, id_file => "$id/$file") %>">
7
      Raw
8
    </a>
9
    |
renamed gitpub to gitprep
Yuki Kimoto authored on 2012-11-26
10
    % my $head_id = gitprep_get_head_id($project);
copy gitweblite soruce code
root authored on 2012-11-23
11
    <a href="<%= url_for('blob', project => $project_ns, id_file => "HEAD/$file") %>">
12
      HEAD
13
    </a>
14
    <br/>
15
  </div>
16
  <div class="header">
17
  <a class="title" href= "<%= url_for('commit', project => $project_ns, id => $id) %>">
18
    <%= $commit->{title} %>
19
  </a>
20
  </div>
21

            
22
  %= include '/include/page_path', project_ns => $project_ns, id => $id, Path => $file, type => 'blob';
23

            
24
  <div class="page_body">
25
    % if ($mimetype =~ m#^image/#) {
26
      <img type="<%= $mimetype %>
27
        % if (defined $file) {
28
          alt="<%= $file %>" title="<%= $file %>"
29
        % }
30
        src="<%= url_for('blob_plain', project => $project_ns, id_file => "$id/$file") %>"
31
      />
32
    % } else {
33
      % my $nr = 1;
34
      % for my $line (@$lines) {
35
        % my $nr4 = sprintf("%4i", $nr);
36
        <div class="pre"><a id="l<%= $nr %>" href="<%#l<%= $nr %>" class="linenr"><%= $nr4 %></a> <%= $line %></div>
37
        % $nr++;
38
      % }
39
    % }
40
  </div>