##// END OF EJS Templates
Added the ability to reset its own RSS access key on "My account"....
Jean-Philippe Lang -
r666:39c9874a4102
parent child
Show More
@@ -52,10 +52,9 class MyController < ApplicationController
52 52 @pref = @user.pref
53 53 @user.attributes = params[:user]
54 54 @user.pref.attributes = params[:pref]
55 if request.post? and @user.save and @user.pref.save
56 set_localization
57 flash.now[:notice] = l(:notice_account_updated)
58 self.logged_in_user.reload
55 if request.post? && @user.save && @user.pref.save
56 flash[:notice] = l(:notice_account_updated)
57 redirect_to :action => 'account'
59 58 end
60 59 end
61 60
@@ -76,6 +75,15 class MyController < ApplicationController
76 75 end
77 76 redirect_to :action => 'account'
78 77 end
78
79 # Create a new feeds key
80 def reset_rss_key
81 if request.post? && User.current.rss_token
82 User.current.rss_token.destroy
83 flash[:notice] = l(:notice_feeds_access_key_reseted)
84 end
85 redirect_to :action => 'account'
86 end
79 87
80 88 # User's page layout configuration
81 89 def page_layout
@@ -1,7 +1,12
1 1 <h2><%=l(:label_my_account)%></h2>
2 2
3 <p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
4 <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
3 <p><%=l(:field_login)%>: <strong><%= @user.login %></strong>
4 <br /><%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>
5 <% if @user.rss_token %>
6 <br /><%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %>
7 (<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)
8 <% end %>
9 </p>
5 10
6 11 <%= error_messages_for 'user' %>
7 12
@@ -70,7 +70,8 notice_locking_conflict: Друг потребител променя тези
70 70 notice_scm_error: Несъществуващ обект в склада.
71 71 notice_not_authorized: Нямате право на достъп до тази страница.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Вашата парола
76 77 mail_subject_register: Активация на акаунт
@@ -411,6 +412,7 label_date_to: To
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Вход
416 418 button_submit: Изпращане
@@ -442,6 +444,7 button_unwatch: Спри наблюдението
442 444 button_reply: Reply
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: активен
447 450 status_registered: регистриран
@@ -70,7 +70,8 notice_locking_conflict: Datum wurde von einem anderen Benutzer geändert.
70 70 notice_scm_error: Eintrag und/oder Revision besteht nicht im Projektarchiv.
71 71 notice_not_authorized: Sie sind nicht berechtigt auf diese Seite zuzugreifen.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Ihr redMine Kennwort
76 77 mail_subject_register: redMine Kontoaktivierung
@@ -411,6 +412,7 label_date_to: Bis
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Einloggen
416 418 button_submit: OK
@@ -442,6 +444,7 button_unwatch: Unwatch
442 444 button_reply: Reply
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: aktiv
447 450 status_registered: angemeldet
@@ -70,7 +70,8 notice_locking_conflict: Data have been updated by another user.
70 70 notice_scm_error: Entry and/or revision doesn't exist in the repository.
71 71 notice_not_authorized: You are not authorized to access this page.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Your redMine password
76 77 mail_subject_register: redMine account activation
@@ -411,6 +412,7 label_date_to: To
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Login
416 418 button_submit: Submit
@@ -442,6 +444,7 button_unwatch: Unwatch
442 444 button_reply: Reply
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: active
447 450 status_registered: registered
@@ -70,7 +70,8 notice_locking_conflict: Data have been updated by another user.
70 70 notice_scm_error: La entrada y/o la revisión no existe en el depósito.
71 71 notice_not_authorized: You are not authorized to access this page.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Tu contraseña del redMine
76 77 mail_subject_register: Activación de la cuenta del redMine
@@ -411,6 +412,7 label_date_to: To
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Conexión
416 418 button_submit: Someter
@@ -442,6 +444,7 button_unwatch: Unwatch
442 444 button_reply: Reply
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: active
447 450 status_registered: registered
@@ -71,6 +71,7 notice_scm_error: "L'entrée et/ou la révision demandée n'existe pas dans le d
71 71 notice_not_authorized: "Vous n'êtes pas autorisés à accéder à cette page."
72 72 notice_email_sent: "Un email a été envoyé à %s"
73 73 notice_email_error: "Erreur lors de l'envoi de l'email (%s)"
74 notice_feeds_access_key_reseted: Votre clé d'accès aux flux RSS a été réinitialisée.
74 75
75 76 mail_subject_lost_password: Votre mot de passe redMine
76 77 mail_subject_register: Activation de votre compte redMine
@@ -411,6 +412,7 label_date_to: Au
411 412 label_language_based: Basé sur la langue
412 413 label_sort_by: Trier par "%s"
413 414 label_send_test_email: Envoyer un email de test
415 label_feeds_access_key_created_on: Clé d'accès RSS créée il y a %s
414 416
415 417 button_login: Connexion
416 418 button_submit: Soumettre
@@ -442,6 +444,7 button_unwatch: Ne plus surveiller
442 444 button_reply: Répondre
443 445 button_archive: Archiver
444 446 button_unarchive: Désarchiver
447 button_reset: Réinitialiser
445 448
446 449 status_active: actif
447 450 status_registered: enregistré
@@ -70,7 +70,8 notice_locking_conflict: Le informazioni sono state modificate da un altro utent
70 70 notice_scm_error: La risorsa e/o la versione non esistono nel repository.
71 71 notice_not_authorized: You are not authorized to access this page.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Password redMine
76 77 mail_subject_register: Attivazione utenza redMine
@@ -411,6 +412,7 label_date_to: To
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Login
416 418 button_submit: Invia
@@ -442,6 +444,7 button_unwatch: Unwatch
442 444 button_reply: Reply
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: attivo
447 450 status_registered: registrato
@@ -71,7 +71,8 notice_locking_conflict: 別のユーザがデータを更新しています。
71 71 notice_scm_error: リポジトリに、エントリ/リビジョンが存在しません。
72 72 notice_not_authorized: このページにアクセスするには認証が必要です。
73 73 notice_email_sent: An email was sent to %s
74 notice_email_error: An error occurred while sending mail (%s)"
74 notice_email_error: An error occurred while sending mail (%s)
75 notice_feeds_access_key_reseted: Your RSS access key was reseted.
75 76
76 77 mail_subject_lost_password: redMineパスワード
77 78 mail_subject_register: redMineアカウントが有効になりました
@@ -412,6 +413,7 label_date_to: To
412 413 label_language_based: Language based
413 414 label_sort_by: Sort by "%s"
414 415 label_send_test_email: Send a test email
416 label_feeds_access_key_created_on: RSS access key created %s ago
415 417
416 418 button_login: ログイン
417 419 button_submit: 変更
@@ -443,6 +445,7 button_unwatch: ウォッチをやめる
443 445 button_reply: 返答
444 446 button_archive: 書庫に保存
445 447 button_unarchive: 書庫から戻す
448 button_reset: Reset
446 449
447 450 status_active: 有効
448 451 status_registered: 登録
@@ -70,7 +70,8 notice_locking_conflict: De gegevens zijn gewijzigd door een andere gebruiker.
70 70 notice_scm_error: Deze ingang of revisie bestaat niet in de repository.
71 71 notice_not_authorized: Het is U niet toegestaan om deze pagina te raadplegen.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Uw redMine wachtwoord
76 77 mail_subject_register: redMine account activatie
@@ -411,6 +412,7 label_date_to: To
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Inloggen
416 418 button_submit: Toevoegen
@@ -442,6 +444,7 button_unwatch: Niet meer monitoren
442 444 button_reply: Antwoord
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: Actief
447 450 status_registered: geregistreerd
@@ -70,7 +70,8 notice_locking_conflict: Os dados foram atualizados por um outro usuario.
70 70 notice_scm_error: A entrada e/ou a revisao nao existem no repositorio.
71 71 notice_not_authorized: You are not authorized to access this page.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Sua senha do redMine.
76 77 mail_subject_register: Ativacao de conta do redMine.
@@ -411,6 +412,7 label_date_to: To
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Login
416 418 button_submit: Enviar
@@ -442,6 +444,7 button_unwatch: Unwatch
442 444 button_reply: Reply
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: ativo
447 450 status_registered: registrado
@@ -70,7 +70,8 notice_locking_conflict: Os dados foram atualizados por um outro usuário.
70 70 notice_scm_error: A entrada e/ou a revisão não existem no repositório.
71 71 notice_not_authorized: Você não está autorizado a acessar esta página.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Sua senha do redMine.
76 77 mail_subject_register: Ativação de conta do redMine.
@@ -411,6 +412,7 label_date_to: To
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Login
416 418 button_submit: Enviar
@@ -442,6 +444,7 button_unwatch: Não observar
442 444 button_reply: Reply
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: ativo
447 450 status_registered: registrado
@@ -70,7 +70,8 notice_locking_conflict: Data har uppdaterats av en annan användare.
70 70 notice_scm_error: Inlägg och/eller revision finns inte i repositoriet.
71 71 notice_not_authorized: You are not authorized to access this page.
72 72 notice_email_sent: An email was sent to %s
73 notice_email_error: An error occurred while sending mail (%s)"
73 notice_email_error: An error occurred while sending mail (%s)
74 notice_feeds_access_key_reseted: Your RSS access key was reseted.
74 75
75 76 mail_subject_lost_password: Ditt redMine lösenord
76 77 mail_subject_register: redMine kontoaktivering
@@ -411,6 +412,7 label_date_to: To
411 412 label_language_based: Language based
412 413 label_sort_by: Sort by "%s"
413 414 label_send_test_email: Send a test email
415 label_feeds_access_key_created_on: RSS access key created %s ago
414 416
415 417 button_login: Logga in
416 418 button_submit: Skicka
@@ -442,6 +444,7 button_unwatch: Unwatch
442 444 button_reply: Reply
443 445 button_archive: Archive
444 446 button_unarchive: Unarchive
447 button_reset: Reset
445 448
446 449 status_active: activ
447 450 status_registered: registrerad
@@ -73,7 +73,8 notice_locking_conflict: 数据已被另一个用户更新
73 73 notice_scm_error: 在版本库中不存在该条目或修订
74 74 notice_not_authorized: You are not authorized to access this page.
75 75 notice_email_sent: An email was sent to %s
76 notice_email_error: An error occurred while sending mail (%s)"
76 notice_email_error: An error occurred while sending mail (%s)
77 notice_feeds_access_key_reseted: Your RSS access key was reseted.
77 78
78 79 mail_subject_lost_password: 您的redMine口令
79 80 mail_subject_register: redMine帐户激活
@@ -413,6 +414,7 label_date_to: To
413 414 label_language_based: Language based
414 415 label_sort_by: Sort by "%s"
415 416 label_send_test_email: Send a test email
417 label_feeds_access_key_created_on: RSS access key created %s ago
416 418
417 419 button_login: 登录
418 420 button_submit: 提交
@@ -444,6 +446,7 button_unwatch: Unwatch
444 446 button_reply: Reply
445 447 button_archive: Archive
446 448 button_unarchive: Unarchive
449 button_reset: Reset
447 450
448 451 status_active: 激活
449 452 status_registered: 已注册
General Comments 0
You need to be logged in to leave comments. Login now