[Rt-commit] r5901 - in commitbit: . share/web/templates
share/web/templates/admin
jesse at bestpractical.com
jesse at bestpractical.com
Sun Sep 10 20:53:13 EDT 2006
Author: jesse
Date: Sun Sep 10 20:53:12 2006
New Revision: 5901
Added:
commitbit/share/web/templates/admin/
commitbit/share/web/templates/admin/create_repository
commitbit/share/web/templates/repository/
commitbit/share/web/templates/repository/.people.swp (contents, props changed)
commitbit/share/web/templates/repository/index.html
commitbit/share/web/templates/repository/projects
Modified:
commitbit/ (props changed)
commitbit/share/web/templates/index.html
Log:
r27356 at pinglin: jesse | 2006-09-11 01:52:30 +0100
* checkpoint
Added: commitbit/share/web/templates/admin/create_repository
==============================================================================
--- (empty file)
+++ commitbit/share/web/templates/admin/create_repository Sun Sep 10 20:53:12 2006
@@ -0,0 +1,13 @@
+<&|/_elements/wrapper, title => 'Create a new repository'&>
+<h1>Create a repository</h1>
+<h2>(Are you sure you want to do this?)</h2>
+<% Jifty->web->form->start %>
+% foreach my $arg($create->argument_names) {
+<%$create->form_field($arg)%>
+% }
+<% Jifty->web->form->submit(label=>'Go') %>
+<% Jifty->web->form->end %>
+</&>
+<%init>
+my $create = Jifty->web->new_action(class => 'CreateRepository');
+</%init>
Modified: commitbit/share/web/templates/index.html
==============================================================================
--- commitbit/share/web/templates/index.html (original)
+++ commitbit/share/web/templates/index.html Sun Sep 10 20:53:12 2006
@@ -11,7 +11,7 @@
<dd<%$p->description%></dd>
% }
</dl>
-
+(<% Jifty->web->link( label => 'Create another repository', url => '/admin/create_repository')%>)
<p><%_('Pick a project')%></p>
<dl>
% my $projects = CommitBit::Model::ProjectCollection->new;
Added: commitbit/share/web/templates/repository/.people.swp
==============================================================================
Binary file. No diff available.
Added: commitbit/share/web/templates/repository/index.html
==============================================================================
--- (empty file)
+++ commitbit/share/web/templates/repository/index.html Sun Sep 10 20:53:12 2006
@@ -0,0 +1,25 @@
+<%args>
+$repository
+</%args>
+<%init>
+my $update= Jifty->web->new_action(class => 'UpdateRepository', record => $repository);
+
+
+</%init>
+<&|/_elements/wrapper,title => $repository->name &>
+<h1><%$repository->name%></h1>
+<%Jifty->web->form->start()%>
+% foreach my $arg ($update->argument_names) {
+<%$update->form_field($arg)%>
+% }
+<%Jifty->web->form->submit()%>
+<%Jifty->web->form->end()%>
+
+<%
+Jifty->web->link(
+ label => 'Projects',
+ url => '/repository/' . $repository->name . '/projects'
+ )
+
+%>
+</&>
Added: commitbit/share/web/templates/repository/projects
==============================================================================
--- (empty file)
+++ commitbit/share/web/templates/repository/projects Sun Sep 10 20:53:12 2006
@@ -0,0 +1,33 @@
+<&|/_elements/wrapper&>
+<h1>Projects in <%$repository->name%>
+<% Jifty->web->form->start%>
+% my $projects = $repository->projects;
+<ul>
+% while (my $project = $projects->next) {
+% my $del = Jifty->web->new_action(class => 'DeleteProject', record => $project, moniker => 'delete-project-'.$project->id);
+<li><%$project->name%>
+<%$del->form_field('id')%>
+ <% $del->button( label => 'Delete project',
+ class => 'delete',
+ onclick => qq|return confirm('Really delete this project?');| ) %>
+
+ </li>
+% }
+</ul>
+<h2><%_('Add a new project')%></h2>
+<% $new_project->form_field('name')%>
+<% $new_project->form_field('description')%>
+<% $new_project->form_field('root_path')%>
+<% $new_project->form_field('repository', render_as => 'Hidden')%>
+<% Jifty->web->form->submit(submit => $new_project, label => 'Create project')%>
+<% Jifty->web->form->end%>
+</&>
+<%init>
+my $new_project = Jifty->web->new_action(
+ class => 'CreateProject',
+ arguments => { repository => $repository->id }
+);
+</%init>
+<%args>
+$repository
+</%args>
More information about the Rt-commit
mailing list