[Bast-commits] r9858 - in ironman/IronMan-Web/branches/user_edit: . lib/IronMan/Web/Controller root root/archive root/inc

idn at dev.catalyst.perl.org idn at dev.catalyst.perl.org
Sun Apr 10 08:59:03 GMT 2011


Author: idn
Date: 2011-04-10 08:59:03 +0000 (Sun, 10 Apr 2011)
New Revision: 9858

Added:
   ironman/IronMan-Web/branches/user_edit/development-cycle.pod
   ironman/IronMan-Web/branches/user_edit/root/archive/index.tt
   ironman/IronMan-Web/branches/user_edit/root/update_feed.tt
Modified:
   ironman/IronMan-Web/branches/user_edit/
   ironman/IronMan-Web/branches/user_edit/Makefile.PL
   ironman/IronMan-Web/branches/user_edit/lib/IronMan/Web/Controller/Root.pm
   ironman/IronMan-Web/branches/user_edit/root/archive/day.tt
   ironman/IronMan-Web/branches/user_edit/root/archive/month.tt
   ironman/IronMan-Web/branches/user_edit/root/archive/year.tt
   ironman/IronMan-Web/branches/user_edit/root/inc/wrapper.tt
Log:
Merging from trunk


Property changes on: ironman/IronMan-Web/branches/user_edit
___________________________________________________________________
Added: svn:mergeinfo
   + /ironman/IronMan-Web/trunk:9627-9856

Modified: ironman/IronMan-Web/branches/user_edit/Makefile.PL
===================================================================
--- ironman/IronMan-Web/branches/user_edit/Makefile.PL	2011-04-10 08:58:20 UTC (rev 9857)
+++ ironman/IronMan-Web/branches/user_edit/Makefile.PL	2011-04-10 08:59:03 UTC (rev 9858)
@@ -23,6 +23,7 @@
 requires 'DateTime::Format::HTTP';
 requires 'YAML::XS';
 requires 'IronMan::Schema';
+requires 'Term::Prompt';
 
 # We need DateTime::Format::SQLite for script/import_csv.pl if using SQLite
 recommends 'DateTime::Format::SQLite';

Copied: ironman/IronMan-Web/branches/user_edit/development-cycle.pod (from rev 9856, ironman/IronMan-Web/trunk/development-cycle.pod)
===================================================================
--- ironman/IronMan-Web/branches/user_edit/development-cycle.pod	                        (rev 0)
+++ ironman/IronMan-Web/branches/user_edit/development-cycle.pod	2011-04-10 08:59:03 UTC (rev 9858)
@@ -0,0 +1,49 @@
+=head1 IronMan::Web
+
+This module forms part of the Enlightened Perl Organisation IronMan project.
+
+For more details, see the overview document at:
+
+    http://dev.catalyst.perl.org/repos/bast/ironman/overview.pod
+ 
+The latest version of this document can be found at:
+
+    http://dev.catalyst.perl.org/repos/bast/ironman/IronMan-Web/branches/dev/development-cycle.pod
+
+=head2 Development branch preparation.
+
+The development branch has the following known intentional differences:
+
+=head3 The '-Debug' option
+
+    diff -Naur branches/ironboy/lib/IronMan/Web.pm branches/dev/lib/IronMan/Web.pm
+    --- branches/ironboy/lib/IronMan/Web.pm 2010-07-10 10:37:30.825413356 +0100
+    +++ branches/dev/lib/IronMan/Web.pm     2010-07-10 10:37:31.174421647 +0100
+    @@ -14,7 +14,7 @@
+     # Static::Simple: will serve static files from the application's root 
+     #                 directory
+     
+    -use Catalyst qw/ConfigLoader Static::Simple StackTrace/;
+    +use Catalyst qw/-Debug ConfigLoader Static::Simple StackTrace/;
+     
+     our $VERSION = '0.01';
+
+=head2 Comparing branches
+
+Use the following to compare the two branches:
+
+    diff -Naur branches/ironboy/ branches/dev/ --exclude .svn | more
+
+Carefully review the changes presented to ensure there is nothing unexpected.
+
+=head2 Development to IronBoy
+
+Merge the changes from dev to ironboy, I suggest doing this per file (eg :
+
+
+
+    svn merge 
+
+    
+
+=cut

Modified: ironman/IronMan-Web/branches/user_edit/lib/IronMan/Web/Controller/Root.pm
===================================================================
--- ironman/IronMan-Web/branches/user_edit/lib/IronMan/Web/Controller/Root.pm	2011-04-10 08:58:20 UTC (rev 9857)
+++ ironman/IronMan-Web/branches/user_edit/lib/IronMan/Web/Controller/Root.pm	2011-04-10 08:59:03 UTC (rev 9858)
@@ -131,6 +131,31 @@
     $c->res->body($opml->as_string);
 }
 
+
+=head2 update_feed
+
+Update a feed give a user's unique key
+
+=cut
+
+sub update_feed : Local Args(1) {
+  my ($self, $c, $id) = @_;
+  my $feed = $c->model('FeedDB::Feed')->find({ id => $id });
+  if ( defined $feed ) {
+    $c->stash( 
+      owner => $feed->owner,
+      feed  => $feed->url,
+    );
+    if ( $c->req->param('url') ) {
+      $feed->update({ url => $c->req->param('url') })
+        or die "Error: $!";
+      $c->stash( updated => 1 );
+    }
+  } else {
+    $c->stash( error => "No such user" );
+  }
+}
+
 =head2 end
 
 Attempt to render a view, if needed.

Modified: ironman/IronMan-Web/branches/user_edit/root/archive/day.tt
===================================================================
--- ironman/IronMan-Web/branches/user_edit/root/archive/day.tt	2011-04-10 08:58:20 UTC (rev 9857)
+++ ironman/IronMan-Web/branches/user_edit/root/archive/day.tt	2011-04-10 08:59:03 UTC (rev 9858)
@@ -1,6 +1,6 @@
+[% SET page_title = 'Archives for ' _ day.strftime('%A, %d %B %Y') %] 
+<h2>Daily archive for [% day.strftime('%A, %d %B %Y') %]</h2>
 
-Daily archive for [% day.strftime('%A, %d %B %Y') %]
-
 [% INCLUDE 'inc/next_prev.tt' %]
 
 [% FOREACH post IN posts %]

Copied: ironman/IronMan-Web/branches/user_edit/root/archive/index.tt (from rev 9856, ironman/IronMan-Web/trunk/root/archive/index.tt)
===================================================================
--- ironman/IronMan-Web/branches/user_edit/root/archive/index.tt	                        (rev 0)
+++ ironman/IronMan-Web/branches/user_edit/root/archive/index.tt	2011-04-10 08:59:03 UTC (rev 9858)
@@ -0,0 +1,6 @@
+[% SET page_title = 'Archives' %]
+
+<h2>Archives</h2>
+
+<p>This page is going to be a list of months and numbers of posts linking through to
+the deeper archives - bring your ideas to irc://irc.perl.org/#northwestengland.pm</p>

Modified: ironman/IronMan-Web/branches/user_edit/root/archive/month.tt
===================================================================
--- ironman/IronMan-Web/branches/user_edit/root/archive/month.tt	2011-04-10 08:58:20 UTC (rev 9857)
+++ ironman/IronMan-Web/branches/user_edit/root/archive/month.tt	2011-04-10 08:59:03 UTC (rev 9858)
@@ -1,5 +1,6 @@
+[% SET page_title = 'Archives for ' _ month.strftime('%B %Y') %] 
 
-Monthly archive for [% month.strftime('%B %Y') %]
+<h2>Monthly archive for [% month.strftime('%B %Y') %]</h2>
 
 [% INCLUDE 'inc/next_prev.tt' %]
 

Modified: ironman/IronMan-Web/branches/user_edit/root/archive/year.tt
===================================================================
--- ironman/IronMan-Web/branches/user_edit/root/archive/year.tt	2011-04-10 08:58:20 UTC (rev 9857)
+++ ironman/IronMan-Web/branches/user_edit/root/archive/year.tt	2011-04-10 08:59:03 UTC (rev 9858)
@@ -1,5 +1,6 @@
+[% SET page_title = 'Archives for ' _ year %]
 
+<h2>Yearly archive for [% year %]</h2>
 
-Yearly archive for [% year %]
-
-There's nothing here yet.
+<p>This page is going to be an annual archive - suggestions on presentation welcome in
+irc://irc.perl.org/#northwestengland.pm</p>

Modified: ironman/IronMan-Web/branches/user_edit/root/inc/wrapper.tt
===================================================================
--- ironman/IronMan-Web/branches/user_edit/root/inc/wrapper.tt	2011-04-10 08:58:20 UTC (rev 9857)
+++ ironman/IronMan-Web/branches/user_edit/root/inc/wrapper.tt	2011-04-10 08:59:03 UTC (rev 9858)
@@ -17,7 +17,7 @@
     <link rel="stylesheet" type="text/css" href="/static/css/print.css" media="print" />
     <link rel="stylesheet" type="text/css" href="/static/css/handheld.css" media="handheld" />
     <link rel="stylesheet" type="text/css" href="/static/css/screen-members-list.css" />
-    <title>[% branding.page_title %]</title>
+    <title>[% IF page_title %][% page_title %] - [% END %][% branding.page_title %]</title>
   </head>
   <body>
     <div id="wrap">  

Copied: ironman/IronMan-Web/branches/user_edit/root/update_feed.tt (from rev 9856, ironman/IronMan-Web/trunk/root/update_feed.tt)
===================================================================
--- ironman/IronMan-Web/branches/user_edit/root/update_feed.tt	                        (rev 0)
+++ ironman/IronMan-Web/branches/user_edit/root/update_feed.tt	2011-04-10 08:59:03 UTC (rev 9858)
@@ -0,0 +1,12 @@
+[% UNLESS error %]
+[% IF updated %]
+<p>Feed url successfully updated</p>
+[% END %]
+<p>Welcome, [% owner %]</p>
+<form method="post" action="">
+<p>New url for feed (current is: [% feed %]): <input type="text" name="url" /></p>
+<p><input type="submit" value="Update feed url" /></p>
+</form>
+[% ELSE %]
+[% error %]
+[% END %]




More information about the Bast-commits mailing list