/OpenVBX/views/devices.php

https://github.com/shifftynet/OpenVBX · PHP · 134 lines · 129 code · 5 blank · 0 comment · 2 complexity · 7d8b73c2ce951510bf84718baf849948 MD5 · raw file

  1. <div class="vbx-content-main">
  2. <div class="vbx-content-menu vbx-content-menu-top">
  3. <h2 class="vbx-content-heading">Devices</h2>
  4. <ul class="vbx-menu-items-right <?php if(empty($devices)): ?>hide<?php endif; ?>">
  5. <li class="menu-item"><button class="add-device add-button"><span>Add Device</span></button></li>
  6. </ul>
  7. </div><!-- .vbx-content-menu -->
  8. <div class="devices-blank <?php if(!empty($devices)): ?>hide<?php endif; ?>">
  9. <h2>Hey, you don't have any phones setup!</h2>
  10. <p>If you add devices, like your cell phone or landline, people can reach you on the phone.</p>
  11. <button class="add-device add-button"><span>Add Device</span></button>
  12. </div>
  13. <div class="vbx-content-container">
  14. <div class="vbx-content-section">
  15. <form class="vbx-form" action="">
  16. <div class="device-container">
  17. <h3>Devices</h3>
  18. <p>Ex: your cell phone, your home phone, your office phone, etc.</p>
  19. <ol class="device-list <?php if(empty($devices)): ?>hide<?php endif; ?>">
  20. <?php foreach($devices as $device): ?>
  21. <li class="phone device enabled ui-state-default" rel="<?php echo $device->id ?>">
  22. <fieldset class="vbx-input-complex">
  23. <label class="field-label-inline left">
  24. <div class="device-type phone-type"><span class="replace">Phone</span></div>
  25. <p class="device-name"><?php echo htmlentities($device->name); ?></p>
  26. </label>
  27. <p class="device-value"><?php echo format_phone($device->value); ?></p>
  28. <label class="field-label-inline left">
  29. <input type="checkbox" class="enable-sms checkbox" <?php echo $device->sms == 1? 'checked="checked"' :'' ?> />
  30. SMS notifications
  31. </label>
  32. <a href="" class="action trash" title="Delete"><span class="replace">Delete</span></a>
  33. <div class="device-status">
  34. <a href="" class="<?php echo ($device->is_active == 1)? 'enabled' : 'disabled' ?> on">ON</a>
  35. <a href="" class="<?php echo ($device->is_active == 0)? 'enabled' : 'disabled' ?> off">OFF</a>
  36. <input type="checkbox" class="enable-device checkbox" value="1" <?php echo ($device->is_active == 1)? 'checked="checked"' : '' ?> />
  37. </div>
  38. </fieldset>
  39. </li>
  40. <?php endforeach; ?>
  41. <li class="prototype hide">
  42. <fieldset class="vbx-input-complex">
  43. <label class="field-label-inline left">
  44. <div class="device-type phone-type"><span class="replace">Phone</span></div>
  45. <p class="device-name"></p>
  46. </label>
  47. <p class="device-value"></p>
  48. <label class="field-label-inline left">
  49. <input type="checkbox" class="enable-sms checkbox" checked="checked"/>
  50. SMS notifications
  51. </label>
  52. <a href="" class="action trash" title="Delete"><span class="replace">Delete</span></a>
  53. <!-- <a href="" class="action edit" title="Edit"><span class="replace">Edit</span></a> -->
  54. <div class="device-status">
  55. <a href="" class="enabled on">ON</a>
  56. <a href="" class="disabled off">OFF</a>
  57. <input type="checkbox" class="enable-device checkbox" value="1" checked="checked" />
  58. </div>
  59. </fieldset>
  60. </li>
  61. </ol>
  62. <div class="no-devices <?php if(!empty($devices)): ?>hide<?php endif; ?>">
  63. <p>No devices setup.</p>
  64. </div><!-- .no-devices -->
  65. </div><!-- .device-container -->
  66. </form>
  67. <div class="application-container">
  68. <div class="application">
  69. <img class="app-icon" src="<?php echo ASSET_ROOT ?>/i/iphone-icon-58.png" alt="OpenVBX for iPhone" />
  70. <h4 class="app-name">OpenVBX for iPhone</h4>
  71. <p class="app-desc">Get the OpenVBX iPhone app and be
  72. able to access your voicemail, make calls and send text messages on the go. </p>
  73. <form>
  74. <fieldset class="vbx-input-container">
  75. <button class="email-button"><span>Start the Quick Install</span></button>
  76. </fieldset>
  77. </form>
  78. </div><!-- .application -->
  79. </div><!-- .application-container -->
  80. </div><!-- .vbx-content-section -->
  81. </div><!-- .vbx-content-container -->
  82. </div><!-- .vbx-content-main -->
  83. <div id="dialog-number" style="display: none;" class="new number dialog" title="Add Devices">
  84. <div class="hide error-message"></div>
  85. <div class="vbx-form">
  86. <fieldset class="vbx-input-container">
  87. <label class="field-label">Device Name
  88. <input type="text" class="medium" name="number[name]" value="" />
  89. </label>
  90. </fieldset>
  91. <fieldset class="vbx-input-container">
  92. <label class="field-label">Phone Number
  93. <input type="text" class="medium" name="number[value]" value="" />
  94. </label>
  95. </fieldset>
  96. </div>
  97. </div>
  98. <div id="dialog-email" style="display: none;" class="email dialog" title="OpenVBX for iPhone Install">
  99. <p>We've emailed the quick install guide to <?php echo $user->email ?>. Open the email on your iPhone to begin.</p>
  100. </div>