Fix upload link in iqdb action
This commit is contained in:
parent
7a7d8c0dcc
commit
e2b84fa079
@ -58,6 +58,7 @@ module YiffRest
|
||||
end
|
||||
|
||||
def iqdb
|
||||
@sp = {}
|
||||
end
|
||||
|
||||
def query_iqdb
|
||||
|
@ -9,13 +9,13 @@
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<%= link_to "Home", yiff_rest_api_v2_manage_index_path, class: "nav-link#{if_active(' active', path: yiff_rest_api_v2_manage_index_path)}" %>
|
||||
<%= link_to("Home", yiff_rest_api_v2_manage_index_path, class: "nav-link#{if_active(' active', path: yiff_rest_api_v2_manage_index_path)}") %>
|
||||
</li>
|
||||
<% if params[:controller] == "yiff_rest/api_v2/manage" %>
|
||||
<% elsif params[:controller] == "yiff_rest/api_v2/images" %>
|
||||
<% if %w[index iqdb query_iqdb].include?(params[:action]) %>
|
||||
<li class="nav-item">
|
||||
<%= link_to "Upload Image", new_yiff_rest_api_v2_manage_image_path(api_image: ({ category: @sp[:category] } if @sp[:category])), class: "nav-link#{if_active(' active', path: new_yiff_rest_api_v2_manage_image_path(manage_id: params[:id]))}" %>
|
||||
<%= link_to("Upload Image", new_yiff_rest_api_v2_manage_image_path(api_image: ({ category: @sp[:category] } if @sp[:category])), class: "nav-link#{if_active(' active', path: new_yiff_rest_api_v2_manage_image_path(manage_id: params[:id]))}") %>
|
||||
</li>
|
||||
<% else %>
|
||||
<% category = params.dig(:api_image, :category) if params[:action] == "new" %>
|
||||
@ -23,7 +23,7 @@
|
||||
<% category = @image.category if params[:action] == "edit" %>
|
||||
<% if category %>
|
||||
<li class="nav-item">
|
||||
<%= link_to "Back To Category", yiff_rest_api_v2_manage_images_path(search: { category: category }), class: "nav-link" %>
|
||||
<%= link_to("Back To Category", yiff_rest_api_v2_manage_images_path(search: { category: category }), class: "nav-link") %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
Loading…
Reference in New Issue
Block a user