mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-20 22:24:09 +01:00
Changed code to support basic i18n.
Added RubyMine configuration and rvm setup to .gitignore.
This commit is contained in:
parent
04faa5d408
commit
fd3f69d927
99 changed files with 1157 additions and 601 deletions
|
|
@ -1,15 +1,15 @@
|
|||
<div id="single_box" class="container context authtype_container">
|
||||
|
||||
<h2>Change authentication type</h2>
|
||||
<h2><%= t('users.change_authentication_type') %></h2>
|
||||
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<p>Select your new authentication type and click 'Change Authentication Type' to replace your current settings.</p>
|
||||
<p><%= t('users.select_authentication_type') %></p>
|
||||
|
||||
<% form_tag :action => 'update_auth_type' do %>
|
||||
<div><label for="user_auth_type">Authentication type:</label> <%= select('user', 'auth_type', Tracks::Config.auth_schemes.collect {|p| [ p, p ] }) %></div>
|
||||
<div id="open_id" style="display:<%= current_user.auth_type == 'open_id' ? 'block' : 'none' %>"><label for="user_open_id_url">Identity URL:</label> <input type="text" name="openid_url" value="<%= current_user.open_id_url %>" class="open_id" /></div>
|
||||
<div class="actions"><%= submit_tag 'Change Authentication Type' %> <%= link_to 'Cancel', preferences_path %></div>
|
||||
<div><label for="user_auth_type"><%= t('users.label_auth_type') %>:</label> <%= select('user', 'auth_type', Tracks::Config.auth_schemes.collect {|p| [ p, p ] }) %></div>
|
||||
<div id="open_id" style="display:<%= current_user.auth_type == 'open_id' ? 'block' : 'none' %>"><label for="openid_url"><%= t('users.identity_url') %>:</label> <input type="text" name="openid_url" value="<%= current_user.open_id_url %>" class="open_id" /></div>
|
||||
<div class="actions"><%= submit_tag t('users.auth_change_submit') %> <%= link_to t('common.cancel'), preferences_path %></div>
|
||||
|
||||
<%= observe_field( :user_auth_type, :function => "$('open_id').style.display = value == 'open_id' ? 'block' : 'none'") %>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@
|
|||
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<p>Enter your new password in the fields below and click 'Change Password' to replace your current password with your new one.</p>
|
||||
<p><%= t('users.change_password_prompt') %></p>
|
||||
|
||||
<% form_tag :action => 'update_password' do %>
|
||||
<table width="440px">
|
||||
<tr>
|
||||
<td><label for="updateuser_password">New password:</label></td>
|
||||
<td><label for="updateuser_password"><%= t('users.new_password_label') %>:</label></td>
|
||||
<td><%= password_field "updateuser", "password", :size => 40 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="updateuser_password_confirmation">Confirm password:</label></td>
|
||||
<td><label for="updateuser_password_confirmation"><%= t('users.password_confirmation_label') %>:</label></td>
|
||||
<td><%= password_field "updateuser", "password_confirmation", :size => 40 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= link_to 'Cancel', preferences_path %></td>
|
||||
<td><%= submit_tag 'Change password' %></td>
|
||||
<td><%= link_to t('common.cancel'), preferences_path %></td>
|
||||
<td><%= submit_tag t('users.change_password_submit') %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
if @saved
|
||||
page["user-#{@deleted_user.id}"].remove
|
||||
page['user_count'].replace_html @total_users.to_s
|
||||
page.notify :notice, "User #{@deleted_user.login} was successfully destroyed", 2.0
|
||||
page.notify :notice, t('users.destroy_successful', :login => @deleted_user.login), 2.0
|
||||
else
|
||||
page.notify :error, "There was an error deleting the user #{@deleted_user.login}", 8.0
|
||||
page.notify :error, t('users.destroy_error', :login => @deleted_user.login), 8.0
|
||||
end
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
<h1>Manage users</h1>
|
||||
<h1><%= t('users.manage_users') %></h1>
|
||||
|
||||
<p>You have a total of <span id="user_count"><%= @total_users %></span> users</p>
|
||||
<p><%= t('users.total_users_count', :count => "<span id=\"user_count\">#{@total_users}</span>") %></p>
|
||||
|
||||
<table class="users_table">
|
||||
<tr>
|
||||
<th>Login</th>
|
||||
<th>Full name</th>
|
||||
<th>Authorization type</th>
|
||||
<th>Open ID URL</th>
|
||||
<th>Total actions</th>
|
||||
<th>Total contexts</th>
|
||||
<th>Total projects</th>
|
||||
<th>Total notes</th>
|
||||
<th><%= User.human_attribute_name('login') %></th>
|
||||
<th><%= User.human_attribute_name('display_name') %></th>
|
||||
<th><%= User.human_attribute_name('auth_type') %></th>
|
||||
<th><%= User.human_attribute_name('open_id_url') %></th>
|
||||
<th><%= t('users.total_actions') %></th>
|
||||
<th><%= t('users.total_contexts') %></th>
|
||||
<th><%= t('users.total_projects') %></th>
|
||||
<th><%= t('users.total_notes') %></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
<% for user in @users %>
|
||||
<tr <%= "class=\"highlight\"" if user.is_admin? %> id="user-<%= user.id %>">
|
||||
<td><%=h user.login %></td>
|
||||
<td><%=h user.last_name? ? user.display_name : '-' %></td>
|
||||
<td><%=h user.display_name %></td>
|
||||
<td><%= h user.auth_type %></td>
|
||||
<td><%= h user.open_id_url || '-' %></td>
|
||||
<td><%= h user.todos.size %></td>
|
||||
|
|
@ -25,9 +25,9 @@
|
|||
<td><%= h user.projects.size %></td>
|
||||
<td><%= h user.notes.size %></td>
|
||||
<td><%= !user.is_admin? ? link_to_remote(
|
||||
image_tag("blank.png", :title =>"Destroy user", :class=>"delete_item"),
|
||||
image_tag("blank.png", :title =>t('users.destroy_user'), :class=>"delete_item"),
|
||||
{ :url => user_path(user.id), :method => :delete,
|
||||
:confirm => "Warning: this will delete user \'#{user.login}\', all their actions, contexts, project and notes. Are you sure that you want to continue?" },
|
||||
:confirm => t('users.destroy_confirmation', :login => user.login) },
|
||||
{ :class => "icon" } ) : " " %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
@ -36,4 +36,4 @@
|
|||
<%= will_paginate @users %>
|
||||
</p>
|
||||
|
||||
<p><%= link_to 'Signup new user', signup_path %></p>
|
||||
<p><%= link_to t('users.signup_new_user'), signup_path %></p>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<div title="Account signup" id="signupform" class="form">
|
||||
<div title="<%= t('users.account_signup') %>" id="signupform" class="form">
|
||||
<% form_tag :action=> "create" do %>
|
||||
|
||||
<%= error_messages_for 'user' %><br/>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<table>
|
||||
<%if Tracks::Config.auth_schemes.include?('cas') && session[:cas_user]%>
|
||||
<tr>
|
||||
<td><label for="user_login">With your CAS username:</label></td>
|
||||
<td><label for="user_login"><%= t('users.register_with_cas') %>:</label></td>
|
||||
<td> "<%= session[:cas_user]%>" </td>
|
||||
<td>
|
||||
<%= hidden_field "user", "login", :value => session[:cas_user] %>
|
||||
|
|
@ -20,25 +20,25 @@
|
|||
</tr>
|
||||
<%else%>
|
||||
<tr>
|
||||
<td><label for="user_login">Desired login:</label></td>
|
||||
<td><label for="user_login"><%= t('users.desired_login') %>:</label></td>
|
||||
<td> <%= text_field "user", "login", :size => 20 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="user_password">Choose password:</label></td>
|
||||
<td><label for="user_password"><%= t('users.choose_password') %>:</label></td>
|
||||
<td><%= password_field "user", "password", :size => 20 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="user_password_confirmation">Confirm password:</label></td>
|
||||
<td><label for="user_password_confirmation"><%= t('users.confirm_password') %>:</label></td>
|
||||
<td><%= password_field "user", "password_confirmation", :size => 20 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="user_auth_type">Authentication Type:</label></td>
|
||||
<td><label for="user_auth_type"><%= User.human_attribute_name('auth_type') %>:</label></td>
|
||||
<td><%= select("user", "auth_type", @auth_types, { :include_blank => false })%></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" id="signup" value="Signup »" class="primary" /></td>
|
||||
<td><input type="submit" id="signup" value="<%= t('users.signup') %> »" class="primary" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
5
app/views/users/nosignup.de.html.erb
Normal file
5
app/views/users/nosignup.de.html.erb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<div title="No signups" id="signupform" class="form">
|
||||
<h3>Benutzerregistrierung deaktiviert</h3>
|
||||
<p>Dieser Server erlaubt keine freie Benutzerregistrierung.</p>
|
||||
<p>Bitte wenden Sie sich <%= mail_to "#{@admin_email}", "via E-mail", :encode => "hex" %> an den Administrator, um ein Konto zu erhalten.</p>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue