Jump to content

Change Dashboard for non-admins


Shad86

Recommended Posts

Hey guys,

I would like to show and hide some parts in the backoffice of 1.7.2.4 for non admins. Admins can get shown everything but all other employees need a reduced dashboard.

I´ve disabled everything in the backoffice but they still get the news and update info. So I´ve tried to edit the view.tpl in /admin/themes/default/template/controllers/dashboard/helpers/view like this:

        {if $id_employee = 1}
            <section class="dash_news panel">
                <h3><i class="icon-rss"></i> {l s='PrestaShop News' d='Admin.Dashboard.Feature'}</h3>
                <div class="dash_news_content"></div>
                <div class="text-center"><h4><a href="http://www.prestashop.com/blog/" onclick="return !window.open(this.href);">{l s='Find more news' d='Admin.Dashboard.Feature'}</a></h4></div>
            </section>
            <section id="dash_version" class="visible-lg">
                <iframe style="overflow:hidden;border:none" src="{$new_version_url|escape:'html':'UTF-8'}" ></iframe>
            </section>
            <section class="dash_links panel">
                <h3><i class="icon-link"></i> {l s="Useful links" d='Admin.Dashboard.Feature'}</h3>
                    <dl>
                        <dt><a href="http://doc.prestashop.com/display/PS16?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="Official Documentation" d='Admin.Dashboard.Feature'}</a></dt>
                        <dd>{l s="User, Developer and Designer Guides" d='Admin.Dashboard.Feature'}</dd>
                    </dl>
                    <dl>
                        <dt><a href="http://www.prestashop.com/forums?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="PrestaShop Forum" d='Admin.Dashboard.Feature'}</a></dt>
                        <dd>{l s="Connect with the PrestaShop community" d='Admin.Dashboard.Feature'}</dd>
                    </dl>
                    <dl>
                        <dt><a href="http://addons.prestashop.com?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="PrestaShop Addons" d='Admin.Dashboard.Feature'}</a></dt>
                        <dd>{l s="Enhance your store with templates & modules" d='Admin.Dashboard.Feature'}</dd>
                    </dl>
                    <dl>
                        <dt><a href="http://forge.prestashop.com?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="The Forge" d='Admin.Dashboard.Feature'}</a></dt>
                        <dd>{l s="Report issues in the Bug Tracker" d='Admin.Dashboard.Feature'}</dd>
                    </dl>
                    <dl>
                        <dt><a href="http://www.prestashop.com/en/contact-us?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="Contact Us!" d='Admin.Dashboard.Feature'}</a></dt>
                        <dd></dd>
                    </dl>
            </section>
            {/if}

But it´s still shown for everyone. Any hint for me?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...