[Rt-commit] r6068 - in commitbit: . trunk/etc trunk/share/web/templates trunk/share/web/templates/admin/project trunk/share/web/templates/admin/repository trunk/share/web/templates/project

jesse at bestpractical.com jesse at bestpractical.com
Wed Sep 27 22:12:43 EDT 2006


Author: jesse
Date: Wed Sep 27 22:12:42 2006
New Revision: 6068

Modified:
   commitbit/   (props changed)
   commitbit/trunk/etc/config.yml
   commitbit/trunk/lib/CommitBit/Model/Project.pm
   commitbit/trunk/share/web/templates/admin/project/index.html
   commitbit/trunk/share/web/templates/admin/repository/projects
   commitbit/trunk/share/web/templates/index.html
   commitbit/trunk/share/web/templates/project/index.html

Log:
 r27880 at pinglin:  jesse | 2006-09-27 22:12:40 -0400
 * a bit more flexyness for the homepage


Modified: commitbit/trunk/etc/config.yml
==============================================================================
--- commitbit/trunk/etc/config.yml	(original)
+++ commitbit/trunk/etc/config.yml	Wed Sep 27 22:12:42 2006
@@ -10,7 +10,7 @@
     Password: ''
     RecordBaseClass: Jifty::DBI::Record::Cachable
     User: ''
-    Version: 0.0.1
+    Version: 0.0.3
   DevelMode: 1
   L10N: 
     PoDir: share/po

Modified: commitbit/trunk/lib/CommitBit/Model/Project.pm
==============================================================================
--- commitbit/trunk/lib/CommitBit/Model/Project.pm	(original)
+++ commitbit/trunk/lib/CommitBit/Model/Project.pm	Wed Sep 27 22:12:42 2006
@@ -9,6 +9,10 @@
 use CommitBit::Record schema {
     column 'name' =>
         type is 'text';
+    column 'blurb' => 
+        type is 'text',
+        render_as 'textarea',
+        since '0.0.2';
     column 'description' => 
         type is 'text';
     column 'root_path' =>
@@ -17,6 +21,9 @@
         is immutable,
         refers_to CommitBit::Model::Repository;
 
+    column 'logo_url' => 
+        type is 'text',
+        since '0.0.3';
 
     column 'svn_url_anon' => type is 'text';
     column 'svn_url_auth' => type is 'text';
@@ -27,6 +34,10 @@
     column 'license' => type is 'text',
         valid_values are ('GPLv2' ,'Perl 5.8', 'Artistic 2.0', 'BSD', 'MIT', 'Death and repudiation');
 
+    column 'featured' =>
+        type is 'boolean',
+        default is 'false',
+        since '0.0.2';
     column 'publicly_visible' =>
         type is 'boolean',
         default is 'true';

Modified: commitbit/trunk/share/web/templates/admin/project/index.html
==============================================================================
--- commitbit/trunk/share/web/templates/admin/project/index.html	(original)
+++ commitbit/trunk/share/web/templates/admin/project/index.html	Wed Sep 27 22:12:42 2006
@@ -11,7 +11,4 @@
 %}
 <% Jifty->web->form->submit(label => 'Save changes')%>
 % Jifty->web->form->end;
-
-
-<%Jifty->web->link( label => 'People', url => '/admin/project/'.$project->name.'/people')%>
 </&>

Modified: commitbit/trunk/share/web/templates/admin/repository/projects
==============================================================================
--- commitbit/trunk/share/web/templates/admin/repository/projects	(original)
+++ commitbit/trunk/share/web/templates/admin/repository/projects	Wed Sep 27 22:12:42 2006
@@ -14,10 +14,9 @@
 % }
 </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')%>
+% foreach my $arg ($new_project->argument_names) {
+<%$new_project->form_field($arg)%>
+%}
 <% Jifty->web->form->submit(submit => $new_project, label => 'Create project')%>
 <% Jifty->web->form->end%>
 </&>

Modified: commitbit/trunk/share/web/templates/index.html
==============================================================================
--- commitbit/trunk/share/web/templates/index.html	(original)
+++ commitbit/trunk/share/web/templates/index.html	Wed Sep 27 22:12:42 2006
@@ -1,14 +1,34 @@
 <&|/_elements/wrapper, title => _('Welcome to CommitBit for %1', Jifty->config->app('site_name')) &>
 
+<div class="featured">
+<h2><%('Featured projects')%></h2>
+<dl>
+% while ( my $p = $featured->next ) {
+<dt>
+% if ($p->logo_url) {
+<img src="<%$p->logo_url%>"/>
+% }
+<%Jifty->web->link( url => '/project/'.$p->name, label => $p->name)%></dt>
+<dd><%$p->blurb|n%></dd>
+% }
+</dl>
+</div>
 
-<h2><%_('Locally hosted projects')%></h2>
+<h2><%_('All locally hosted projects')%></h2>
 <dl>
-% my $projects = CommitBit::Model::ProjectCollection->new;
-% $projects->unlimit();
 % while ( my $p = $projects->next ) {
 <dt><%Jifty->web->link( url => '/project/'.$p->name, label => $p->name)%></dt>
-<dd<%$p->description%></dd>
+<dd><%$p->description%></dd>
 % }
 </dl>
 
 </&>
+<%init>
+my $projects = CommitBit::Model::ProjectCollection->new;
+$projects->unlimit();
+
+my $featured = CommitBit::Model::ProjectCollection->new;
+$featured->limit(column => 'featured', operator => '=',  value => '1' );
+
+
+</%init>

Modified: commitbit/trunk/share/web/templates/project/index.html
==============================================================================
--- commitbit/trunk/share/web/templates/project/index.html	(original)
+++ commitbit/trunk/share/web/templates/project/index.html	Wed Sep 27 22:12:42 2006
@@ -6,38 +6,52 @@
 </%init>
 <&|/_elements/wrapper,title => $project->name &>
 <div class="yui-gc">
-<div class="yui-u first">
+    <div class="yui-u first">
+% if ($project->logo_url) {
+<img src="<%$project->logo_url%>" />
+% }
 <h1><%$project->name%></h1>
 <blockquote>
     <%$project->description%>
 </blockquote>
 
-<h2>Mailing lists</h2>
 
+% if ($project->lists_url) {
+<h2>Mailing lists</h2>
 <%Jifty->web->link( url => $project->lists_url, label => $project->lists_url)%>
+% }
 
+
+% if ($project->wiki_url) {
 <h2>Wiki</h2>
 
 <%Jifty->web->link( url => $project->wiki_url, label => $project->wiki_url)%>
+% }
 
+% if ($project->bugtracker_url) {
 <h2>Bug tracking</h2>
 
 <%Jifty->web->link( url => $project->bugtracker_url, label => $project->bugtracker_url)%>
+% }
 
 <h2>Version control</h2>
 
+% if ($project->svnweb_url) {
 <h3>Repository browser</h3>
-
 <%Jifty->web->link( url => $project->svnweb_url, label => $project->svnweb_url)%>
+% }
 
-
+% if ($project->svn_url_anon) {
 <h3>Anonymous access</h3>
-
 <%Jifty->web->link( url => $project->svn_url_anon, label => $project->svn_url_anon)%>
 
+% }
+% if ($project->svn_url_auth) {
 <h3>Committer access</h3>
 <%Jifty->web->link( url => $project->svn_url_auth, label => $project->svn_url_auth)%>
+% }
 <h2>License</h2>
+<%$project->license%>
 </div>
 <div class="yui-u">
 <div id="people">


More information about the Rt-commit mailing list