Merge remote-tracking branch 'upstream/pull/3489'
This commit is contained in:
commit
5110b1c706
9 changed files with 32 additions and 27 deletions
|
@ -7,10 +7,12 @@
|
||||||
<% if @applications.length > 0 %>
|
<% if @applications.length > 0 %>
|
||||||
<table class="table table-borderless table-striped">
|
<table class="table table-borderless table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
<th><%= t ".name" %></th>
|
<th><%= t ".name" %></th>
|
||||||
<th><%= t ".permissions" %></th>
|
<th><%= t ".permissions" %></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<%= render :partial => "application", :collection => @applications %>
|
<%= render :partial => "application", :collection => @applications %>
|
||||||
|
|
|
@ -48,4 +48,4 @@
|
||||||
<div>
|
<div>
|
||||||
<%= link_to t(".edit"), edit_oauth_application_path(@application), :class => "btn btn-outline-primary" %>
|
<%= link_to t(".edit"), edit_oauth_application_path(@application), :class => "btn btn-outline-primary" %>
|
||||||
<%= link_to t(".delete"), oauth_application_path(@application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_delete") } } %>
|
<%= link_to t(".delete"), oauth_application_path(@application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_delete") } } %>
|
||||||
</td>
|
</div>
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
<% if @applications.length > 0 %>
|
<% if @applications.length > 0 %>
|
||||||
<table class="table table-borderless table-striped">
|
<table class="table table-borderless table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
<th><%= t ".application" %></th>
|
<th><%= t ".application" %></th>
|
||||||
<th><%= t ".permissions" %></th>
|
<th><%= t ".permissions" %></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<%= render :partial => "application", :collection => @applications %>
|
<%= render :partial => "application", :collection => @applications %>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<%= javascript_include_tag "edit/id" %>
|
<%= javascript_include_tag "edit/id" %>
|
||||||
|
|
||||||
<div id="map">
|
<div id="map">
|
||||||
<% data = { :key => Settings.id_key } -%>
|
<% data = { :key => Settings.id_key }
|
||||||
<% data[:lat] = @lat if @lat -%>
|
data[:lat] = @lat if @lat
|
||||||
<% data[:lon] = @lon if @lon -%>
|
data[:lon] = @lon if @lon
|
||||||
<% data[:gpx] = trace_data_url(params[:gpx], :format => :xml) if params[:gpx] -%>
|
data[:gpx] = trace_data_url(params[:gpx], :format => :xml) if params[:gpx]
|
||||||
<% data[:url] = id_url(:locale => params[:locale]) -%>
|
data[:url] = id_url(:locale => params[:locale]) %>
|
||||||
<%= tag.iframe "", :frameBorder => 0, :id => "id-embed", :class => "id-embed", :allowfullscreen => "", :data => data %>
|
<%= tag.iframe "", :frameBorder => 0, :id => "id-embed", :class => "id-embed", :allowfullscreen => "", :data => data %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<a href='<%= t ".#{site}.url" %>'>
|
<a href='<%= t ".#{site}.url" %>'>
|
||||||
<%= t ".#{site}.title" %>
|
<%= t ".#{site}.title" %>
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h6>
|
||||||
<p class='card-text'><%= t ".#{site}.description" %></p>
|
<p class='card-text'><%= t ".#{site}.description" %></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
|
|
|
@ -8,16 +8,16 @@
|
||||||
<!-- <![endif]-->
|
<!-- <![endif]-->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<% data = {} -%>
|
<% data = {}
|
||||||
<% if Settings.key?(:id_key) %>
|
if Settings.key?(:id_key)
|
||||||
<% token = current_user.access_token(Settings.id_key) %>
|
token = current_user.access_token(Settings.id_key)
|
||||||
<% data[:token] = token.token -%>
|
data[:token] = token.token
|
||||||
<% data[:token_secret] = token.secret -%>
|
data[:token_secret] = token.secret
|
||||||
<% data[:consumer_key] = token.client_application.key -%>
|
data[:consumer_key] = token.client_application.key
|
||||||
<% data[:consumer_secret] = token.client_application.secret -%>
|
data[:consumer_secret] = token.client_application.secret
|
||||||
<% end %>
|
end
|
||||||
<% data[:locale] = ID::LOCALES.preferred(preferred_languages).to_s -%>
|
data[:locale] = ID::LOCALES.preferred(preferred_languages).to_s
|
||||||
<% data[:asset_map] = assets("iD").to_json -%>
|
data[:asset_map] = assets("iD").to_json %>
|
||||||
<%= tag.div "", :id => "id-container", :data => data %>
|
<%= tag.div "", :id => "id-container", :data => data %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<% content_for :heading do %>
|
<% content_for :heading do %>
|
||||||
<h1><%= t(".heading_html", :name => link_to(@user.display_name, user_path(@user))) %></h1>
|
<h1><%= t(".heading_html", :name => link_to(@user.display_name, user_path(@user))) %></h1>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @user_blocks.empty? %>
|
<% unless @user_blocks.empty? %>
|
||||||
<%= render :partial => "blocks", :locals => { :show_revoke_link => can?(:revoke, UserBlock), :show_user_name => false, :show_creator_name => true } %>
|
<%= render :partial => "blocks", :locals => { :show_revoke_link => can?(:revoke, UserBlock), :show_user_name => false, :show_creator_name => true } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -51,7 +51,7 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest
|
||||||
get oauth_applications_path
|
get oauth_applications_path
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template "oauth2_applications/index"
|
assert_template "oauth2_applications/index"
|
||||||
assert_select "tr", 2
|
assert_select "tbody tr", 2
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_new
|
def test_new
|
||||||
|
|
|
@ -33,7 +33,7 @@ class Oauth2AuthorizedApplicationsControllerTest < ActionDispatch::IntegrationTe
|
||||||
get oauth_authorized_applications_path
|
get oauth_authorized_applications_path
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template "oauth2_authorized_applications/index"
|
assert_template "oauth2_authorized_applications/index"
|
||||||
assert_select "tr", 2
|
assert_select "tbody tr", 2
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_destroy
|
def test_destroy
|
||||||
|
@ -58,6 +58,6 @@ class Oauth2AuthorizedApplicationsControllerTest < ActionDispatch::IntegrationTe
|
||||||
get oauth_authorized_applications_path
|
get oauth_authorized_applications_path
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template "oauth2_authorized_applications/index"
|
assert_template "oauth2_authorized_applications/index"
|
||||||
assert_select "tr", 1
|
assert_select "tbody tr", 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue