Problem with overriding a plugin element when an Admin prefix is used in Cakephp 4 - templates

My App is both using prefix Admin and having a plugin RubriquesManager.
In the plugin RubriquesManager I have 2 elements articles for each side (front side and admin side) :
/plugins/RubriquesManager/templates/element/articles.php displays articles for front side
/plugins/RubriquesManager/templates/Admin/element/articles.php displays articles for admin side (with buttons for article editing, deleting, ...)
In order to override in my app the front side element articles of plugin RubriquesManager I have created the file :
/templates/plugin/RubriquesManager/element/articles.php
The problem is that Cake is using this element both for overriding element articles for front side and also for admin side while I didn't create /templates/plugin/RubriquesManager/Admin/element/articles.php !...
I don't understand the point for Cake to act like that ? Is there a way to tell to Cake not to try to overide for admin side ?

Related

How to create a tab-like registration form in Ionic 2 & 3

I am creating a registration form in ionic and would like to have the registration page split into different tabs. what i mean is to have the user click on "Next" after filling the information on the first page and so on to the last page before submitting the form. Any pointers or assistance will be highly appreciated.
I am pretty much a beginner with ionic 2 & 3
I think you are finding for Ionic Slides. You can achieve your target by using this.
Please check this.
https://ionicframework.com/docs/api/components/slides/Slides/
you can lock the sliding by parameter shouldLockSwipeToNext. Then user will not be able to swipe to the next slide.

Replacing default admin display for adding Foreign Key for Page

I'm looking for a way to replace default display for Page Foreign Key in admin.
Django cms is reading all pages and titles for pages and it's putting it in a select html tag. My problem is that I have more than 10000 pages and generating that list takes some time. The plugin I wrote can have multiple of links like that and Django cms is loading that list for every element, so time is multiplied by number of elements. I would love to have a way to just press a button for a new window to show up where user can select page from a list in that new window and simply add it to an element in a plugin. I tried to use django-autocomplete-light but I can't get it to work with cms.
Thank you.
That is exactly what raw_id_fields does.

In the Django admin is there a way to have a list filter at the top instead of the side

I would like to filter on some columns that only have a couple of possible values, with only a couple of values the side filter wastes a lot of screen real estate I need for data. So I was wondering if there was some way to have a filter in the top bar next to the date selector.
Consider using Grappelli. It is a very popular django app, it modifies the admin interface and the filter section (to be pop-up instead of fixed to right)
If you want that, you are essentially talking about modifying django admin template behavior. For that you would need to create a admin template in you own django app and you can change the way the template is rendered...

Playframework 2 include a updatable combobox in a list (not a form)

I am using play framework 2.0 .I a page where I list all the elements that the user can edit/delete. one of the listed elements in a look up from another table. I have coded a select in the forms and that works fine.
I would like to include the combo box in the displayed list, so the user can update it right there without having to drill down into each element to update the field. Is there a way to do this? I want to listen to the change in the combobox and update the underlying model.
I tried a few iterations, but the select box seems to want a play.api.data.Field , and not the value I provide.
the parameters to the page is a pageable list like this
#(currentPage: Page[Deal], currentSortBy: String, currentOrder: String, currentFilter: String)
I don't know if I understand the issue, but I think the problem you are stating would be better solved at the client, with some ajax in it...
otherwise, you would be issuing a whole page refresh every time the user updates the items
I would expose the pageable list like a rest-json web service, and I wuld call it from javascript, binding the on-change event...
Here you have an example using select2 to do the lookup and consumign a rest web service: http://bb-jugar.rhcloud.com/assets/js/tmp/select2/demo.html

How to hide the list ribbon in XSLT List Web part in SharePoint 2010?

In SharePoint 2010, I have a custom list "Clients" on a site. On the home page of the site, I have added a Clients List Web Part. When I access the home page in a browser and click anywhere in that list, it displays the "List Tool" ribbon group which has "Items" and "List" ribbons. I do NOT want these ribbons at all when clicking on the list. How do I achieve this? Should I disable the click event on the list so these ribbons do NOT appear? How do I disable the click event on the list? Or What should I do to hide these ribbons when clicking on the list?
Basically I want it to behave same as content query web part. In content query web part, if you click anywhere in it, it doesn't show up any extra ribbons. I want the same behavior with list web part.
Thanks
Hitesh
One approach would be to follow the tutorial outlined in this blog post: Remove actions from the ribbon: SharePoint 2010
The end result is a UserControl that you can place on any page and "trim" (i.e. hide) certain portions of the Ribbon: entire tabs, or individual groups or buttons on the ribbon.
If you follow the prescribed solution from the blog, then you would add the following lines in your Page_Load event:
SPRibbon ribbon = SPRibbon.GetCurrent(this.Page);
if (ribbon != null) {
ribbon.TrimById( SPRibbon.ListTabId );
ribbon.TrimById( SPRibbon.ListItemTabId );
}
Additional ribbon element IDs can be found at:
As referenced in the CMDUI.xml XML file
As defined by public fields on SPRibbon (used in example above)
Of course, the downside to using this approach is that the particular ribbon elements you hide are hard-coded in the UserControl. To get around this, I used the UserControl as a basis to create a Web Part that allows you to define which ribbon elements to hide via a property. It works great and is generic enough to be applicable to many different scenarios.