[Xfce4-commits] <moka:nick/maintainer-improvements> Move user profile info to /maintainer/profile/:username.

Nick Schermer noreply at xfce.org
Sun Apr 3 15:46:04 CEST 2011


Updating branch refs/heads/nick/maintainer-improvements
         to b904035d700f693135e1a06baa736cbb34621693 (commit)
       from 96b2c2619583fdfe79b38bed742d6f50021d89ed (commit)

commit b904035d700f693135e1a06baa736cbb34621693
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Apr 3 14:55:08 2011 +0200

    Move user profile info to /maintainer/profile/:username.

 lib/controllers/maintainers.rb                     |    8 ++++----
 lib/views/collection_new_release.erb               |    2 +-
 lib/views/head.erb                                 |    2 +-
 .../{maintainer.erb => maintainer_profile.erb}     |    0
 .../project_branch_new_release_announcement.erb    |    2 +-
 lib/views/project_new_release.erb                  |    2 +-
 moka.gemspec                                       |    2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/controllers/maintainers.rb b/lib/controllers/maintainers.rb
index 15e5e91..77f8498 100755
--- a/lib/controllers/maintainers.rb
+++ b/lib/controllers/maintainers.rb
@@ -4,15 +4,15 @@ module Moka
       include Moka::Models
 
       def self.registered(app)
-        app.get '/maintainer/:username' do
+        app.get '/maintainer/profile/:username' do
           @maintainer = Maintainer.find_by_username(params[:username])
 
           authentication_required(@maintainer)
 
-          view :maintainer
+          view :maintainer_profile
         end
 
-        app.post '/maintainer/:username' do
+        app.post '/maintainer/profile/:username' do
           @maintainer = Maintainer.find_by_username(params[:username])
 
           authentication_required(@maintainer)
@@ -52,7 +52,7 @@ module Moka
             end
           end
 
-          view :maintainer
+          view :maintainer_profile
         end
       end
     end
diff --git a/lib/views/collection_new_release.erb b/lib/views/collection_new_release.erb
index 426e194..c769203 100755
--- a/lib/views/collection_new_release.erb
+++ b/lib/views/collection_new_release.erb
@@ -20,7 +20,7 @@
       <% for list in env['mailinglists'].lists %>
         <p><span class="placeholder"> </span> <input type="checkbox" name="mailinglists[<%= list %>]" value="announce" <%= 'checked="checked"' if @collection.mailinglists.include?(list) %>/> Announce on <%= list %></p>
       <% end %>
-      <p><span class="placeholder"> </span> <strong>Make sure to be subscribed to these mailinglists with <%= authentication_user.email %>. You can <a href="/maintainer/<%= authentication_user.username %>">change your email address here</a>.</strong></p>
+      <p><span class="placeholder"> </span> <strong>Make sure to be subscribed to these mailinglists with <%= authentication_user.email %>. You can <a href="/maintainer/profile/<%= authentication_user.username %>">change your email address here</a>.</strong></p>
     <% end %>
   </fieldset>
   <h2>Projects</h2>
diff --git a/lib/views/head.erb b/lib/views/head.erb
index fb5c245..003434c 100755
--- a/lib/views/head.erb
+++ b/lib/views/head.erb
@@ -14,7 +14,7 @@
         <a href="/login">Manage Releases</a>
       <% end %>
       <% if not Moka::Models::Maintainer.use_http_auth? and env['warden'].authenticated? %>
-        <a href="/maintainer/<%= authentication_user.username %>">Profile</a>
+        <a href="/maintainer/profile/<%= authentication_user.username %>">Profile</a>
         <a href="/logout">Logout</a>
       <% end %>
       <br />
diff --git a/lib/views/maintainer.erb b/lib/views/maintainer_profile.erb
similarity index 100%
rename from lib/views/maintainer.erb
rename to lib/views/maintainer_profile.erb
diff --git a/lib/views/project_branch_new_release_announcement.erb b/lib/views/project_branch_new_release_announcement.erb
index fd4ec0c..8f36aee 100755
--- a/lib/views/project_branch_new_release_announcement.erb
+++ b/lib/views/project_branch_new_release_announcement.erb
@@ -16,7 +16,7 @@
       <% for list in env['mailinglists'].lists %>
         <p><span class="placeholder"> </span> <input type="checkbox" name="mailinglists[<%= list %>]" value="announce" <%= 'checked="checked"' if @project.mailinglists.include?(list) %>/> Announce on <%= list %></p>
       <% end %>
-      <p><span class="placeholder"> </span> <strong>Make sure to be subscribed to these mailinglists with <%= authentication_user.email %>. You can <a href="/maintainer/<%= authentication_user.username %>">change your email address here</a>.</strong></p>
+      <p><span class="placeholder"> </span> <strong>Make sure to be subscribed to these mailinglists with <%= authentication_user.email %>. You can <a href="/maintainer/profile/<%= authentication_user.username %>">change your email address here</a>.</strong></p>
     <% end %>
     <p><span class="placeholder"> </span> <input type="submit" value="Continue"/></p>
   </fieldset>
diff --git a/lib/views/project_new_release.erb b/lib/views/project_new_release.erb
index 638bea9..88cedf4 100755
--- a/lib/views/project_new_release.erb
+++ b/lib/views/project_new_release.erb
@@ -1,6 +1,6 @@
 <%= header :title => "Release new version of #{@project.name} (1/4)" %>
 <h2>Release information</h2>
-<p><strong>Before releasing, please make sure the <a href="/project/<%= @project.name %>">project information</a> is up to date. Also make sure you are subscribed to the mailing lists with <a href="/maintainer/<%= authentication_user.username %>"><%= authentication_user.email %></a> else the announcement will not be posted.</strong></p>
+<p><strong>Before releasing, please make sure the <a href="/project/<%= @project.name %>">project information</a> is up to date. Also make sure you are subscribed to the mailing lists with <a href="/maintainer/profile/<%= authentication_user.username %>"><%= authentication_user.email %></a> else the announcement will not be posted.</strong></p>
 <form method="get" action="/project/<%= @project.name %>/new-release/tarball">
   <fieldset>
     <p><span class="placeholder"> </span> <input type="submit" value="I verified the information is correct"/></p>
diff --git a/moka.gemspec b/moka.gemspec
index fff973d..783cb34 100644
--- a/moka.gemspec
+++ b/moka.gemspec
@@ -44,7 +44,7 @@ Gem::Specification.new do |s|
     "lib/views/foot.erb",
     "lib/views/head.erb",
     "lib/views/index.erb",
-    "lib/views/maintainer.erb",
+    "lib/views/maintainer_profile.erb",
     "lib/views/manage_releases.erb",
     "lib/views/permission_denied.erb",
     "lib/views/project.erb",



More information about the Xfce4-commits mailing list