-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathcivimobile.contact_view.html
41 lines (36 loc) · 1.41 KB
/
civimobile.contact_view.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
require_once('civimobile.header.php');
if ( isset($_GET['context']) ) {
$context = $_GET['context'];
}
else {
$context = '#cm-contact-search';
}
?>
<div data-role="page" id="cm-contact-view">
<div data-role="header">
<h1>Contact details</h1>
<a href="" id="edit-contact-button" data-role="button" class="ui-btn-right jqm-edit">Edit</a>
<a href="<?php echo $context;?>" id="back-contact-button" class="ui-btn-left" data-icon="arrow-l">Back</a>
</div><!-- /header -->
<div data-role="content" id="contact-details-content">
<div class="content-primary">
<ul data-role="listview" data-theme="g" data-inset="true" id="contact-details-sections" data-dividertheme="a">
</ul>
</div><!-- /content-primary -->
</div><!-- /content -->
<script type="text/javascript">
var contactId = "<?php echo $_GET['cid']; ?>";
var context = "<?php if (isset($_GET['context'])) { echo $_GET['context']; } else { echo ''; } ?>";
$(function(){
if (context == 'cm-events' || context == 'cm-surveys') {
$('#edit-contact-button').hide();
}
});
function contactView() {
buildProfileView( contactId, "contact-details-sections" );
$('#edit-contact-button').attr('href',"<?php echo CRM_Utils_System::url('civicrm/mobile/contact', 'action=edit&cid=', false, null, false); ?>" + contactId);
}
</script>
</div><!-- /page -->
<?php require_once('civimobile.footer.php') ?>