mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-30 18:58:39 -04:00
In `CropsController#data_improvement`, paginate `@crops` with `per_page: 50` so tabs like photos/descriptions do not render all crops at once. In `data_improvement.html.haml`, render `= will_paginate @crops`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
16 lines
621 B
Plaintext
16 lines
621 B
Plaintext
%h1 Data Improvement
|
|
|
|
- tabs = { photos: "Photos", descriptions: "Descriptions", youtube: "YouTube videos", alternate_names: "Alternate names", wikidata: "Wikidata ID", public_food_key: "Public Food Key", row_spacing: "Row spacing", sun_requirements: "Sun requirements", height: "Height" }
|
|
|
|
%ul.nav.nav-tabs
|
|
- tabs.each do |key, value|
|
|
%li{class: "nav-item #{('active' if @active_tab == key.to_s)}"}
|
|
= link_to value, data_improvement_crops_path(tab: key)
|
|
|
|
.tab-content
|
|
.tab-pane.active
|
|
%h2= "Crops without #{tabs[@active_tab.to_sym]}"
|
|
= render 'crop_list', crops: @crops
|
|
|
|
= will_paginate @crops
|