1 <%= javascript_include_tag "edit/potlatch2" %>
4 <% session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%>
5 <% data = { :token => session[:token] } -%>
6 <% data[:lat] = @lat if @lat -%>
7 <% data[:lon] = @lon if @lon -%>
8 <% data[:zoom] = @zoom if @zoom -%>
9 <% if defined? POTLATCH2_KEY %>
10 <% token = @user.access_token(POTLATCH2_KEY) %>
11 <% data[:token] = token.token -%>
12 <% data[:token_secret] = token.secret -%>
13 <% data[:consumer_key] = token.client_application.key -%>
14 <% data[:consumer_secret] = token.client_application.secret -%>
16 <% data[:locale] = Locale.list(Potlatch2::LOCALES.keys).preferred(preferred_languages).to_s -%>
17 <% data[:locale_path] = asset_path("potlatch2/locales/#{Potlatch2::LOCALES[data[:locale]]}.swf") -%>
18 <%= content_tag :div, raw(t("site.edit.flash_player_required")), :id => "potlatch", :data => data %>