Page 1 of 1

How to remove "Booking a Property"

PostPosted: 12 Mar 2014, 21:46
by geeman
Hello

I want to remove the link for "Booking a Property" i do not wish to use this function

Can i disable this in the admin dashboard or if not can you tell me which page i can alter so the link is not displayed

Many thanks for the great design

Gino

Re: How to remove "Booking a Property"

PostPosted: 13 Mar 2014, 11:23
by fisher
Hello! If I understand it right, you need to do this: in this file protected/modules/apartments/views/_view.php remove or comment the lines
Code: Select all
if(($data->owner_id != Yii::app()->user->getId()) && $data->type == 1){
    echo 
'<div>'.CHtml::link(tt('Booking'), array('/booking/main/bookingform''id' => $data->id), array('class' => 'apt_btn fancy')).'</div>';

Re: How to remove "Booking a Property"

PostPosted: 13 Mar 2014, 15:34
by geeman
Hello thanks for the reply.

I did what you said but it does not seemed to have changed the home page link. I can still see the "Booking a property" link at the top.

What i want is when you enter the home page there are links across the top, one being "Booking a property", i want to completely disable this link so nobody can use it.

Hope i'm making sense

Also is there a way to disable the button link "Complain" when your looking at one of the listings, i would rather not use this if possible also.

Regards

Gino

Re: How to remove "Booking a Property"

PostPosted: 13 Mar 2014, 16:47
by Xpycm
Hello.
1) in this file protected\components\Controller.php remove or comment the lines:
Code: Select all
array('label' => '|'),
array(
    
'label' => tt('Reserve apartment''common'),
    
'url' => array('/booking/main/mainform'),
    
'visible' => Yii::app()->user->getState('isAdmin') === null,
    
'linkOptions' => array('class' => 'fancy'),
), 


2) in this file protected\components\Controller.php remove or comment the lines:
Code: Select all
if(issetModule('apartmentsComplain')){
    if(($data->owner_id != Yii::app()->user->getId())){ ?>
        <div>
            <?php echo CHtml::link(tt('do_complain''apartmentsComplain'), $this->createUrl('/apartmentsComplain/main/complain', array('id' => $data->id)), array('class' => 'fancy')); ?>
        </div>
        <?php
    
}
}

Re: How to remove "Booking a Property"

PostPosted: 13 Mar 2014, 18:02
by geeman
Perfect thanks, i managed to do the first one, changing the "Booking a property" link but the second one, i could not find the details listed in the Controller.php file relating to removing the Complaints link/button, is it in the same Controller.php file?

Thank you very much

Gino

Re: How to remove "Booking a Property"

PostPosted: 14 Mar 2014, 13:03
by fisher
protected\modules\apartments\views\_view.php

Re: How to remove "Booking a Property"

PostPosted: 28 Jan 2016, 10:39
by micropub
This worked fine for me but how do I remove the 'Booking a Property' button at the bottom of the page?

Re: How to remove "Booking a Property"

PostPosted: 28 Jan 2016, 14:34
by andipas
micropub wrote:This worked fine for me but how do I remove the 'Booking a Property' button at the bottom of the page?


In file - themes/atlas/views/layouts/main.php

delete
Code: Select all

                        <div class="footer_request_block">
                            <a class="link" rel="nofollow" href="<?php echo Yii::app()->createUrl('booking/main/mainform');?>"><?php echo tc('Reserve apartment');?></a>
                        </div>


Re: How to remove "Booking a Property"

PostPosted: 29 Jan 2016, 09:13
by micropub
Many thanks