gitgo 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/History +44 -0
  2. data/License.txt +22 -0
  3. data/README +45 -0
  4. data/bin/gitgo +4 -0
  5. data/lib/gitgo.rb +1 -0
  6. data/lib/gitgo/app.rb +63 -0
  7. data/lib/gitgo/controller.rb +89 -0
  8. data/lib/gitgo/controllers/code.rb +198 -0
  9. data/lib/gitgo/controllers/issue.rb +76 -0
  10. data/lib/gitgo/controllers/repo.rb +186 -0
  11. data/lib/gitgo/controllers/wiki.rb +19 -0
  12. data/lib/gitgo/document.rb +680 -0
  13. data/lib/gitgo/document/invalid_document_error.rb +34 -0
  14. data/lib/gitgo/documents/comment.rb +20 -0
  15. data/lib/gitgo/documents/issue.rb +56 -0
  16. data/lib/gitgo/git.rb +941 -0
  17. data/lib/gitgo/git/tree.rb +315 -0
  18. data/lib/gitgo/git/utils.rb +59 -0
  19. data/lib/gitgo/helper.rb +3 -0
  20. data/lib/gitgo/helper/doc.rb +28 -0
  21. data/lib/gitgo/helper/form.rb +88 -0
  22. data/lib/gitgo/helper/format.rb +200 -0
  23. data/lib/gitgo/helper/html.rb +19 -0
  24. data/lib/gitgo/helper/utils.rb +85 -0
  25. data/lib/gitgo/index.rb +421 -0
  26. data/lib/gitgo/index/idx_file.rb +119 -0
  27. data/lib/gitgo/index/sha_file.rb +135 -0
  28. data/lib/gitgo/patches/grit.rb +47 -0
  29. data/lib/gitgo/repo.rb +626 -0
  30. data/lib/gitgo/repo/graph.rb +333 -0
  31. data/lib/gitgo/repo/node.rb +122 -0
  32. data/lib/gitgo/rest.rb +87 -0
  33. data/lib/gitgo/server.rb +114 -0
  34. data/lib/gitgo/version.rb +8 -0
  35. data/public/css/gitgo.css +24 -0
  36. data/public/javascript/gitgo.js +148 -0
  37. data/public/javascript/jquery-1.4.2.min.js +154 -0
  38. data/views/app/index.erb +4 -0
  39. data/views/app/timeline.erb +27 -0
  40. data/views/app/welcome.erb +13 -0
  41. data/views/code/_comment.erb +10 -0
  42. data/views/code/_comment_form.erb +14 -0
  43. data/views/code/_comments.erb +5 -0
  44. data/views/code/_commit.erb +25 -0
  45. data/views/code/_grepnav.erb +5 -0
  46. data/views/code/_treenav.erb +3 -0
  47. data/views/code/blob.erb +6 -0
  48. data/views/code/commit_grep.erb +35 -0
  49. data/views/code/commits.erb +11 -0
  50. data/views/code/diff.erb +10 -0
  51. data/views/code/grep.erb +32 -0
  52. data/views/code/index.erb +17 -0
  53. data/views/code/obj/blob.erb +4 -0
  54. data/views/code/obj/commit.erb +25 -0
  55. data/views/code/obj/tag.erb +25 -0
  56. data/views/code/obj/tree.erb +9 -0
  57. data/views/code/tree.erb +9 -0
  58. data/views/error.erb +19 -0
  59. data/views/issue/_issue.erb +15 -0
  60. data/views/issue/_issue_form.erb +39 -0
  61. data/views/issue/edit.erb +11 -0
  62. data/views/issue/index.erb +28 -0
  63. data/views/issue/new.erb +5 -0
  64. data/views/issue/show.erb +27 -0
  65. data/views/layout.erb +34 -0
  66. data/views/not_found.erb +1 -0
  67. data/views/repo/fsck.erb +29 -0
  68. data/views/repo/help.textile +5 -0
  69. data/views/repo/help/faq.textile +19 -0
  70. data/views/repo/help/howto.textile +31 -0
  71. data/views/repo/help/trouble.textile +28 -0
  72. data/views/repo/idx.erb +29 -0
  73. data/views/repo/index.erb +72 -0
  74. data/views/repo/status.erb +16 -0
  75. data/views/wiki/index.erb +3 -0
  76. metadata +253 -0
@@ -0,0 +1,4 @@
1
+ <h1>Gitgo</h1>
2
+ <ul>
3
+ <li><a href="<%= form.url('timeline') %>">Timeline</a></li>
4
+ </ul>
@@ -0,0 +1,27 @@
1
+ <h1>Timeline<% unless author.nil? %> for <%= escape_html(author.empty? ? 'unknown' : author) %><% end %></h1>
2
+ <ul>
3
+ <li class="newer"><% if docs && page >= 1 %><a href="<%= url('timeline') %>?<%= build_query(:author => author, :page => page - 1, :per_page => per_page) %>">newer</a><% else %>(newer)<% end %></li>
4
+ <li class="older"><% if docs && docs.length == per_page %><a href="<%= url('timeline') %>?<%= build_query(:author => author, :page => page + 1, :per_page => per_page) %>">older</a><% else %>(older)<% end %></li>
5
+ </ul>
6
+
7
+ <ul>
8
+ <li><a href="<%= url('timeline') %>">All Authors</a></li><% authors.each do |author| %>
9
+ <li><a href="<%= url('timeline') %>?<%= build_query(:author => author) %>"><%= escape_html(author) %></a></li><% end %>
10
+ </ul>
11
+
12
+ <ul class="timeline"><% if docs.empty? %>
13
+ <li>No activity yet...</li><% else %><% docs.reverse_each do |doc| %>
14
+ <li>
15
+ <dl active="<%= doc.active?(active_sha) %>">
16
+ <dt class="type"><% if doc.graph_head? %>New <% end %><%= doc.type.capitalize %></dt><% if doc.type == 'issue' %>
17
+ <dd class="type"><%= format.issue_a doc %></dd>
18
+ <dt class="tags">Tags</dt>
19
+ <dd class="tags"><%= format.tags doc.tags %></dd><% else %>
20
+ <dd class="type"><%= format.doc_a doc %></dd><% end %>
21
+ <dt class="author">Author</dt>
22
+ <dd class="author"><%= format.author doc.author %></dd>
23
+ <dt class="date">Date</dt>
24
+ <dd class="date"><%= format.date doc.date %></dd>
25
+ </dl>
26
+ </li><% end %><% end %>
27
+ </ul>
@@ -0,0 +1,13 @@
1
+ <h1>Gitgo</h1>
2
+
3
+ <p>Welcome! Gitgo will store data on the '<%= branch %>' branch.</p><% unless remotes.empty? %>
4
+ <p>Select a remote to setup tracking (you can change this on the <a href="<%= form.url('repo') %>">repo</a> page):</p>
5
+
6
+ <form action="<%= form.url('repo', 'setup') %>" method="post">
7
+ <input type="hidden" name="redirect" value="<%= form.url %>">
8
+ <select name="upstream_branch"><% form.each_ref_name(remotes, Gitgo::Git::DEFAULT_UPSTREAM_BRANCH) do |value, selection, content| %>
9
+ <option value="<%= value %>"<%= html.select(selection) %>><%= content %></option><% end %>
10
+ </select>
11
+ <input type="submit" value="Setup" />
12
+ </form>
13
+ <% end %>
@@ -0,0 +1,10 @@
1
+
2
+ <dl class="comment">
3
+ <dt class="content">Comment <%= format.sha_a comment.sha %></dt>
4
+ <dd class="content"><%= format.content comment.content %></dd>
5
+ <dt class="author">Author</dt>
6
+ <dd class="author"><%= format.author comment.author %></dd>
7
+ <dt class="date">Date</dt>
8
+ <dd class="date"><%= format.date comment.date %></dd>
9
+ </dl>
10
+ <% if comment[:tail] %><%= erb(:_comment_form, :locals => {:sha => comment['re'], :parent => comment.sha}, :layout => false) %><% end %>
@@ -0,0 +1,14 @@
1
+
2
+ <form class="comment" action="<%= parent ? url('comments', sha, parent) : url('comments', sha) %>" method="post">
3
+ <input type="hidden" name="redirect" value="<%= request.env['REQUEST_URI'] %>" />
4
+
5
+ <dl class="form">
6
+ <dt><label for="content">Comment</label></dt>
7
+ <dd><textarea id="content" name="content"></textarea></dd>
8
+ <dt><label for="commit">Commit</label></dt>
9
+ <dd><input id="commit" type="checkbox" name="commit" value="true" checked="true"/></dd>
10
+ <dt><input type="submit" value="Comment" /></dt>
11
+ <dd></dd>
12
+ </dl>
13
+ </form>
14
+
@@ -0,0 +1,5 @@
1
+
2
+ <ul><% comments.each do |comment|; if comment.kind_of?(Array) %>
3
+ <li><%= erb :_comments, :locals => {:comments => comment}, :layout => false %></li><% else %>
4
+ <li><%= erb :_comment, :locals => {:comment => comment}, :layout => false %></li><% end;end %>
5
+ </ul>
@@ -0,0 +1,25 @@
1
+
2
+ <div class="commit">
3
+ <dl class="commit">
4
+ <dt class="message">Message</dt>
5
+ <dd class="message"><%= format.text commit.message %></dd>
6
+ <dt class="author">Author</dt>
7
+ <dd class="author"><%= format.author commit.author %></dd>
8
+ <dt class="author-date">Authored Date</dt>
9
+ <dd class="author-date"><%= format.date commit.authored_date %></dd><% if commit.author.to_s != commit.committer.to_s %>
10
+ <dt class="committer">Committer</dt>
11
+ <dd class="committer"><%= format.author commit.committer %></dd>
12
+ <dt class="committed-date">Committed Date</dt>
13
+ <dd class="committed-date"><%= format.date commit.committed_date %></dd><% end %>
14
+ <dt class="sha">Commit</dt>
15
+ <dd class="sha"><%= format.commit_a commit.sha %></dd>
16
+ <dt class="tree">Tree</dt>
17
+ <dd class="tree"><%= format.tree_a commit.sha %></dd>
18
+ <dt class="parents">Parents</dt>
19
+ <dd class="parents">
20
+ <ul class="parents"><% commit.parents.each do |parent| %>
21
+ <li class="parent"><a><%= format.commit_a parent.sha %></li><% end %>
22
+ </ul>
23
+ </dd>
24
+ </dl>
25
+ </div>
@@ -0,0 +1,5 @@
1
+ <ul>
2
+ <li><a href="/blob">blobs</a></li>
3
+ <li><a href="/tree">trees</a></li>
4
+ <li><a href="/commit">commits</a></li>
5
+ </ul>
@@ -0,0 +1,3 @@
1
+ <ul class="treenav"><% format.each_path(treeish, path) do |link| %>
2
+ <li><%= link %></li><% end %>
3
+ </ul>
@@ -0,0 +1,6 @@
1
+ <%= erb :_commit, :locals => {:commit => commit }, :layout => false %>
2
+ <%= erb :_treenav, :locals => {:treeish => treeish, :path => path}, :layout => false %>
3
+
4
+ <div class="blob">
5
+ <pre class="content"><%= escape_html blob.data %></pre>
6
+ </div>
@@ -0,0 +1,35 @@
1
+ <h1>Search Commits</h1>
2
+ <% unless Gitgo::Git.version_ok? %>
3
+ <em>warning the version of git on the server is insufficient for this action (must be <%= Gitgo::Git::GIT_VERSION.join('.') %>, but is <%= git.version.join('.') %>)</em>
4
+ <% end %>
5
+ <%= erb :_grepnav, :layout => false %>
6
+
7
+ <form class="grep" action="<%= form.url('commit') %>" method="get">
8
+ <dl class="form">
9
+ <dt><label for="author">Author</label></dt>
10
+ <dd><input id="author" type="text" name="author" value="<%= form.author_value author %>" /></dd>
11
+ <dt><label for="committer">Committer</label></dt>
12
+ <dd><input id="committer" type="text" name="committer" value="<%= form.author_value committer %>" /></dd>
13
+ <dt><label for="grep">Message</label></dt>
14
+ <dd><input id="grep" type="text" name="grep" value="<%= form.value grep %>" /></dd>
15
+ <dt><label for="ignore_case">Case-Insensitive</label></dt>
16
+ <dd><input id="ignore_case" type="checkbox" name="regexp_ignore_case " value="true" <%= html.check(regexp_ignore_case) %>/></dd>
17
+ <dt><label for="fixed_strings">Fixed Strings</label></dt>
18
+ <dd><input id="fixed_strings" type="checkbox" name="fixed_strings" value="true" <%= html.check(fixed_strings) %>/></dd>
19
+ <dt><label for="all_match">All Match</label></dt>
20
+ <dd><input id="all_match" type="checkbox" name="all_match" value="true" <%= html.check(all_match) %>/></dd>
21
+ <dt><label for="max_count">Max Count</label></dt>
22
+ <dd><input id="max_count" type="text" name="max_count" value="<%= form.value max_count %>" /></dd>
23
+ <dt><input type="submit" value="Grep" /></dt>
24
+ <dd></dd>
25
+ </dl>
26
+ </form>
27
+
28
+ <% if selected.empty? %><em>None selected!</em><% end %>
29
+ <table><% selected.each do |commit| %>
30
+ <tr>
31
+ <td><%= format.author commit.author %></td>
32
+ <td><%= format.commit_a commit.sha %></a></td>
33
+ <td><%= format.text commit.message %></td>
34
+ </tr><% end %>
35
+ </table>
@@ -0,0 +1,11 @@
1
+ <h1>Commits</h1>
2
+ <ul class="commitnav">
3
+ <li class="newer"><% if page >= 1 %><a href="<%= url('commits', treeish) %>?<%= build_query(:page => page - 1, :per_page => per_page) %>">newer</a><% else %>(newer)<% end %></li>
4
+ <li class="older"><% if commits.length == per_page %><a href="<%= url('commits', treeish) %>?<%= build_query(:page => page + 1, :per_page => per_page) %>">older</a><% else %>(older)<% end %></li>
5
+ </ul>
6
+
7
+ <div class="commits">
8
+ <ul class="commits"><% commits.each do |commit| %>
9
+ <li><%= erb :_commit, :locals => {:commit => commit}, :layout => false %></li><% end %>
10
+ </ul>
11
+ </div>
@@ -0,0 +1,10 @@
1
+ <%= erb :_commit, :locals => {:commit => commit}, :layout => false %>
2
+ <div class="diff">
3
+ <ul class="diff"><% commit.diffs.each do |diff| %><% if diff.new_file %>
4
+ <li class="add"><%= escape_html(diff.b_path) %></li><% elsif diff.deleted_file %>
5
+ <li class="rm"><%= escape_html(diff.a_path) %></li><% else %>
6
+ <li class="diff">
7
+ <pre><%= escape_html(diff.diff) %></pre>
8
+ </li><% end %><% end %>
9
+ </ul>
10
+ </div>
@@ -0,0 +1,32 @@
1
+ <h1>Search <%= escape_html(type.capitalize) %>s</h1>
2
+
3
+ <%= erb :_grepnav, :layout => false %>
4
+
5
+ <form class="grep" action="<%= url(type) %>" method="get">
6
+ <dl class="form">
7
+ <dt><label for="pattern">Pattern</label></dt>
8
+ <dd><input id="pattern" type="text" name="pattern" value="<%= form.value e %>" /></dd>
9
+ <dt><label for="ignore_case">Case-Insensitive</label></dt>
10
+ <dd><input id="ignore_case" type="checkbox" name="ignore_case" value="true" <%= html.check(ignore_case) %>/></dd>
11
+ <dt><label for="invert_match">Invert Match</label></dt>
12
+ <dd><input id="invert_match" type="checkbox" name="invert_match" value="true" <%= html.check(invert_match) %>/></dd>
13
+ <dt><label for="fixed_strings">Fixed Strings</label></dt>
14
+ <dd><input id="fixed_strings" type="checkbox" name="fixed_strings" value="true" <%= html.check(fixed_strings) %>/></dd>
15
+ <dt><label for="at">At</label></dt>
16
+ <dd>
17
+ <select id="at" name="at"><% form.each_ref(refs, grit.head.name) do |value, selection, content| %>
18
+ <option value="<%= value %>"<%= html.select(selection) %>><%= content %></option><% end %>
19
+ <option value="">(none)</option>
20
+ </select>
21
+ </dd>
22
+ <dt><input type="submit" value="Grep" /></dt>
23
+ <dd></dd>
24
+ </dl>
25
+ </form>
26
+
27
+ <% if selected.empty? %><em>None selected!</em><% end %>
28
+ <table><% selected.each do |(path, obj)| %>
29
+ <tr>
30
+ <td><%= format.full_path_a('blob', at, path) %></td>
31
+ </tr><% end %>
32
+ </table>
@@ -0,0 +1,17 @@
1
+ <h1>Code</h1>
2
+ <div class="code">
3
+ <h3>Search</h3>
4
+ <%= erb :_grepnav, :layout => false %>
5
+
6
+ <h3>Branches</h3><% if branches.empty? %>
7
+ <em>No branches yet.</em><% end %>
8
+ <ul><% branches.each do |ref| %>
9
+ <li><%= format.tree_a ref.name %> (<%= format.history_a ref.name %>)</li><% end %>
10
+ </ul>
11
+
12
+ <h3>Tags</h3><% if tags.empty? %>
13
+ <em>No tags yet.</em><% end %>
14
+ <ul><% tags.each do |ref| %>
15
+ <li><%= format.tree_a ref.name %> (<%= format.history_a ref.name %>)</li><% end %>
16
+ </ul>
17
+ </div>
@@ -0,0 +1,4 @@
1
+ <h2>Blob <%= format.sha_a sha %></h2>
2
+ <div class="blob">
3
+ <pre class="content"><%= escape_html obj.data %></pre>
4
+ </div>
@@ -0,0 +1,25 @@
1
+ <h2>Commit <%= format.sha_a sha %></h2>
2
+ <div class="commit">
3
+ <dl class="commit">
4
+ <dt class="message">Message</dt>
5
+ <dd class="message"><%= format.text obj.message %></dd>
6
+ <dt class="author">Author</dt>
7
+ <dd class="author"><%= format.author obj.author %></dd>
8
+ <dt class="author-date">Authored Date</dt>
9
+ <dd class="author-date"><%= format.date obj.authored_date %></dd><% if obj.author.to_s != obj.committer.to_s %>
10
+ <dt class="committer">Committer</dt>
11
+ <dd class="committer"><%= format.author obj.committer %></dd>
12
+ <dt class="committed-date">Committed Date</dt>
13
+ <dd class="committed-date"><%= format.date obj.committed_date %></dd><% end %>
14
+ <dt class="sha">Commit</dt>
15
+ <dd class="sha"><%= format.sha_a obj.sha %></dd>
16
+ <dt class="tree">Tree</dt>
17
+ <dd class="tree"><%= format.sha_a obj.tree.id %></dd>
18
+ <dt class="parents">Parents</dt>
19
+ <dd class="parents">
20
+ <ul class="parents"><% obj.parents.each do |parent| %>
21
+ <li class="parent"><a><%= format.commit_a parent.sha %></li><% end %>
22
+ </ul>
23
+ </dd>
24
+ </dl>
25
+ </div>
@@ -0,0 +1,25 @@
1
+ <h2>Tag <%= format.sha_a sha %></h2><% commit = obj.commit %>
2
+ <div class="tag">
3
+ <dl class="tag">
4
+ <dt class="message">Message</dt>
5
+ <dd class="message"><%= format.text commit.message %></dd>
6
+ <dt class="author">Author</dt>
7
+ <dd class="author"><%= format.author commit.author %></dd>
8
+ <dt class="author-date">Authored Date</dt>
9
+ <dd class="author-date"><%= format.date commit.authored_date %></dd><% if commit.author.to_s != commit.committer.to_s %>
10
+ <dt class="committer">Committer</dt>
11
+ <dd class="committer"><%= format.author commit.committer %></dd>
12
+ <dt class="committed-date">Committed Date</dt>
13
+ <dd class="committed-date"><%= format.date commit.committed_date %></dd><% end %>
14
+ <dt class="sha">Commit</dt>
15
+ <dd class="sha"><%= format.sha_a commit.sha %></dd>
16
+ <dt class="tree">Tree</dt>
17
+ <dd class="tree"><%= format.sha_a commit.tree.id %></dd>
18
+ <dt class="parents">Parents</dt>
19
+ <dd class="parents">
20
+ <ul class="parents"><% commit.parents.each do |parent| %>
21
+ <li class="parent"><a><%= format.commit_a parent.sha %></li><% end %>
22
+ </ul>
23
+ </dd>
24
+ </dl>
25
+ </div>
@@ -0,0 +1,9 @@
1
+ <h2>Tree <%= format.sha_a sha %></h2>
2
+ <div class="tree">
3
+ <table><% obj.contents.each do |content| %>
4
+ <tr>
5
+ <td><%= content.name %></td>
6
+ <td><%= format.sha_a content.id %></td>
7
+ </tr><% end %>
8
+ </table>
9
+ </div>
@@ -0,0 +1,9 @@
1
+ <%= erb :_commit, :locals => {:commit => commit }, :layout => false %>
2
+ <%= erb :_treenav, :locals => {:treeish => treeish, :path => path}, :layout => false %>
3
+
4
+ <div class="tree">
5
+ <ul class="contents"><% tree.contents.each do |obj| %><% if obj.kind_of?(Grit::Tree) %>
6
+ <li class="tree"><%= format.tree_a(treeish, path, obj.name) %></li><% else %>
7
+ <li class="blob"><%= format.blob_a(treeish, path, obj.name) %></li><% end %><% end %>
8
+ </ul>
9
+ </div>
@@ -0,0 +1,19 @@
1
+ <h1>Server Error:</h1>
2
+
3
+ <dl>
4
+ <dt><%= escape_html(err.class) %></dt>
5
+ <dd><pre><%= escape_html(err.message) %></pre></dd><% if resetable %>
6
+ <dt></dt>
7
+ <dd>
8
+ Errors of this type can occur when the repository has been invalidated,
9
+ for example by a 'git gc' performed on the command line. Try reseting
10
+ gitgo, or simply restart the server.
11
+
12
+ <form action="<%= url('repo', 'reset') %>" method="post">
13
+ <input type="hidden" name="full" value="true" />
14
+ <input type="submit" value="Reset" />
15
+ </form>
16
+ </dd><% end %>
17
+ <dt>Backtrace</dt>
18
+ <dd><pre><%= escape_html(err.backtrace.join("\n")) %></pre></dd>
19
+ </dl>
@@ -0,0 +1,15 @@
1
+
2
+ <dl class="issue" id="<%= doc.sha %>" active="<%= doc.active?(active_sha) %>">
3
+ <dt class="content"><%= doc.graph_head? ? 'Description' : 'Comment' %></dt>
4
+ <dd class="content"><%= format.content doc.content %></dd>
5
+ <dt class="tags">Tags</dt>
6
+ <dd class="tags"><%= format.tags doc.tags %></dd>
7
+ <dt class="author">Author</dt>
8
+ <dd class="author"><%= format.author doc.author %></dd>
9
+ <dt class="date">Date</dt>
10
+ <dd class="date"><%= format.date doc.date %></dd>
11
+ <dt class="at">At</dt>
12
+ <dd class="at"><%= format.at doc.at %></dd><% if doc.saved? %>
13
+ <dt class="edit"><a href="<%= format.url('issue', doc.sha, 'edit') %>">Edit</a></dt>
14
+ <dd></dd><% end %>
15
+ </dl>
@@ -0,0 +1,39 @@
1
+
2
+
3
+ <div class="preview"><% if preview? %>
4
+ <dl><% if parents.empty? %>
5
+ <dt class="title">Title</dt>
6
+ <dd class="title"><%= format.title doc.title %></dd><% end %>
7
+ <dt class="content">Description</dt>
8
+ <dd class="content"><%= format.content doc.content %></dd>
9
+ <dt class="tags">Tags</dt>
10
+ <dd class="tags"><%= format.tags doc.tags %></dd>
11
+ <dt class="at">At</dt>
12
+ <dd class="at"><%= format.at doc.at %></dd>
13
+ </dl>
14
+ </div><% end %><% parents.each do |sha| %>
15
+ <input type="hidden" name="parents[]" value="<%= form.value sha %>" /><% end %>
16
+
17
+ <dl><% if parents.empty? %>
18
+ <dt><label for="title">Title</label></dt>
19
+ <dd><input id="title" type="text" name="doc[title]" value="<%= form.title_value doc.title %>" /></dd><% end %>
20
+ <dt><label for="content"><%= parents.empty? ? 'Description' : 'Comment' %></label></dt>
21
+ <dd><textarea id="content" name="doc[content]"><%= form.content_value doc.content %></textarea></dd>
22
+ <dt><label for="tags">Tags</label></dt>
23
+ <dd>
24
+ <ul><% form.each_tag(tags, *doc.tags) do |value, selection, content| %>
25
+ <li><input type="checkbox" name="doc[tags][]" value="<%= value %>"<%= html.check(selection) %>><%= content %></input></li><% end %>
26
+ <li><input type="input" name="doc[tags][]" /></li>
27
+ </ul>
28
+ </dd>
29
+ <dt><label for="at">At</label></dt>
30
+ <dd>
31
+ <select id="at" name="doc[at]"><% form.each_ref_name(repo.git.grit.refs, doc.at) do |value, selection, content| %>
32
+ <option value="<%= value %>"<%= html.select(selection) %>><%= content %></option><% end %>
33
+ </select>
34
+ </dd>
35
+ <dt><label for="preview">Preview</label></dt>
36
+ <dd><input id="preview" type="checkbox" name="preview" value="true"/></dd>
37
+ <dt><input type="submit" value="<%= parents.empty? && !doc.saved? ? 'Create' : 'Update' %>" /></dt>
38
+ <dd></dd>
39
+ </dl>
@@ -0,0 +1,11 @@
1
+ <h1>Issue <%= format.sha_a doc.sha %></h1>
2
+
3
+ <form action="<%= form.url('issue', doc.sha) %>" method="post">
4
+ <input type="hidden" name="_method" value="update"/>
5
+ <%= erb :_issue_form, :locals => {:doc => doc, :parents => doc.node.parents }, :layout => false %>
6
+ </form>
7
+
8
+ <form action="<%= form.url('issue', doc.sha) %>" method="post">
9
+ <input type="hidden" name="_method" value="delete"/>
10
+ <input type="submit" value="Delete" />
11
+ </form>
@@ -0,0 +1,28 @@
1
+ <h1>Issues</h1>
2
+
3
+ <form class="issue" action="<%= form.url('issue', 'new') %>" method="get">
4
+ <input type="submit" value="New Issue" >
5
+ </form>
6
+
7
+ <form class="issue" action="<%= form.url('issue') %>" method="get">
8
+ <h3>Tags</h3>
9
+ <ul><% form.each_tag(tags, *all['tags']) do |value, selection, content| %>
10
+ <li><input type="checkbox" name="tags[]" value="<%= value %>"<%= html.check(selection) %>><%= content %></input></li><% end %>
11
+ </ul>
12
+
13
+ <h3>Sort</h3>
14
+ <ul>
15
+ <li><input type="radio" name="sort" value="date" <%= html.check(sort == 'date') %>>Date</input></li>
16
+ <li><input type="radio" name="sort" value="title" <%= html.check(sort == 'title') %>>Title</input></li>
17
+ <li><input type="checkbox" name="reverse" value="true" <%= html.check(reverse) %>>Reverse</input>
18
+ </ul>
19
+
20
+ <input type="submit" value="Find" >
21
+ </form>
22
+
23
+ <div class="issues">
24
+ <ul class="issues"><% docs.each do |doc| %>
25
+ <li id="<%= doc.sha %>" active="<%= doc.graph_active?(active_sha) %>"><%= format.issue_a doc %></li><% end %>
26
+ </ul>
27
+ </div>
28
+
@@ -0,0 +1,5 @@
1
+ <h1>New Issue</h1>
2
+
3
+ <form class="issue" action="<%= form.url('issue') %>" method="post">
4
+ <%= erb :_issue_form, :locals => {:doc => doc, :parents => []}, :layout => false %>
5
+ </form>