Page 1 of 1

Please tell me how to modify the admin (3.0.8) page's UI.

Posted: Mon Feb 10, 2014 11:34 am
by Shrod1951
Hi, I am broadleaf newbie.
So, as the title, please tell me the exact way.
Or maybe have some guide or tutorial.
Thanks in advance.

Regards,
ShrodTxD.

Re: Please tell me how to modify the admin (3.0.8) page's UI.

Posted: Tue Feb 11, 2014 3:13 pm
by phillipuniverse
Our admin tutorials are very sparse at the moment; we have a lot of internal things going on to close out some lingering tasks. Docs that include getting started enhancements and more admin tutorials and guides will take priority in the next couple of weeks.

Re: Please tell me how to modify the admin (3.0.8) page's UI.

Posted: Tue Feb 11, 2014 6:32 pm
by RapidTransit
Open your applicationContext-admin.xml located in the admin module

Copy and paste this:

Code: Select all

    <bean id="blAdminWebCustomTemplateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
        <property name="prefix" value="/WEB-INF/admin/templates/" />
        <property name="suffix" value=".html" />
        <property name="templateMode" value="HTML5" />
        <property name="characterEncoding" value="UTF-8" />
        <property name="cacheable" value="${cache.page.templates}"/>
        <property name="cacheTTLMs" value="${cache.page.templates.ttl}" />
        <property name="order" value="100"/>
    </bean>


Go to the package: broadleaf-open-admin-platform

Copy the templates folder under open_admin_style

Create a folder called admin under your WEB-INF paste the templates folder, and edit.

Add JS files: viewtopic.php?f=13&t=2428 this can be adapted to load css files just replace "Js" in all the names with "Css" ;)

Re: Please tell me how to modify the admin (3.0.8) page's UI.

Posted: Tue Feb 11, 2014 10:23 pm
by Shrod1951
RapidTransit wrote:Open your applicationContext-admin.xml located in the admin module

Copy and paste this:

Code: Select all

    <bean id="blAdminWebCustomTemplateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
        <property name="prefix" value="/WEB-INF/admin/templates/" />
        <property name="suffix" value=".html" />
        <property name="templateMode" value="HTML5" />
        <property name="characterEncoding" value="UTF-8" />
        <property name="cacheable" value="${cache.page.templates}"/>
        <property name="cacheTTLMs" value="${cache.page.templates.ttl}" />
        <property name="order" value="100"/>
    </bean>


Go to the package: broadleaf-open-admin-platform

Copy the templates folder under open_admin_style

Create a folder called admin under your WEB-INF paste the templates folder, and edit.

Add JS files: viewtopic.php?f=13&t=2428 this can be adapted to load css files just replace "Js" in all the names with "Css" ;)


The project is not loading my .html files inside ~/WEB-INF/admin/templates/

I changed applicationContext-admin.xml, copied templates from broadleaf-open-admin-platform and edited.
Then, i ran it from the provided build.xml (jetty-demo-jrebel) but got the html loaded from the library (broadleaf-open-admin-platform).

And, I don't know what you mean by this :
RapidTransit wrote:Add JS files: viewtopic.php?f=13&t=2428 this can be adapted to load css files just replace "Js" in all the names with "Css" ;)

Re: Please tell me how to modify the admin (3.0.8) page's UI.

Posted: Wed Feb 12, 2014 7:26 am
by RapidTransit
Have you tried running it under Tomcat? Running under Jetty from build.xml never worked correctly for me.

Re: Please tell me how to modify the admin (3.0.8) page's UI.

Posted: Wed Feb 12, 2014 10:19 pm
by Shrod1951
Yes, tried to run it on tomcat7 and never get it working..

Code: Select all

<!-- build.xml -->
<target name="tomcat-demo">
    <delete dir="war/WEB-INF/lib"/>
    <artifact:mvn mavenHome="${maven.home}" fork="true" jvmargs="-DbroadleafCoreDirectory=${broadleafCoreDirectory} -DbroadleafWorkspaceDirectory=${broadleafWorkspaceDirectory} -XX:MaxPermSize=256M -Xmx512M">
   <arg value="compile"/>
        <arg value="war:exploded"/>
        <arg value="tomcat7:run-war"/>
    </artifact:mvn>
</target>