Jump to content

Add Bid From Pilot Brief


llju1

Recommended Posts

This may have been covered before but is there a way to Put the ADD BID link on the Pilot Brief page. This would help my pilots so that instead of hitting the back button on their browser they could just add the bid to their schedules from the Pilot brief page. When you use the back tab it bring up all the current schedules. Any ideas? I tried to put the add bid code in from the schedule_results.tpl on to the schedule_briefing.tpl page and all I got was the word ADD BID but it had no action to it.

Thanks for any help in this, :rolleyes:

Link to comment
Share on other sites

  • Administrators

This may have been covered before but is there a way to Put the ADD BID link on the Pilot Brief page. This would help my pilots so that instead of hitting the back button on their browser they could just add the bid to their schedules from the Pilot brief page. When you use the back tab it bring up all the current schedules. Any ideas? I tried to put the add bid code in from the schedule_results.tpl on to the schedule_briefing.tpl page and all I got was the word ADD BID but it had no action to it.

Thanks for any help in this, :rolleyes:

You have to copy the entire thing, the exact link with the class and all, and make sure it's substituting in the proper id variable

Link to comment
Share on other sites

Woooo Hoooo it worked. here is the code I now have on my schedule_briefing.tpl

Thanks so much for the help :D

<p>
<?php 
	# Don't allow overlapping bids and a bid exists
	if(Config::Get('DISABLE_SCHED_ON_BID') == true && $schedule->bidid != 0)
	{
	?>
		<a id="<?php echo $schedule->id; ?>" class="addbid" 
			href="<?php echo actionurl('/schedules/addbid');?>">Add </a> <?
	}
	else
	{
		if (Auth::LoggedIn())
		{
	 ?><a id="<?php echo $schedule->id; ?>" class="addbid" 
				href="<?php echo url('/schedules/addbid');?>">Add to Mission</a>
		<?php		 
		}
	}		
	?>
</p>

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Sorry but I get the following message when I tried this;

Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\adam\auz\phpvms\lib\skins\auz\schedule_briefing.tpl on line 19

I think it has something to do with the last } character as I don't know what it does, but when I remove it the page shows but is missing the Add Bid code.

Here is my code;

<h3 align="left">    <p>    <?php echo '<tr><td colspan=2 align="center" style="padding:5px 0px 5px 0px;font-weight:bold"><a href="javascript:history.back()">« back</a></td>';?><p>    

<?php

# Don't allow overlapping bids and a bid exists

if(Config::Get('DISABLE_SCHED_ON_BID') == true && $schedule->bidid != 0)

{

?>

<a id="<?php echo $schedule->id; ?>" class="addbid"

href="<?php echo actionurl('/schedules/addbid');?>">Add </a> <?

}

else

{

if (Auth::LoggedIn())

{

?><a id="<?php echo $schedule->id; ?>" class="addbid"

href="<?php echo url('/schedules/addbid');?>">Add to Mission</a>

<?php

}

}

?>

</p></h3>

<h3 align="left">    Flight Briefing<br />

</h3>

Could you please confirm that the code is still fuctioninal?

Thanks in advance

Adam

Link to comment
Share on other sites

Sorry but I get the following message when I tried this;

I think it has something to do with the last } character as I don't know what it does, but when I remove it the page shows but is missing the Add Bid code.

Here is my code;

Could you please confirm that the code is still fuctioninal?

Thanks in advance

Adam

The Code is still functional.

Link to comment
Share on other sites

Is there a way to add this to the pilots view pireps, i have have had a request to have a "add bid" to the viewed pirep, i have added this code but it just gives me invalid route, what is the variable i need to pull this from?

I have tried it on the view my pireps detail page and nothing happened.. I think it is because on the view my pireps page it get the info from the flightnumber id not the schedule id .

hope this helps

Link to comment
Share on other sites

To get it to work you need to enter the correct php tag at the end of line 8 ;

<p>

<?php

# Don't allow overlapping bids and a bid exists

if(Config::Get('DISABLE_SCHED_ON_BID') == true && $schedule->bidid != 0)

{

?>

<a id="<?php echo $schedule->id; ?>" class="addbid"

href="<?php echo actionurl('/schedules/addbid');?>">Add </a> <?php

}

else

{

if (Auth::LoggedIn())

{

?>

<a id="<?php echo $schedule->id; ?>" class="addbid"

href="<?php echo url('/schedules/addbid');?>">Add to Mission</a>

<?php

}

}

?>

</p>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...