Is it possible to hide/invisible notebook page based on states? (Odoo 13) - state

I have the notebook page and 4 states in the form view.
I want the notebook page just to show in states 1 and 2 when clicking the wizard button. But when it changes to states 3 and 4, it will be hide/invisible.
So is it possible to do it?
Please help!
Thank you!

Add invisible attributes for the page.
<page string="Product Details" attrs="{'invisible':[('state', 'in', [2, 4])]}">
...
</page>
If state in [2, 4] is true, then the page will be invisible.
For more details, read reference

Related

How to add a custom "More Posts" button to Blogger hompage

I am creating my my own custom blogget tenplate.I'm fetching posts to my blog using b:loop and want to fetch only 4 or 5 posts in one page/hompage. so it will make my blog load faster. but then I need a "More Posts" button to view the other posts list as 4 or 5 per page.so can you help me to do this?
what code do I need? demo of more posts button blogger:
Try to use this shortcode :
<data:posts[i].oldestLinkUrl/>
More info about this in this article
https://bloggercode-blogconnexion.blogspot.com/1973/08/Blog-data-posts-oldestLinkUrl.html

OPENCART - 4 products in category page

how can I put 4 products per line in my categories page
https://fixfone.pt/index.php?route=product/category&path=345
need help to resolve this :(
I do not know what to do anymore
this is just CSS. since you are using Bootstrap simply change the class for
.product-grid.col-md-4
to
.product-grid.col-md-3
if you catalog/view/theme/YOUR THEME/template/product/catalog.twig
If you are working on default theme, just Go to this directory:
catalog/view/javascript/common.js (Line 164)
change:
$('#product-list').attr('class', 'row row-cols-1 row-cols-sm-2 row-cols-md-2 row-cols-lg-3');
to
$('#product-list').attr('class', 'row row-cols-1 row-cols-sm-2 row-cols-md-2 row-cols-lg-4');
and go to (Line 177) and do the same change again then you are Done.

Where do I set fields that can be edited in Sitecore editor options?

Where in sitecore do I configure what fields are displayed when I click this button? (Currently, it lists 3 of the 7 fields that are on the template, I'd like to add another to be editable).
Screenshot
It is one of Edit Frame buttons. When you open your control markup, you see something like this:
<sc:EditFrame ID="editFrame" runat="server" Buttons="/sitecore/content/Applications/WebEdit/Edit Frame Buttons/Default">
...
</sc:EditFrame>
It differs for MVC, but is similar. You need to get Buttons attribute value.
When you open /sitecore/content/Applications/WebEdit/Edit Frame Buttons/Default path in core database you see list of children. It is your buttons. For your case it should be only one button: Edit Item. This item has Fields field where using pipe as delimiter is list of fields that are available for editing.

Shinyjs: On click option in shiny dashboard

I have a shiny dashboard app with 3 tabs and a notification menu. I am trying to track user activity on the dashboard and wish to log each of their clicks on the dashboard.
The code in server.R for the tabset panel is as below:
output$tabs1=renderUI(
tabsetPanel(type="tab",
tabPanel(id="OverallTab","Overall Activity"),
tabPanel(id="Tab1","Tab 1 details"),
tabPanel(id="Tab2","Tab 2 details"))
Part of my notification code is as below:
output$notiMenu <- renderMenu({
all_nots <- apply(u_notd, 1, function(row) {
notificationItem(text = row[["notification"]], icon("users"))
})
dropdownMenu(type = "notifications", .list = all_nots)
})
I am trying to use shinyjs to write to a dataframe if a user clicks on either of the tabs or notification menu as below:
tab1_clicled=""
tab2_clicked=""
noti_clicked=""
shinyjs::onclick("notiMenu",print("Notification clicked"),noti_clicked="YES")
shinyjs::onclick("Tab1",print("Tab1 clicked"),tab1_clicled="YES")
shinyjs::onclick("Tab2", print("Tab2 clicked"),tab2_clicled="YES")
df=as.data.frame(tab1_clicked,tab2_clicked,noti_clicked)
I face 2 issues here,
1) the on click option doesn't appear to work for the tab panels, using the shinyjs reference(here), I see that there is only a mention of using on click for the tabset panel and not for each tab panel?
2) I'm unable to modify the value of tab1_clicked inside the onclick function. It throws an error saying: Unhandled error in observer: unused argument (tab1_clicled = "YES")
Appreciate any help.
I just quickly skimmed your code and I can see two errors. The first parameter of onclick is the ID of the element. In your case, you want the ID of the actual tab button, but unfortunately the way tabs work in shiny, "Tab1" is actually the ID of the container of the tab panel but it's not the id of the tab button itself. Look at the HTML of a shiny app and you'll see that. Tabs are a bit weird and annoying and it's really difficult to deal with the tab buttons themselves in shiny.
Secondly, The second argument of onclick is the expression, but you're trying to run two expressions print("Tab1 clicked") and tab1_clicled="YES". You need to wrap these in {} so that it's considered one expression, like this:
onclick(id, {print("Tab1 clicked"); tab1_clicled="YES"}
But unfortunately getting the id of the tab button is difficult so I don't think onclick will be useful for that

ActiveAdmin: Open show page in Facebox

As the title suggests, I am trying to get the view link on the index page for my resource to open the show page in a facebox or other popup window, without the main page redirecting and loading the page there. Is there any way to achieve this?
Replace the view link with your own link logic.
index do
selectable_column
column :name
actions do |resource|
link_to "View", resource.facebook_url
end
end
CITE: http://activeadmin.info/docs/3-index-pages/index-as-table.html