1 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
3 // Wait for image requests to come back first - $(function() {
4 $(window).load(function() {
5 $('#commit-tree .message').each(function() {
7 var filename = cell.parent().find('.file-name').text();
8 $.getJSON('/fragment/Gitalist/[% Commit.sha1 %]/file_commit_info/'+filename, {}, function(commitInfo) {
10 cell.html('<a href="/Gitalist/"'+commitInfo.sha1+'">'+commitInfo.comment+'</a>');
16 [% BLOCK tree_table_headfoot %]
17 [% SET cell = type == 'head' ? 'th' : 'td' %]
19 <[% cell %]>Mode</[% cell %]>
20 <[% cell %]>Folder / File</[% cell %]>
21 <[% cell %]>Actions</[% cell %]>
22 <[% cell %]>Message</[% cell %]>
29 # sort files and folders
31 SET tree_folders = [];
32 FOREACH item IN tree_list;
33 IF item.type == "blob";
34 tree_files.push(item);
36 tree_folders.push(item);
41 [% BLOCK output_tree %]
42 [% FOREACH item IN tree_type.sort('file') %]
43 <tr [% "class='invert'" IF counter % 2 %]>
44 <td class='file-mode'>[% item.modestr %]</td>
46 action_type = item.type == 'tree' ? 'tree' : 'blob';
47 action_for_link = item.type == 'tree' ? '/ref/tree' : '/ref/blob';
48 blob_or_tree_link = c.uri_for_action(action_for_link, c.req.captures, c.req.args.to_path(item.file))
50 <td class="file-name"><a href="[% blob_or_tree_link %]" class="[% item.type == 'blob' ? 'file' : 'folder' %]">[% item.file %]</a></td>
51 <td class='action-list'>
52 <a href="[% blob_or_tree_link %]">[% theact %]</a>
53 [% IF item.type == 'blob' %]
54 <a href="[% c.uri_for_action('/ref/blob', c.req.captures, c.req.args.to_path(item.file)) %]" title="Blob" class="button blob">Blob</a>
55 <a href="[% c.uri_for_action('/ref/raw', c.req.captures, c.req.args.to_path(item.file)) %]" title="Raw" class="button raw">raw</a>
56 <a href="[% c.uri_for_action('/ref/blame', c.req.captures, c.req.args.to_path(item.file)) %]" title="Blame" class="button blame">blame</a>
58 <a href="[% c.uri_for_action('/ref/history', c.req.captures, c.req.args.to_path(item.file)) %]" title="History (Short log)" class="button shortlog">Short log</a>
60 <td class="message">Loading commit info ...</td>
62 [% counter = counter + 1 %]
69 <table class="listing" id="commit-tree">
70 <thead>[% PROCESS tree_table_headfoot type = 'head' %]</thead>
72 [% INCLUDE output_tree tree_type => tree_folders %]
73 [% PROCESS output_tree tree_type => tree_files %]