[Xfce4-commits] <moka:nick/maintainer-improvements> Fielset style update.

Nick Schermer noreply at xfce.org
Sat Oct 15 21:16:10 CEST 2011


Updating branch refs/heads/nick/maintainer-improvements
         to 7e68548d9749f926c8f8fe01301724fda372e5a6 (commit)
       from ce94a35d1d5b2f5a263ec21b9995526cc10b19fd (commit)

commit 7e68548d9749f926c8f8fe01301724fda372e5a6
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Oct 15 21:14:56 2011 +0200

    Fielset style update.

 lib/controllers/projects.rb                        |    2 +-
 lib/views/index.haml                               |   25 +++---
 lib/views/login_request.haml                       |   64 ++++++++-------
 lib/views/maintainer_profile.haml                  |   83 ++++++++++----------
 lib/views/project.haml                             |   39 +++++-----
 .../project_branch_new_release_announcement.haml   |   36 ++++----
 lib/views/project_list.haml                        |   23 +++---
 lib/views/project_new_release.haml                 |   21 +++---
 lib/views/project_new_release_tarball.haml         |   27 ++++---
 lib/views/project_release_update.haml              |   32 ++++----
 lib/views/stylesheet.sass                          |    8 +-
 11 files changed, 185 insertions(+), 175 deletions(-)

diff --git a/lib/controllers/projects.rb b/lib/controllers/projects.rb
index cb8eeba..80e34bd 100755
--- a/lib/controllers/projects.rb
+++ b/lib/controllers/projects.rb
@@ -177,7 +177,7 @@ module Moka
           unless error_set?
             if @branch.has_release?(@release)
               error_set(:tarball, "Release tarball already exists. " \
-                         "You can use <a href=\"/project/#{@project.id}/branch/#{@branch.name}/release/#{@release.version}/update\">this page</a> to update the release.")
+                         "You can use <a href=\"/project/#{@project.name}/branch/#{@branch.name}/release/#{@release.version}/update\">this page</a> to update the release.")
             end
           end
 
diff --git a/lib/views/index.haml b/lib/views/index.haml
index f34a445..461c5c9 100644
--- a/lib/views/index.haml
+++ b/lib/views/index.haml
@@ -4,15 +4,16 @@
   want to request developers account, please click the link above.
 
 %h3 Login
-%form{:method => "post", :action => "/login"}
-  - if error(:unauthenticated)
-    %p.error The username or password you entered is not valid. 
-  %p
-    %label{:for => "username"} Username:
-    %input{:type => "text", :name => "username", :id => "username"}
-  %p
-    %label{:for => "password"} Password:
-    %input{:type => "password", :name => "password", :id => "password"}
-  %p
-    %input{:type => "submit", :value => "Log in"}
-    %a{:href => "/login/forgot"} Forgot Password
+%fieldset
+  %form{:method => "post", :action => "/login"}
+    - if error(:unauthenticated)
+      %p.error The username or password you entered is not valid. 
+    %p
+      %label{:for => "username"} Username:
+      %input{:type => "text", :name => "username", :id => "username"}
+    %p
+      %label{:for => "password"} Password:
+      %input{:type => "password", :name => "password", :id => "password"}
+    %p
+      %input{:type => "submit", :value => "Log in"}
+      %a{:href => "/login/forgot"} Forgot Password
diff --git a/lib/views/login_request.haml b/lib/views/login_request.haml
index f8d5b3a..32b400b 100644
--- a/lib/views/login_request.haml
+++ b/lib/views/login_request.haml
@@ -10,34 +10,36 @@
   page and request to join a translation team after registration.
 
 %h2 Account Information
-%form{:method => "post"}
-  - if env[:error][:message]
-    %p.error.quote #{env[:error][:message]}
-  %p
-    %label{:for => "username"} Username:
-    %input{:type => "text", :name => "username", :id => "username", :value => params[:username]}
-  %p
-    %label{:for => "realname"} Real Name:
-    %input{:type => "text", :name => "realname", :id => "realname", :value => params[:realname]}
-  %p
-    %label{:for => "email"} Email Address:
-    %input{:type => "text", :name => "email", :id => "email", :value => params[:email]}
-  %hr
-  - if env[:error][:newpassword]
-    %p.error.quote #{env[:error][:newpassword]}
-  %p
-    %label{:for => "password"} Password:
-    %input{:type => "password", :id => "password", :name => "password"}
-  %p
-    %label{:for => "password2"} Confirm password:
-    %input{:type => "password", :id => "password2", :name => "password2"}
-  %hr
-  %p.quote
-    The public key is required to push git commits over ssh. Make sure you provide the publickey and
-    not the fingerprint... Read more about how to generate and use SSH keys
-    %a{:href => "/login/request/sshinfo"} here.
-  %p
-    %label{:for => "pubkeys"} SSH public-keys:
-    %textarea{:name => "pubkeys", :rows => "5", :id => "pubkeys", :wrap => "off"} #{params[:pubkeys]}
-  %p
-    %input{:type => "submit", :value => "Submit"}
+%fieldset
+  %form{:method => "post"}
+    - if env[:error][:message]
+      %p.error.quote #{env[:error][:message]}
+    %p
+      %label{:for => "username"} Username:
+      %input{:type => "text", :name => "username", :id => "username", :value => params[:username]}
+    %p
+      %label{:for => "realname"} Real Name:
+      %input{:type => "text", :name => "realname", :id => "realname", :value => params[:realname]}
+    %p
+      %label{:for => "email"} Email Address:
+      %input{:type => "text", :name => "email", :id => "email", :value => params[:email]}
+    %hr
+    - if env[:error][:newpassword]
+      %p.error.quote #{env[:error][:newpassword]}
+    %p
+      %label{:for => "password"} Password:
+      %input{:type => "password", :id => "password", :name => "password"}
+    %p
+      %label{:for => "password2"} Confirm password:
+      %input{:type => "password", :id => "password2", :name => "password2"}
+    %hr
+    %p.quote
+      The public key is required to push git commits over ssh. Make sure you provide the publickey and
+      not the fingerprint... Read more about how to generate and use SSH keys
+      %a{:href => "/login/request/sshinfo"} here.
+    %p
+      %label{:for => "pubkeys"} SSH public-keys:
+      %textarea{:name => "pubkeys", :rows => "5", :id => "pubkeys", :wrap => "off"} #{params[:pubkeys]}
+    %p
+      %input{:type => "submit", :value => "Submit"}
+  
diff --git a/lib/views/maintainer_profile.haml b/lib/views/maintainer_profile.haml
index 88d2a4c..a637f3e 100644
--- a/lib/views/maintainer_profile.haml
+++ b/lib/views/maintainer_profile.haml
@@ -21,50 +21,51 @@
            :onclick => "return admin_delete()" }
 
 %h2 Account Information
-%form{:method => "post"}
-  %p
-    %label{:for => "username"} Login Name:
-    %input{:type => "text", :name => "fooname", :disabled => true, :value => @maintainer.username}
-    %input{:type => "hidden",
-           :name => "username",
-           :id => "username",
-           :value => @maintainer.username}
-  %p
-    %label{:for => "email"} Email address:
-    %input{:type => "text", :name => "email", :id => "email", :value => @maintainer.email}
-  %p
-    %label{:for => "realname"} Real Name:
-    %input{:type => "text", :name => "realname", :id => "realname", :value => @maintainer.realname}
-  %p
-    %label{:for => "pubkeys"} SSH public-keys:
-    %textarea{:name => "pubkeys", :id => "pubkeys", :rows => "5", :wrap => "off"} #{@maintainer.pubkeys}
-  %p.info
-    Each line of the public keys should start with ssh-dsa or ssh-rsa else
-    the key is not saved. Updating the keys on the server can take up to 1
-    hour, so please be patient after updating the keys.
-
-  - if authentication_user.eql? @maintainer
-    %hr
+%fieldset
+  %form{:method => "post"}
+    %p
+      %label{:for => "username"} Login Name:
+      %input{:type => "text", :name => "fooname", :disabled => true, :value => @maintainer.username}
+      %input{:type => "hidden",
+             :name => "username",
+             :id => "username",
+             :value => @maintainer.username}
+    %p
+      %label{:for => "email"} Email address:
+      %input{:type => "text", :name => "email", :id => "email", :value => @maintainer.email}
     %p
-      Leave the password fields empty if you don't want to set a new password.
-      The password needs to be at least 6 characters long.
-    - if env[:error][:newpassword]
-      %p.error.quote #{env[:error][:newpassword]}
+      %label{:for => "realname"} Real Name:
+      %input{:type => "text", :name => "realname", :id => "realname", :value => @maintainer.realname}
     %p
-      %label{:for => "new_password"} New password:
-      %input{:type => "password", :id => "new_password", :name => "newpassword" }
+      %label{:for => "pubkeys"} SSH public-keys:
+      %textarea{:name => "pubkeys", :id => "pubkeys", :rows => "5", :wrap => "off"} #{@maintainer.pubkeys}
+    %p.info
+      Each line of the public keys should start with ssh-dsa or ssh-rsa else
+      the key is not saved. Updating the keys on the server can take up to 1
+      hour, so please be patient after updating the keys.
+  
+    - if authentication_user.eql? @maintainer
+      %hr
+      %p
+        Leave the password fields empty if you don't want to set a new password.
+        The password needs to be at least 6 characters long.
+      - if env[:error][:newpassword]
+        %p.error.quote #{env[:error][:newpassword]}
+      %p
+        %label{:for => "new_password"} New password:
+        %input{:type => "password", :id => "new_password", :name => "newpassword" }
+      %p
+        %label{:for => "new_password2"} Confirm new password:
+        %input{:type => "password", :id => "new_password2", :name => "newpassword2"}
+    %hr
+    %p Please enter your existing password to confirm account changes.
+    - if env[:error][:password]
+      %p.error.quote #{env[:error][:password]}
     %p
-      %label{:for => "new_password2"} Confirm new password:
-      %input{:type => "password", :id => "new_password2", :name => "newpassword2"}
-  %hr
-  %p Please enter your existing password to confirm account changes.
-  - if env[:error][:password]
-    %p.error.quote #{env[:error][:password]}
-  %p
-    %label{:for => "password"} Password:
-    %input{:type => "password", :name => "password", :id => "password", :onkeyup => "info_submit()" }
-  %p
-    %input{:type => "submit", :value => "Save", :id => "infosubmit", :disabled => true }
+      %label{:for => "password"} Password:
+      %input{:type => "password", :name => "password", :id => "password", :onkeyup => "info_submit()" }
+    %p.quote
+      %input{:type => "submit", :value => "Save", :id => "infosubmit", :disabled => true }
 
 %h2 Permissions
 %form{:method => "post", :action => "/maintainer/#{@maintainer.username}/permissions" }
diff --git a/lib/views/project.haml b/lib/views/project.haml
index d228561..b694eb8 100755
--- a/lib/views/project.haml
+++ b/lib/views/project.haml
@@ -1,23 +1,24 @@
 %h2 Project information
-%form{:method => "post", :action => "/project/#{@project.name}/information"}
-  %p
-    %label{:for => "website"} Website:
-    %input{:type => "text", 
-           :name => "website", 
-           :id => "website", 
-           :value => "#{@project.website}"}
-  %p
-    %label{:for => "description"} Description:
-    %textarea{:name => "description", :id => "description"} #{@project.description}
-  %p
-    %label{:for => "maintainers"} Maintainers:
-    %input{:type => "text", 
-           :name => "maintainers",
-           :id =>  "maintainers",
-           :disabled => true, 
-           :value => "#{maintainer_names(@project)}"}
-  %p.quote
-    %input{:type => "submit", :value => "Save"}
+%fieldset
+  %form{:method => "post", :action => "/project/#{@project.name}/information"}
+    %p
+      %label{:for => "website"} Website:
+      %input{:type => "text", 
+             :name => "website", 
+             :id => "website", 
+             :value => "#{@project.website}"}
+    %p
+      %label{:for => "description"} Description:
+      %textarea{:name => "description", :id => "description"} #{@project.description}
+    %p
+      %label{:for => "maintainers"} Maintainers:
+      %input{:type => "text", 
+             :name => "maintainers",
+             :id =>  "maintainers",
+             :disabled => true, 
+             :value => "#{maintainer_names(@project)}"}
+    %p.quote
+      %input{:type => "submit", :value => "Save"}
 
 %h2 Classification
 %form{:method => "post", :action => "/project/#{@project.name}/classify"}
diff --git a/lib/views/project_branch_new_release_announcement.haml b/lib/views/project_branch_new_release_announcement.haml
index 0053548..0503638 100755
--- a/lib/views/project_branch_new_release_announcement.haml
+++ b/lib/views/project_branch_new_release_announcement.haml
@@ -2,23 +2,23 @@
 %p The tarball is now uploaded. You can stop here if that is all you wanted to do.
 
 %h2 Announcement
-%form{:method => "post"}
-  %p
-    %label{:for => "message"} Release notes:
-    %textarea{:name => "message", :class => "message"}
-    - if env['feeds']
-      %p.quote
-        %input{:type => "checkbox", :name => "feeds", :value => "announce", :checked => true} Update news feed
-    - if env['identica']
-      %p.quote
-        %input{:type => "checkbox", :name => "identica", :value => "announce", :checked => true} Announce on identi.ca
-    - if env['mailinglists']
-      - for list in env['mailinglists'].lists
+%fieldset
+  %form{:method => "post"}
+    %p
+      %label{:for => "message"} Release notes:
+      %textarea{:name => "message", :class => "message"}
+      - if env['feeds']
+        %p.quote
+          %input{:type => "checkbox", :name => "feeds", :value => "announce", :checked => true}  Update news feed
+      - if env['identica']
+        %p.quote
+          %input{:type => "checkbox", :name => "identica", :value => "announce", :checked => true} Announce on identi.ca
+      - if env['mailinglists']
+        - for list in env['mailinglists'].lists
+          %p.quote
+            %input{:type => "checkbox", :name => "mailinglists[#{list}]", :value => "announce"} Announce on #{list}
         %p.quote
-          %input{:type => "checkbox", :name => "mailinglists[#{list}]", :value => "announce"}
-            Announce on #{list}
+          Make sure to be subscribed to these mailinglists with #{authentication_user.email}.
+          You can change your email address in your profile.
       %p.quote
-        Make sure to be subscribed to these mailinglists with #{authentication_user.email}.
-        You can change your email address in your profile.
-    %p.quote
-      %input{:type => "submit", :value => "Continue"}
+        %input{:type => "submit", :value => "Continue"}
diff --git a/lib/views/project_list.haml b/lib/views/project_list.haml
index e286d92..ba33d58 100644
--- a/lib/views/project_list.haml
+++ b/lib/views/project_list.haml
@@ -1,15 +1,16 @@
 %h2 Create Project
-%form{:method => "post" }
-  %p
-    %label{:for => "name"} Name:
-    %input{:type => "text", :name => "name", :id => "name" }
-  %p
-    %label{:for => "classification"} Classification:
-    %select{:name => "classification", :id => "classification"}
-      - for classification in Classification.find_all
-        %option{:name => classification.name} #{classification.name}
-  %p
-    %input{:type => "submit", :value => "Create" }
+%fieldset
+  %form{:method => "post" }
+    %p
+      %label{:for => "name"} Name:
+      %input{:type => "text", :name => "name", :id => "name" }
+    %p
+      %label{:for => "classification"} Classification:
+      %select{:name => "classification", :id => "classification"}
+        - for classification in Classification.find_all
+          %option{:name => classification.name} #{classification.name}
+    %p.quote
+      %input{:type => "submit", :value => "Create" }
 
 %h2 Projects
 - projects = Project.all.sort
diff --git a/lib/views/project_new_release.haml b/lib/views/project_new_release.haml
index 56c9572..9aeaa01 100755
--- a/lib/views/project_new_release.haml
+++ b/lib/views/project_new_release.haml
@@ -6,14 +6,15 @@
   not be posted!
 
 %h3 Project information
-%form
-  %p
-    %label{:for => "website"} Website:
-    %input{:type => "text", :name => "website", :disabled => true, :value => "#{@project.website}"}
-  %p
-    %label{:for => "description"} Description:
-    %textarea{:name => "description", :disabled => true} #{@project.description}
+%fieldset
+  %form
+    %p
+      %label{:for => "website"} Website:
+      %input{:type => "text", :name => "website", :disabled => true, :value => "#{@project.website}"}
+    %p
+      %label{:for => "description"} Description:
+      %textarea{:name => "description", :disabled => true} #{@project.description}
 
-%form{:method => "get", :action => "/project/#{@project.name}/new-release/tarball"}
-  %p.quote
-    %input{:type => "submit", :value => "I verified the information is correct"}
+  %form{:method => "get", :action => "/project/#{@project.name}/new-release/tarball"}
+    %p.quote
+      %input{:type => "submit", :value => "I verified the information is correct"}
diff --git a/lib/views/project_new_release_tarball.haml b/lib/views/project_new_release_tarball.haml
index 1045887..bc0cec7 100755
--- a/lib/views/project_new_release_tarball.haml
+++ b/lib/views/project_new_release_tarball.haml
@@ -1,14 +1,15 @@
 %h2 Tarball
-%form{:method => "post", :enctype => "multipart/form-data"}
-  %p
-    %label{:for => "tarball"} Tarball:
-    %input{:type => "file", :name => "tarball", :size => "30"}
-    - if error(:tarball)
-      %p.error.quote #{error(:tarball)}
-  %p
-    %label{:for => "checksum"} Checksum (SHA1):
-    %input{:type => "text", :name => "checksum", :size => "40", :value => "#{params[:checksum]}"}
-    - if error(:checksum)
-      %p.error.quote #{error(:checksum)}
-  %p.quote
-    %input{:type => "submit", :value => "Upload file and continue"}
+%fieldset
+  %form{:method => "post", :enctype => "multipart/form-data"}
+    %p
+      %label{:for => "tarball"} Tarball:
+      %input{:type => "file", :name => "tarball", :size => "30"}
+      - if error(:tarball)
+        %p.error.quote #{error(:tarball)}
+    %p
+      %label{:for => "checksum"} Checksum (SHA1):
+      %input{:type => "text", :name => "checksum", :size => "40", :value => "#{params[:checksum]}"}
+      - if error(:checksum)
+        %p.error.quote #{error(:checksum)}
+    %p.quote
+      %input{:type => "submit", :value => "Upload file and continue"}
diff --git a/lib/views/project_release_update.haml b/lib/views/project_release_update.haml
index 3c55e17..c9f40a6 100755
--- a/lib/views/project_release_update.haml
+++ b/lib/views/project_release_update.haml
@@ -1,16 +1,18 @@
 %h2 Tarball
-%form{:method => "post", :enctype => "multipart/form-data"}
-  %p
-    %label Filename: <tt>#{@release.tarball_basename}</tt>
-  %p
-    %label{:for => "tarball"} Tarball:
-    %input{:type => "file", :name => "tarball"}
-    - if env[:error][:tarball]
-      %p.error.quote #{env[:error][:tarball]}
-  %p
-    %label{:for => "checksum"} Checksum (SHA1):
-    %input{:type => "text", :name => "checksum", :size => "40", :value => "#{params[:checksum]}"}
-    - if env[:error][:checksum]
-      %p.error.quote #{env[:error][:checksum]}
-  %p.quote
-    %input{:type => "submit", :value => "Replace current tarball"}
+%fieldset
+  %form{:method => "post", :enctype => "multipart/form-data"}
+    %p
+      %label Filename: 
+      %input{:type => "text", :disabled => true, :value => @release.tarball_basename, :size => 30}
+    %p
+      %label{:for => "tarball"} Tarball:
+      %input{:type => "file", :name => "tarball", :size => 30}
+      - if env[:error][:tarball]
+        %p.error.quote #{env[:error][:tarball]}
+    %p
+      %label{:for => "checksum"} Checksum (SHA1):
+      %input{:type => "text", :name => "checksum", :size => "40", :value => "#{params[:checksum]}"}
+      - if env[:error][:checksum]
+        %p.error.quote #{env[:error][:checksum]}
+    %p.quote
+      %input{:type => "submit", :value => "Replace current tarball"}
diff --git a/lib/views/stylesheet.sass b/lib/views/stylesheet.sass
index 48ad6b4..abbf574 100755
--- a/lib/views/stylesheet.sass
+++ b/lib/views/stylesheet.sass
@@ -105,9 +105,7 @@ table
     a.inactive
       color: rgb(100, 150, 250)
 
-form
-  p
-    padding: 0.25em
+
 
 .columns p
   float: left
@@ -124,7 +122,6 @@ fieldset
   padding: 0em
   margin: 0em
 
-
   p
     padding: 0em
 
@@ -152,6 +149,9 @@ fieldset
   p.error, p.info
     padding-left: 1em
 
+  .message
+    height: 20em
+
 hr
   height: 0
   border: 0


More information about the Xfce4-commits mailing list