Add an explicit "default editor" option to the user settings
This commit is contained in:
parent
02f7b87515
commit
9c2de4039c
4 changed files with 18 additions and 7 deletions
|
@ -109,7 +109,11 @@ class UserController < ApplicationController
|
||||||
@user.home_lat = params[:user][:home_lat]
|
@user.home_lat = params[:user][:home_lat]
|
||||||
@user.home_lon = params[:user][:home_lon]
|
@user.home_lon = params[:user][:home_lon]
|
||||||
|
|
||||||
@user.preferred_editor = params[:user][:preferred_editor]
|
if params[:user][:preferred_editor] == "default"
|
||||||
|
@user.preferred_editor = nil
|
||||||
|
else
|
||||||
|
@user.preferred_editor = params[:user][:preferred_editor]
|
||||||
|
end
|
||||||
|
|
||||||
if @user.save
|
if @user.save
|
||||||
set_locale
|
set_locale
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
<div id="editmenu">
|
<div id="editmenu">
|
||||||
<ul>
|
<ul>
|
||||||
<% Editors::ALL_EDITORS.each do |editor| %>
|
<% Editors::ALL_EDITORS.each do |editor| %>
|
||||||
<li><%= link_to t('layouts.edit_with', :editor => t('user.account.editor.' + editor)), {:controller => 'site', :action => 'edit', :editor => editor}, {:id => editor + 'anchor'} %></li>
|
<li><%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")), {:controller => 'site', :action => 'edit', :editor => editor}, {:id => editor + 'anchor'} %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="fieldName" valign="top"><%= t 'user.account.preferred editor' %></td>
|
<td class="fieldName" valign="top"><%= t 'user.account.preferred editor' %></td>
|
||||||
<td><%= f.select :preferred_editor, Editors::ALL_EDITORS.collect { |e| [t('user.account.editor.'+e), e] } %></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>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -79,6 +79,17 @@ en:
|
||||||
with_id: "{{id}}"
|
with_id: "{{id}}"
|
||||||
with_version: "{{id}}, v{{version}}"
|
with_version: "{{id}}, v{{version}}"
|
||||||
with_name: "{{name}} ({{id}})"
|
with_name: "{{name}} ({{id}})"
|
||||||
|
editor:
|
||||||
|
default: "Default (currently {{name}})"
|
||||||
|
potlatch:
|
||||||
|
name: "Potlatch 1"
|
||||||
|
description: "Potlatch 1 (in-browser editor)"
|
||||||
|
potlatch2:
|
||||||
|
name: "Potlatch 2"
|
||||||
|
description: "Potlatch 2 (in-browser editor)"
|
||||||
|
josm:
|
||||||
|
name: "JOSM"
|
||||||
|
description: "JOSM (via remote-control plugin)"
|
||||||
browse:
|
browse:
|
||||||
changeset:
|
changeset:
|
||||||
title: "Changeset"
|
title: "Changeset"
|
||||||
|
@ -1660,10 +1671,6 @@ en:
|
||||||
return to profile: Return to profile
|
return to profile: Return to profile
|
||||||
flash update success confirm needed: "User information updated successfully. Check your email for a note to confirm your new email address."
|
flash update success confirm needed: "User information updated successfully. Check your email for a note to confirm your new email address."
|
||||||
flash update success: "User information updated successfully."
|
flash update success: "User information updated successfully."
|
||||||
editor:
|
|
||||||
potlatch: "Potlatch 1 (in-browser editor)"
|
|
||||||
potlatch2: "Potlatch 2 (in-browser editor)"
|
|
||||||
josm: "JOSM (via remote-control plugin)"
|
|
||||||
confirm:
|
confirm:
|
||||||
heading: Confirm a user account
|
heading: Confirm a user account
|
||||||
press confirm button: "Press the confirm button below to activate your account."
|
press confirm button: "Press the confirm button below to activate your account."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue