]> git.openstreetmap.org Git - rails.git/commitdiff
Move more styling into CSS and make it support RTL layout
authorTom Hughes <tom@compton.nu>
Sat, 2 Jul 2011 10:22:19 +0000 (11:22 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 2 Jul 2011 10:22:19 +0000 (11:22 +0100)
app/views/site/index.html.erb
app/views/user/account.html.erb
app/views/user/lost_password.html.erb
app/views/user/new.html.erb
app/views/user/reset_password.html.erb
public/stylesheets/common.css
public/stylesheets/ltr.css
public/stylesheets/rtl.css

index 5f42f416d65db6fb833f208408f35ee8ac8cdf8c..5c02efb82ffc5854e22d5cb0d69d3aecb25a2028 100644 (file)
 <div id="attribution">
   <table width="100%">
     <tr>
-      <td align="left"><%= t'site.index.license.license_url' %></td>
-      <td align="right"><%= t'site.index.license.project_url' %></td>
+      <td class="attribution_license"><%= t'site.index.license.license_url' %></td>
+      <td class="attribution_project"><%= t'site.index.license.project_url' %></td>
     </tr>
     <tr>
-      <td colspan="2" align="center"><%=
+      <td colspan="2" class="attribution_notice"><%=
         t'site.index.license.notice',
           :license_name => t('site.index.license.license_name'),
           :project_name => t('site.index.license.project_name')
index 74173755955281ba64904f1c06d4e44002dbe83c..bdc52fb8c1056a2dc6701fa10ee0a4b04eb22443 100644 (file)
@@ -33,7 +33,7 @@
   </tr>
 
   <tr>
-    <td class="fieldName" valign="top"><%= t 'user.account.public editing.heading' %></td>
+    <td class="fieldName"><%= t 'user.account.public editing.heading' %></td>
     <td>
       <% if @user.data_public? %>
         <%= t 'user.account.public editing.enabled' %> <span class="minorNote">(<a href="<%= t 'user.account.public editing.enabled link' %>" target="_new"><%= t 'user.account.public editing.enabled link text' %></a>)</span>
@@ -44,7 +44,7 @@
   </tr>
 
   <tr>
-    <td class="fieldName" valign="top"><%= t 'user.account.contributor terms.heading' %></td>
+    <td class="fieldName"><%= t 'user.account.contributor terms.heading' %></td>
     <td>
       <% if @user.terms_agreed? %>
         <%= t 'user.account.contributor terms.agreed' %>
   </tr>
 
   <tr>
-    <td class="fieldName" valign="top"><%= t 'user.account.profile description' %></td>
+    <td class="fieldName"><%= t 'user.account.profile description' %></td>
     <td><%= f.text_area :description, :rows => '5', :cols => '60' %></td>
   </tr>
 
   <tr>
-    <td class="fieldName" valign="top"><%= t 'user.account.preferred languages' %></td>
+    <td class="fieldName"><%= t 'user.account.preferred languages' %></td>
     <td><%= f.text_field :languages %></td>
   </tr>
 
   <tr>
-    <td class="fieldName" valign="top"><%= t 'user.account.preferred editor' %></td>
+    <td class="fieldName"><%= t 'user.account.preferred editor' %></td>
     <td><%= f.select :preferred_editor, [[t("editor.default", :name => t("editor.#{DEFAULT_EDITOR}.name")), 'default']] + Editors::ALL_EDITORS.collect { |e| [t("editor.#{e}.description"), e] } %></td>
   </tr>
 
   <tr>
-    <td class="fieldName" valign="top">
+    <td class="fieldName">
       <%= t 'user.account.image' %>
     </td>
     <td valign="top">
   
   <tr>
     <td></td>
-    <td align=right><br/><%= submit_tag t('user.account.save changes button') %></td>
+    <td class="submitButton"><%= submit_tag t('user.account.save changes button') %></td>
   </tr>
 </table>
 <% end %>
index c5d8bb004540c0b6fa87a8767168fa576e40e44e..cdee822e4f68f3540800de6d0da88fbe94461b36 100644 (file)
@@ -8,6 +8,9 @@
     <td class="fieldName"><%= t 'user.lost_password.email address' %></td>
     <td><%= text_field('user', 'email', {:size => 50, :maxlength => 255, :tabindex => 1} ) %></td>
   </tr>
-  <tr><td></td><td align="right"><input type="submit" value="<%= t'user.lost_password.new password button' %>" tabindex="2"></td></tr>
+  <tr>
+    <td></td>
+    <td class="submitButton"><input type="submit" value="<%= t'user.lost_password.new password button' %>" tabindex="2"></td>
+  </tr>
 </table>
 <% end %>
index 5ff4ed02863cc3b57fc85757e2c848c1a3c1fef7..cf9d0a8cec9fb77cc398650ca231ee94a85cf319 100644 (file)
@@ -68,7 +68,7 @@
 
     <tr>
       <td></td>
-      <td align="right"><%= submit_tag t('user.new.continue'), :tabindex => 6 %></td>
+      <td class="submitButton"><%= submit_tag t('user.new.continue'), :tabindex => 6 %></td>
     </tr>
   </table>
 <% end %>
index 7d2da5c78e1bb67748aaf7a2ec4629bb962181ea..bb00e8a6e83181c0789b99caa7d9a67e3ba6f43a 100644 (file)
@@ -9,6 +9,6 @@
   <tr><td class="fieldName"><%= t 'user.reset_password.confirm password' %></td><td><%= password_field(:user, :pass_crypt_confirmation, {:value => '', :size => 30, :maxlength => 255, :tabindex => 5}) %></td></tr>
   
   <tr><td colspan=2>&nbsp;<!--vertical spacer--></td></tr>
-  <tr><td></td><td align=right><input type="submit" value="<%= t'user.reset_password.reset' %>" tabindex="6"></td></tr>
+  <tr><td></td><td class="submitButton"><input type="submit" value="<%= t'user.reset_password.reset' %>" tabindex="6"></td></tr>
 </table>
 <% end %>
index f348b21eb8c5abdd85e8c3c9a2db8defe219e37a..da805616e0399c696bf1ba473e899794dd1c5575 100644 (file)
@@ -384,6 +384,10 @@ hr {
   display: none;
 }
 
+.attribution_notice {
+  text-align: center;
+}
+
 /* Rules for the popout map sidebar */
 
 #sidebar {
@@ -780,6 +784,10 @@ p#contributorGuidance {
   display: inline !important;
 }
 
+#accountForm input[type=submit] {
+  margin-top: 15px;
+}
+
 /* Rules for the user view */
 
 #user_details .user_map {
@@ -893,6 +901,7 @@ p#contributorGuidance {
 /* Rules for forms */
 
 .fieldName {
+  vertical-align: top;
   font-weight: bold;
 }
 
index 20088956390de061aaffc9b1a4fceab76dafa5cc..26d4f1fd85983df4c21ff6a8289df9a7952c55d6 100644 (file)
@@ -104,6 +104,16 @@ html body {
   text-align: left;
 }
 
+/* Rules for attribution text under the main map shown on printouts */
+
+.attribution_license {
+  text-align: left;
+}
+
+.attribution_project {
+  text-align: right;
+}
+
 /* Rules for the popout map sidebar */
 
 #sidebar {
@@ -227,6 +237,10 @@ form#termsForm input#agree {
   text-align: right;
 }
 
+.submitButton {
+  text-align: right;
+}
+
 input.openid_url { 
   background: url('../images/openid_input.png') repeat-y left white;
   padding-left: 16px;
index 428b63feddec1d97344abd3625e08b9702b5cffb..dd4d0f51df202035dd34604f279a62d7cfd67a2b 100644 (file)
@@ -111,6 +111,16 @@ html body {
   text-align: right;
 }
 
+/* Rules for attribution text under the main map shown on printouts */
+
+.attribution_license {
+  text-align: right;
+}
+
+.attribution_project {
+  text-align: left;
+}
+
 /* Rules for the popout map sidebar */
 
 #sidebar {
@@ -234,6 +244,10 @@ form#termsForm input#agree {
   text-align: left;
 }
 
+.submitButton {
+  text-align: left;
+}
+
 input.openid_url { 
   background: url('../images/openid_input.png') repeat-y right white;
   padding-right: 16px;