Page control buttons when logged in as admin

Permalink
When an admin logs into my site, there is a row of buttons on the top of the page. The problem is that when users that are not admins log in, this area is still shown without the buttons.

There is a div element with id=ccm-page-controls-wrapper for the admin with admin buttons. When an non-admin logs in, this div is not shown, but the div below it with class=outer_container still appears with css top=49px reserving that place.

Here is a code overview when an admin is logged in:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body>
  <div id="ccm-page-controls-wrapper">
    <div id="ccm-page-controls">...
    <div id="ccm-page-detail">...
  </div>
  <div class="outer_container">
    ...
  </div>
</body>
</html>


How can I hide these 49 pixles when the logged in user is not an admin?

itrio
 
hbartlett replied on at Permalink Reply
hbartlett
Just wanted to revive this to see if there was an answer. I've just run into this; I used to put code into my themes to compensate for the 49 pixel top bar when logged in, it seems now with 5.4.2 it's done automatically which is great... Except that I am putting together a site that includes a group of registered users that don't have access to the top bar, and therefore they get a blank 49 pixel space at the top of the pages that are restricted to them. The other pages that the general public can see don't have this problem, even when they are logged in.

Is there some setting for this somewhere? Don't need or want the top bar available for normal registered users, just admins. Should I maybe just set a -49 pixel margin for the protected pages?
jordanlev replied on at Permalink Reply
jordanlev
hbartlett replied on at Permalink Reply
hbartlett
Thanks Jordan, seems messy though. The new C5 version seems to simply add a 49 pixel margin to the top of the body element if any user is logged in, which seems silly. The event that should fire that added margin should be the appearance of the bar itself (however that happens). It would be nice if this behaviour were fixed. I don't want to start putting in hacks based on groups that could change with the next upgrade.

For now I'm just commenting out that line in ccm.ui.css, which looks funny when logged in as admin but does the trick for now.
jordanlev replied on at Permalink Reply
jordanlev
I wasn't aware of a change like this in 5.4.2 -- can you point out the place it's doing this?
And I wonder if instead of changing it in the system css file, you could just add an overriding rule on the same selector in your own theme's stylesheet?
hbartlett replied on at Permalink Reply
hbartlett
I copied /concrete/css/ccm.ui.css to /css/ccm.ui.css and just commented out line 2. This css file seems to get called when someone is logged in, which is fine most of the time when you want the top bar there. The problem is I have a group of registered users that log in to access (read) a couple of pages only, and this fires up anyway on those pages.

**edited to add: I should note that this css file is only called on pages that are protected, i.e. general public viewable pages don't get this even when a user is logged in.

Commenting out the line means there's no background on the bar, and it looks funny for the admin and editors, but it is functional for now until I have more time to track down the real fix.