Fix upload link in iqdb action

This commit is contained in:
Donovan Daniels 2024-10-13 02:45:34 -05:00
parent 7a7d8c0dcc
commit e2b84fa079
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA
2 changed files with 4 additions and 3 deletions

View File

@ -58,6 +58,7 @@ module YiffRest
end
def iqdb
@sp = {}
end
def query_iqdb

View File

@ -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 %>