<span id="time_importing">
	<span class="time_import_question">
		<?php 
printf('<button id="time_import_question_answer" class="button">%s</button>', __('Import Time', 'sprout-invoices'));
?>
		<span title="<?php 
_e('Import time tracked to your projects.', 'sprout-invoices');
?>
" class="helptip add_item_help add_time_help"></span>
	</span>
	<span id="time_importing_project_selection" class="cloak">
		<?php 
si_projects_select(0, $client_id, true, 'doc_project_time');
?>
		<input id="time_tracking_nonce" type="hidden" value="<?php 
echo wp_create_nonce(SI_Time_Tracking_Premium::SUBMISSION_NONCE);
?>
" />
	</span><!-- #time_importing_project_selection -->
</span><!-- #time_importing -->
<?php 
if (isset($_GET[SI_Time_Tracking_Premium::IMPORT_QUERY_VAR]) && get_post_type($_GET[SI_Time_Tracking_Premium::IMPORT_QUERY_VAR]) === SI_Project::POST_TYPE) {
    ?>
	<script type="text/javascript">
		jQuery(function() {
			jQuery('ol.items_list > li.item').not('#line_item_default').remove();
			jQuery('#line_item_list').after(si_js_object.inline_spinner);
			jQuery('#time_importing_project_selection select').val( '<?php 
    echo $_GET[SI_Time_Tracking_Premium::IMPORT_QUERY_VAR];
    ?>
' ).trigger('change');
<p class="pspsi-meta-project-id"><label for="pspsi_si_project_id"><?php 
esc_html_e('Sprout Invoices Project');
?>
</label> <?php 
si_projects_select($si_project_id, 0, true, 'pspsi_si_project_id');
?>
</p>
<table class="widefat psp-admin-table">
	<thead>
		<tr>
			<th colspan="2"><?php 
_e('Invoices', 'sprout-invoices');
?>
</th>
		</tr>
	</thead>
	<tbody>
		<?php 
if (!empty($invoices)) {
    ?>
			<?php 
    foreach ($invoices as $invoice_id) {
        ?>
				<tr>
					<td class="pspsi-date"><?php 
        echo get_post_time(get_option('date_format'), false, $invoice_id);
        ?>
</td>
					<td><?php 
        printf('<a href="%s">%s</a>', get_edit_post_link($invoice_id), get_the_title($invoice_id));
        ?>
?>
" class="helptip"></span></span>

		<a href="#edit_project" class="edit-project hide-if-no-js edit_control" >
			<span aria-hidden="true"><?php 
_e('Edit', 'sprout-invoices');
?>
</span> <span class="screen-reader-text"><?php 
_e('Select different project', 'sprout-invoices');
?>
</span>
		</a>

		<div id="project_div" class="control_wrap hide-if-js">
			<div class="project-wrap">
				<?php 
si_projects_select($project_id, $client_id);
?>
	 		</div>
			<p>
				<a href="#edit_project" class="save_control save-project hide-if-no-js button"><?php 
_e('OK', 'sprout-invoices');
?>
</a>
				<a href="#edit_project" class="cancel_control cancel-project hide-if-no-js button-cancel"><?php 
_e('Cancel', 'sprout-invoices');
?>
</a>
			</p>
	 	</div>
</div>