hiding sidebar for general users

View: New views
8 Messages — Rating Filter:   Alert me  

hiding sidebar for general users

by Esteban Lorenzano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All, 
I'm a complete newbie on pier, although I have some experience on general seaside, so, excuse me if I ask siple questions... I didn't find them on the list, so, maybe there are too easy.
I'm trying to make the website for may company, and of course, I don't want it looks like a wiki, I want it looks professional, like lukas page (http://www.lukas-renggli.ch/)  or "kamikaze" page (http://kamikaze.seasidehosting.st)
After this long introduction, here is my first question: 

How do I hide sidebar for general users, and allow it for "admin" users? 
I can took off +sidebar+ div from "environment " template... but then I don't have the commands for admins neither.

And here is another dumb question: Is there a way to have "childrens" (from a children component) in a specific order?

Thanks in advance,
Esteban

"Querer es suscitar las paradojas"
Camus - El mito de Sísifo



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

Re: hiding sidebar for general users

by Lukas Renggli-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Esteban,

> How do I hide sidebar for general users, and allow it for "admin"  
> users?
> I can took off +sidebar+ div from "environment " template... but  
> then I don't have the commands for admins neither.

If you have loaded Pier-Security you can set the view permissions of  
the side-bar to the admin only. This means you remove all the  
permissions from Group and Others of the side-bar page. In this case  
it won't be displayed.

> And here is another dumb question: Is there a way to have  
> "childrens" (from a children component) in a specific order?

I don't exactly understand what you mean by order. When you embed the  
children using links they are always inserted in a specific order.

        +first-component+
        +second-component+
        +third-component+

Lukas


>
> Thanks in advance,
> Esteban
>
> "Querer es suscitar las paradojas"
> Camus - El mito de Sísifo
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

Re: hiding sidebar for general users

by Esteban Lorenzano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, Lukas,

I'm doing something wrong, because I have the package and tryed to use it and nothing happened. Here is a more detailed explanation: 

First, I'm using latest versions of Seaside 2.8, Scriptaculous and Magritte and Pier (magritte and pier installed through "Magrite-All" (260) and pier through "Pier-All" (279)

In the browser, I select "Change Other", picking "remove", "recursive" and "view" in the list, then apply... and nothing happens. 
If I select "Environment" and then repeat the operation I describe... and again, nothing. 
Trying the same operation with Pier-OB and I have the same result.

El 16/03/2008, a las 12:39PM, Lukas Renggli escribió:

Hi Esteban,

How do I hide sidebar for general users, and allow it for "admin"  
users?
I can took off +sidebar+ div from "environment " template... but  
then I don't have the commands for admins neither.

If you have loaded Pier-Security you can set the view permissions of  
the side-bar to the admin only. This means you remove all the  
permissions from Group and Others of the side-bar page. In this case  
it won't be displayed.

And here is another dumb question: Is there a way to have  
"childrens" (from a children component) in a specific order?

I don't exactly understand what you mean by order. When you embed the  
children using links they are always inserted in a specific order.

+first-component+
+second-component+
+third-component+

Lukas



Thanks in advance,
Esteban

"Querer es suscitar las paradojas"
Camus - El mito de Sísifo


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...

-- 
Lukas Renggli



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...

"Querer es suscitar las paradojas"
Camus - El mito de Sísifo



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

Re: hiding sidebar for general users

by Lukas Renggli-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> First, I'm using latest versions of Seaside 2.8, Scriptaculous and  
> Magritte and Pier (magritte and pier installed through "Magrite-
> All" (260) and pier through "Pier-All" (279)

That sounds perfect.

> In the browser, I select "Change Other", picking "remove",  
> "recursive" and "view" in the list, then apply... and nothing happens.
> If I select "Environment" and then repeat the operation I  
> describe... and again, nothing.
> Trying the same operation with Pier-OB and I have the same result.

 From a default installation you have to make sure that all structure  
have an owner and a group. You can do this from the root (default  
settings not shown):

        Change Owner

        Recursive: true
        Owner: Admin

        -> Apply

Then you need to log-in, as a lot of functionality disappeared due to  
missing authentication.

        Login

        Username: admin
        Password: pier

        -> Login

Next set the group. Again in the root (default settings not shown):

        Change Group
       
        Recursive: true
        Owner: Admin

        -> Apply

Now you can go to a page that should not be visible for non  
administrators and apply the following:

        Change Other

        Recrusive: true
        Operator: Remove
        Permissions: View

        -> Apply

When you log-out the page is not visible or accessible anymore.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

Re: hiding sidebar for general users

by cdrick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

> I'm doing something wrong, because I have the package and tryed to use it
> and nothing happened. Here is a more detailed explanation:
>
> First, I'm using latest versions of Seaside 2.8, Scriptaculous and Magritte
> and Pier (magritte and pier installed through "Magrite-All" (260) and pier
> through "Pier-All" (279)
>
> In the browser, I select "Change Other", picking "remove", "recursive" and
> "view" in the list, then apply... and nothing happens.

not sure but maybe you need to log as admin... then change other and
so on... + logout

Cédrick


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

Re: hiding sidebar for general users

by Esteban Lorenzano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Lukas, that do the trick... :)

For the other problem, I'm talking about PRChildrenWidget, lets say I add tree pages, pageA, pageX and pageB, in that order... i want to see the components as I added, I mean "pageA pageX pageB", but the component orders the links alphabeticaly, and I get "pageA pageB pageX"

Thanks again,
Esteban

El 16/03/2008, a las 1:37PM, Lukas Renggli escribió:

First, I'm using latest versions of Seaside 2.8, Scriptaculous and  
Magritte and Pier (magritte and pier installed through "Magrite- 
All" (260) and pier through "Pier-All" (279)

That sounds perfect.

In the browser, I select "Change Other", picking "remove",  
"recursive" and "view" in the list, then apply... and nothing happens.
If I select "Environment" and then repeat the operation I  
describe... and again, nothing.
Trying the same operation with Pier-OB and I have the same result.

 From a default installation you have to make sure that all structure  
have an owner and a group. You can do this from the root (default  
settings not shown):

Change Owner

Recursive: true
Owner: Admin

-> Apply

Then you need to log-in, as a lot of functionality disappeared due to  
missing authentication.

Login

Username: admin
Password: pier

-> Login

Next set the group. Again in the root (default settings not shown):

Change Group


Recursive: true
Owner: Admin

-> Apply

Now you can go to a page that should not be visible for non  
administrators and apply the following:

Change Other

Recrusive: true
Operator: Remove
Permissions: View

-> Apply

When you log-out the page is not visible or accessible anymore.

Lukas

-- 
Lukas Renggli


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...

"Querer es suscitar las paradojas"
Camus - El mito de Sísifo



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

Re: hiding sidebar for general users

by Lukas Renggli-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Thanks Lukas, that do the trick... :)

Good.

> For the other problem, I'm talking about PRChildrenWidget, lets say  
> I add tree pages, pageA, pageX and pageB, in that order... i want to  
> see the components as I added, I mean "pageA pageX pageB", but the  
> component orders the links alphabeticaly, and I get "pageA pageB  
> pageX"

That was currently not possible. I fixed it in Pier-Model-lr.215,  
where the children are stored in a OrderedCollection. There is a  
migration script included that makes this migration automatically.

By default the new version still sorts the items alphabetically  
according to the title. However you can open an inspector on the  
kernel and change the #childrenSortBlock: property to nil, to get the  
children listened unordered. There is no UI to change the order of the  
children, but that can be done later on. For now, you have to stick  
with the inspector.

HTH,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

Re: hiding sidebar for general users

by Esteban Lorenzano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks lukas, I'll do it

Esteban 

El 17/03/2008, a las 12:46PM, Lukas Renggli escribió:

Thanks Lukas, that do the trick... :)

Good.

For the other problem, I'm talking about PRChildrenWidget, lets say  
I add tree pages, pageA, pageX and pageB, in that order... i want to  
see the components as I added, I mean "pageA pageX pageB", but the  
component orders the links alphabeticaly, and I get "pageA pageB  
pageX"

That was currently not possible. I fixed it in Pier-Model-lr.215,  
where the children are stored in a OrderedCollection. There is a  
migration script included that makes this migration automatically.

By default the new version still sorts the items alphabetically  
according to the title. However you can open an inspector on the  
kernel and change the #childrenSortBlock: property to nil, to get the  
children listened unordered. There is no UI to change the order of the  
children, but that can be done later on. For now, you have to stick  
with the inspector.

HTH,
Lukas

-- 
Lukas Renggli


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...

"Querer es suscitar las paradojas"
Camus - El mito de Sísifo



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki