[Bps-public-commit] App-Changeloggr branch, ajaxify-reword, updated. 7ee7cd70c8a594e35bdacfad5df10fc56db38e14

sartak at bestpractical.com sartak at bestpractical.com
Wed Aug 5 21:46:02 EDT 2009


The branch, ajaxify-reword has been updated
       via  7ee7cd70c8a594e35bdacfad5df10fc56db38e14 (commit)
       via  63938b49f88e302b46c0d4d1188ddf7916b55488 (commit)
       via  fe8c2ac467e345fd7bdbbc94f184f00d30620d40 (commit)
      from  4b4cd83421e5f653cc6d37513235a549ef7383eb (commit)

Summary of changes:
 lib/App/Changeloggr/View.pm |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit fe8c2ac467e345fd7bdbbc94f184f00d30620d40
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Aug 5 21:44:47 2009 -0400

    Ajax replace link for rewording form

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index 7bb7bce..b06447d 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -239,13 +239,30 @@ sub show_change {
 template '/change/message' => sub {
     my $change = M('Change', id => get('change'));
     p {
-        { class is "change_message" };
+        attr { class is "change_message" };
         my $message = Jifty->web->escape($change->message);
         $message =~ s{\n}{<br />}g;
         my $links = $change->changelog->commit_links;
         $message = $_->linkify($message) while $_ = $links->next;
         outs_raw( $message );
     };
+
+    my $rewording = Rewording(
+        change_id => $change->id,
+        user_id => Jifty->web->current_user->id,
+    );
+    if ($rewording->id) {
+        p { "You submitted the following rewording:" };
+        pre { $rewording->message };
+    }
+    else {
+        hyperlink(
+            label   => _("Reword this message?"),
+            onclick => {
+                replace_with => '/change/reword',
+            },
+        );
+    }
 };
 
 template '/change/external_source' => sub {

commit 63938b49f88e302b46c0d4d1188ddf7916b55488
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Aug 5 21:45:41 2009 -0400

    The rewording prose is no longer needed

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index b06447d..bce21ad 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -437,8 +437,6 @@ template '/change/reword' => sub {
     else {
         my $create_rewording = new_action('CreateRewording');
 
-        p { "Do you want to improve the content or wording of this change's message?" };
-
         render_hidden $create_rewording => 'change_id' => $change_id;
         render_param $create_rewording => (
             'message',

commit 7ee7cd70c8a594e35bdacfad5df10fc56db38e14
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Aug 5 21:45:52 2009 -0400

    When we submit rewording, go back to static change display

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index bce21ad..75910aa 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -448,7 +448,7 @@ template '/change/reword' => sub {
             label => 'Reword',
             onclick => {
                 submit => $create_rewording,
-                refresh_self => 1,
+                replace_with => '/change/message',
             },
         );
     }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list