I think it should be there by default! It is very better to have subfolders.

On Tue, Mar 6, 2012 at 8:26 PM, Bruce Wade <bruce.w...@gmail.com> wrote:

> If anyone is interested (note there may be a better way) I customized my
> ad to have the views collapse/expand like the static ones based on folders.
>
> Replace the code in admin->views->default->design.html between:
>
> <!-- VIEWS -->
>
> and
>
> <!-- LANGUAGES -->
>
> <!-- VIEWS -->
>
> <h3 id="views" onclick="collapse('views_inner');" class="component">
>   {{=T("Views")}}
>   <span class="tooltip">{{=helpicon()}} <span>{{=T("The presentations
> layer, views are also known as templates")}}</span></span>
> </h3>
> <div id="views_inner" class="component_contents">
>   <div class="controls comptools">
>     {{=button(LAYOUTS_APP, T("download layouts"))}}
>   </div>
>   {{if not views:}}<p><strong>{{=T("There are no
> views")}}</strong></p>{{pass}}
>   <ul>
>     {{
>     path=[]
>     for file in views:
>       items=file.split('/')
>       file_path=items[:-1]
>       filename=items[-1]
>       while path!=file_path:
>           if len(file_path)>=len(path) and all([v==file_path[k] for k,v in
> enumerate(path)]):
>               path.append(file_path[len(path)])
>     }}
>     <li class="folder">
>     <a
> href="javascript:collapse('views__{{=file.replace('/','__').replace('.','__')}}');"
> class="file">{{=path[-1]}}/</a>
>     <ul id="views__{{=file.replace('/','__').replace('.','__')}}"
> style="display: none;" class="sublist">{{
>           else:
>               path = path[:-1]
>       }}
>     </ul></li>
>     {{
>               pass
>           pass
>       if filename:
>       }}<li>
>       <span class="filetools controls">
>  {{=editfile('views',file)}} {{=deletefile([app,'views',file])}}
>       </span>
>       <span class="file">
>   {{=peekfile('views',file)}}
>       </span>
>       <span class="extras">
>       {{if extend.has_key(file):}}{{=T("extends")}}
> <b>{{=extend[file]}}</b> {{pass}}
>       {{if include[file]:}}{{=T("includes")}} {{pass}}{{=XML(',
> '.join([B(f).xml() for f in include[file]]))}}
>       </span>
>     </li>{{
>           pass
>       pass
>     }}
>     {{pass}}
>   </ul>
>   <div class="controls formfield">{{=file_create_form('%s/views/' %
> app)}}</div>
> </div>
>
> On Tue, Mar 6, 2012 at 3:00 PM, Bruce Wade <bruce.w...@gmail.com> wrote:
>
>> Hi,
>>
>> I would like to change the views listing in design so it acts like the
>> static listing. Where everything that is in a folder becomes hidden and
>> only shown when you click on the folder. IE: click on CSS shows all css
>> files. In views click on default shows all html files related to default.
>>
>> Any pointers on where to look in order to change this?
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.warplydesigned.com
>> http://www.fitnessfriendsfinder.com
>>
>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.warplydesigned.com
> http://www.fitnessfriendsfinder.com
>



-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to