[ 
https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787040#action_12787040
 ] 

Adrian Crum edited comment on OFBIZ-3274 at 12/7/09 6:39 PM:
-------------------------------------------------------------

I don't agree that multi-column layout is defined at the theme level. If the 
GlobalDecorator has code like

{code}
<container style="left">
    <decorator-section-include name="left-column"/>
</container>
{code}

then where is the "left-column" decorator-section defined? In the application 
or in the theme?

So, let's consider the approach I suggested, and maybe we can meet in the 
middle. ;-)

The GlobalDecorator:

{code}
<screen name="GlobalDecorator">
    ...
    <container style="contentarea">
        <decorator-section-include name="pre-body"/>
        <decorator-section-include name="body"/>
    </container>
    ...
</screen>
{code}

The MultiColumnDecorator:

{code}
<screen name="MultiColumnDecorator">
    ...
    <decorator-screen name="GlobalDecorator">
        <decorator-section name="body">
            <container id="column-container">
                <container style="left">
                    <decorator-section-include name="left-column"/>
                </container>
                <container id="content-main-section" style="leftonly">
                    <decorator-section-include name="body"/>
                </container>
                <container style="clear"></container>
            </container>
        </decorator-section>
    </decorator-screen>
    ...
</screen>
{code}

The multi-column screen:

{code}
<screen name="MultiColumnScreen">
    ...
    <decorator-screen name="MultiColumnDecorator">
        <decorator-section name="left-column">
            ...
        </decorator-section>
        <decorator-section name="body">
            ...
        </decorator-section>
    </decorator-screen>
    ...
</screen>
{code}



      was (Author: adri...@hlmksw.com):
    I don't agree that multi-column layout is defined at the theme level. If 
the GlobalDecorator has code like

{code}
<container style="left">
    <decorator-section-include name="left-column"/>
</container>
{code}

then where is the "left-column" decorator-section defined? In the application 
or in the theme?

So, let's consider the approach I suggested, and maybe we can meet in the 
middle. ;-)

The GlobalDecorator:

{code}
<screen name="GlobalDecorator">
    ...
    <container style="contentarea">
        <decorator-section-include name="pre-body"/>
        <decorator-section-include name="body"/>
    </container>
    ...
</screen>

The MultiColumnDecorator:

<screen name="MultiColumnDecorator">
    ...
    <decorator-screen name="GlobalDecorator">
        <decorator-section name="body">
            <container id="column-container">
                <container style="left">
                    <decorator-section-include name="left-column"/>
                </container>
                <container id="content-main-section" style="leftonly">
                    <decorator-section-include name="body"/>
                </container>
                <container style="clear"></container>
            </container>
        </decorator-section>
    </decorator-screen>
    ...
</screen>

The multi-column screen:

<screen name="MultiColumnScreen">
    ...
    <decorator-screen name="MultiColumnDecorator">
        <decorator-section name="left-column">
            ...
        </decorator-section>
        <decorator-section name="body">
            ...
        </decorator-section>
    </decorator-screen>
    ...
</screen>
{code}


  
> Using decorator sections to control the left-bar
> ------------------------------------------------
>
>                 Key: OFBIZ-3274
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3274
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Bruno Busco
>            Assignee: Bruno Busco
>         Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 
> DecoratorSectionLayout.patch
>
>
> Hi,
> at the moment, in order to have a screen rendered with or without a left bar, 
> the variables "leftbarScreenName", "leftbarScreenLocation" and 
> "MainColumnStyle" need to be set to select a screen for the left bar and a 
> main column style.
> This must be done in the screen itself or an application decorator.
> With the attached patch, submitted for your review, a new GlobalDecorator 
> section named "left-bar" has been added. If a screen must be displayed with a 
> left bar this new decorator section needs to be filled with the selected 
> content.
> The main column style is defined in the Global decorator. In order to do this 
> a new screen condition has been added: "if-empty-decorator-section". This 
> condition allows to check if a decorator section has been added content or 
> not. (actually it only checks if the decorator section has been defined).
> In the patch I updated all catalog application screens to use this new method.
> If there are no problems with you with this, I will commit in the next days.
> Thank you for sharing your thoughts about.
> -Bruno

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to