git.fiddlerwoaroof.com
twig/commit.twig
ffc9d555
 {% extends 'layout_page.twig' %}
 
 {% set page = 'commits' %}
 
6933b58c
 {% block title %}
   GitList
 {% endblock %}
ffc9d555
 
 {% block content %}
6933b58c
   {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.hash}", path:''}]} %}
ffc9d555
 
6933b58c
   <div class="commit-view">
     <div class="commit-header">
       <span class="pull-right"><a class="btn btn-small" href="{{ path('branch', {repo: repo, branch: commit.hash}) }}" title="Browse code at this point in history"><i class="icon-list-alt"></i> Browse code</a></span>
       <h4>{{ commit.message }}</h4>
ffc9d555
     </div>
6933b58c
     <div class="commit-body">
       {% if commit.body is not empty %}
         <p>{{ commit.body | nl2br }}</p>
       {% endif %}
       <img src="https://gravatar.com/avatar/{{ commit.author.email | lower | md5 }}?s=32" class="pull-left space-right" />
       <span><a href="mailto:{{ commit.author.email }}">{{ commit.author.name }}</a> authored on {{ commit.date | format_date }}<br />Showing {{ commit.changedFiles }} changed files</span>
     </div>
   </div>
ffc9d555
 
6933b58c
   <ul class="commit-list">
ffc9d555
     {% for diff in commit.diffs %}
6933b58c
       <li><i class="icon-file"></i> <a href="#{{ loop.index }}">{{ diff.file }}</a> <span class="meta pull-right">{{ diff.index }}</span></li>
     {% endfor %}
   </ul>
 
   {% for diff in commit.diffs %}
ffc9d555
     <div class="source-view">
6933b58c
       <div class="source-header">
         <div class="meta"><a name="{{ loop.index }}">{{ diff.file }}</div>
ffc9d555
 
6933b58c
         <div class="btn-group pull-right">
           <a href="{{ path('commits', {repo: repo, commitishPath: commit.hash ~ '/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
           <a href="{{ path('blob', {repo: repo, commitishPath: commit.hash ~'/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-file"></i> View file @ {{ commit.shortHash }}</a>
ffc9d555
         </div>
6933b58c
       </div>
ffc9d555
 
6933b58c
       <div class="source-diff">
ffc9d555
         <table>
6933b58c
           {% for line in diff.getLines %}
ffc9d555
             <tr>
6933b58c
               <td class="lineNo">
                 {% if line.getType != 'chunk' %}
                   <a name="L{{ loop.index }}R{{ line.getNumOld }}"></a>
                   <a href="#L{{ loop.index }}L{{ line.getNumOld }}">
                 {% endif %}
                 {{ line.getNumOld }}
                 {% if line.getType != 'chunk' %}
                   </a>
                 {% endif %}
               </td>
               <td class="lineNo">
                 {% if line.getType != 'chunk' %}
                   <a name="L{{ loop.index }}L{{ line.getNumNew }}"></a>
                   <a href="#L{{ loop.index }}L{{ line.getNumNew }}">
                 {% endif %}
                 {{ line.getNumNew }}
                 {% if line.getType != 'chunk' %}
                   </a>
                 {% endif %}
               </td>
               <td style="width: 100%">
                 <pre{% if line.getType %} class="{{ line.getType }}"{% endif %}>{{ line.getLine }}</pre>
               </td>
ffc9d555
             </tr>
6933b58c
           {% endfor %}
ffc9d555
         </table>
6933b58c
       </div>
ffc9d555
     </div>
6933b58c
   {% endfor %}
ffc9d555
 {% endblock %}