mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
# This is a combination of 5 commits.tree d6d4f31283e42c44c9c4d116567ce7b1a99a13ab
parent b680697af6
author Nihal Mohammed <mnihal64@outlook.com> 1621004464 +0530
committer Nihal Mohammed <mnihal64@outlook.com> 1621022463 +0530
# This is a combination of 4 commits.
# This is the 1st commit message:
Add advanced settings button to incoming and outgoing pages in OC cycle edit
# This is the commit message #2:
Remove extra header text
# This is the commit message #3:
Moved repeating code blocks to partial
# This is the commit message #4:
Refactored code
# This is the commit message #5:
Delete _advanced_settings_hidden.html.haml
This commit is contained in:
committed by
Andy Brett
parent
7eac465b18
commit
c335ec3b29
19
app/views/admin/order_cycles/_order_cycle_top_buttons.haml
Normal file
19
app/views/admin/order_cycles/_order_cycle_top_buttons.haml
Normal file
@@ -0,0 +1,19 @@
|
||||
- content_for :page_actions do
|
||||
:javascript
|
||||
function toggleSettings(){
|
||||
if( $('#advanced_settings').is(":visible") ){
|
||||
$('button#toggle_settings i').switchClass("icon-chevron-up","icon-chevron-down")
|
||||
}
|
||||
else {
|
||||
$('button#toggle_settings i').switchClass("icon-chevron-down","icon-chevron-up")
|
||||
}
|
||||
$("#advanced_settings").slideToggle()
|
||||
}
|
||||
|
||||
%li
|
||||
%button#toggle_settings{ onClick: 'toggleSettings()' }
|
||||
= t('.advanced_settings')
|
||||
%i.icon-chevron-down
|
||||
|
||||
#advanced_settings{ hidden: true }
|
||||
= render partial: "/admin/order_cycles/advanced_settings"
|
||||
@@ -1,3 +1,20 @@
|
||||
- content_for :page_actions do
|
||||
:javascript
|
||||
function toggleSettings(){
|
||||
if( $('#advanced_settings').is(":visible") ){
|
||||
$('button#toggle_settings i').switchClass("icon-chevron-up","icon-chevron-down")
|
||||
}
|
||||
else {
|
||||
$('button#toggle_settings i').switchClass("icon-chevron-down","icon-chevron-up")
|
||||
}
|
||||
$("#advanced_settings").slideToggle()
|
||||
}
|
||||
|
||||
%li
|
||||
%button#toggle_settings{ onClick: 'toggleSettings()' }
|
||||
= t('.advanced_settings')
|
||||
%i.icon-chevron-down
|
||||
|
||||
- content_for :page_title do
|
||||
= t :edit_order_cycle
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
- content_for :page_actions do
|
||||
:javascript
|
||||
function toggleSettings(){
|
||||
if( $('#advanced_settings').is(":visible") ){
|
||||
$('button#toggle_settings i').switchClass("icon-chevron-up","icon-chevron-down")
|
||||
}
|
||||
else {
|
||||
$('button#toggle_settings i').switchClass("icon-chevron-down","icon-chevron-up")
|
||||
}
|
||||
$("#advanced_settings").slideToggle()
|
||||
}
|
||||
|
||||
%li
|
||||
%button#toggle_settings{ onClick: 'toggleSettings()' }
|
||||
= t('.advanced_settings')
|
||||
%i.icon-chevron-down
|
||||
|
||||
- content_for :page_title do
|
||||
= t :edit_order_cycle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user