-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfixes: menu bar profile picture, persmissions, posessive pronouns
- Loading branch information
1 parent
e4b314c
commit ae4d62d
Showing
11 changed files
with
61 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,6 @@ def update_password? | |
end | ||
|
||
def show_secrets? | ||
user == record | ||
user.try(:is_admin?) || user == record | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<%= bootstrap_form_tag url: ui_user_path(@user.id), method: :delete do |f| %> | ||
<%= f.hidden_field :token, value: @token %> | ||
<p><%= t(:delete_user_warning_html, username: current_user.username) %></p> | ||
<%= f.text_field :username, label: t(:delete_user_username_label) %> | ||
<%= f.text_field :username, label: t(:delete_user_username_label, owner: possessive(@user, current_user)) %> | ||
<div class="mt-4"> | ||
<%= f.primary t(:delete_user_submit), class: "btn btn-danger w-100 w-md-auto" %> | ||
<%= f.primary t(:delete_user_submit, owner: possessive(@user, current_user, first_person: true)), class: "btn btn-danger w-100 w-md-auto" %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
en: | ||
second_person_possessive: "your" | ||
third_person_possessive: "%{username}'s" | ||
first_person_possessive: "my" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
en: | ||
show_user_headline: "User: %{username}" | ||
show_user_profile_pic_alt: "Profile picture for user %{username}" | ||
show_user_edit_cta: "Edit your profile" | ||
show_user_secrets_cta: "Show your API keys" | ||
show_user_edit_cta: "Edit %{owner} profile" | ||
show_user_secrets_cta: "Show %{owner} API keys" | ||
show_user_log_out_cta: "Sign out" | ||
secrets_user_blurb_html: This key gives you access to your data in the SmartCitizen platform using the <a href="https://developer.smartcitizen.me/" target="_blank">REST API</a>. <strong>Please keep it safe and do not share with anyone, just as you would with a password</strong>. | ||
|
||
|
||
secrets_user_api_key_label: API key | ||
secrets_user_forwarding_heading: Your MQTT Forwarding Keys | ||
secrets_user_forwarding_blurb_html: Your account has MQTT forwarding enabled, so you can connect directly to our MQTT broker to receive new readings from your devices as they are posted. You will need the following username and token to authenticate. <strong>As above, please treat these credentials as if they were your password, and do not share them with anyone</strong>. | ||
secrets_user_forwarding_heading: "%{owner} MQTT Forwarding Keys" | ||
secrets_user_forwarding_blurb_html: "This account has MQTT forwarding enabled, so you can connect directly to our MQTT broker to receive new readings from your devices as they are posted. You will need the following username and token to authenticate. <strong>As above, please treat these credentials as if they were your password, and do not share them with anyone</strong>." | ||
secrets_user_forwarding_token_label: MQTT forwarding token | ||
secrets_user_forwarding_username_label: MQTT forwarding username | ||
new_user_submit: "Sign up" | ||
|
@@ -24,10 +22,10 @@ en: | |
edit_user_account_details_subhead: "Account details" | ||
edit_user_public_profile_subhead: "Public profile" | ||
edit_user_other_actions_subhead: "Other Actions" | ||
edit_user_delete_account_submit: "Permanently delete your account" | ||
edit_user_delete_account_submit: "Permanently delete %{owner} account" | ||
delete_user_warning_html: "🚨<strong>Warning!</strong> This will permanently delete the account <strong>%{username}</strong> and all of its devices.🚨" | ||
delete_user_username_label: "To confirm, type your username below:" | ||
delete_user_submit: "I understand, delete my account" | ||
delete_user_username_label: "To confirm, type %{owner} username below:" | ||
delete_user_submit: "I understand, delete %{owner} account" | ||
users_password_reset_landing_confirmation_label: "Confirm new password" | ||
users_password_reset_landing_submit: "Change my password" | ||
post_delete_user_blurb_html: "If you have deleted your account in error, please contact <a href='mailto:[email protected]'>Smart Citizen support<a> as soon as possible. After 24 hours, your account and all devices will be deleted permanently." | ||
|