manage-label.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
  2. <h1 class="page-header">Label verwalten</h1>
  3. <div class="row">
  4. <form action="" method="POST">
  5. <input type="hidden" name="labelId" value="<?php echo $this->_['label']->getId(); ?>">
  6. <div class="form-group">
  7. <label for="labelName">Name</label> <!-- TODO: Make this a.editable -->
  8. <input type="text" class="form-control" id="labelName" name="labelName" value="<?php echo $this->_['label']->getName(); ?>">
  9. </div>
  10. <div class="form-group">
  11. <label>Zugewiesene Mailaccounts</label>
  12. <table class="table table-striped">
  13. <thead>
  14. <tr>
  15. <th>#</th>
  16. <th>Account</th>
  17. <th>Folder</th>
  18. <th></th>
  19. <th></th>
  20. </tr>
  21. <?php
  22. foreach($this->_['mailboxFolders'] as $mailboxFolder) {
  23. echo '<tr>';
  24. echo '<td>' . $mailboxFolder->getId() . '</td>';
  25. echo '<td>' . Imap::getMailboxNameFromMailaccountId($mailboxFolder->getMailboxId()) . '</td>';
  26. echo '<td>' . $mailboxFolder->getFolderName() . '</td>';
  27. echo '<td><a class="manage-mailboxfolder fancybox.ajax" data-uid="' . $this->_['user']->getUserId() . '" href="ajax.php?action=manageMailboxFolder&mfId=' . $mailboxFolder->getId() . '&mbId=' . $mailboxFolder->getMailboxId() . '" data-id="' . $mailboxFolder->getId() . '"><i class="fa fa-wrench"></i></a></td>';
  28. echo '<td><a class="remove-mailboxfolder" href="#" data-id="' . $mailboxFolder->getId() . '"><i class="fa fa-minus-circle"></i></a></td>';
  29. echo '</tr>';
  30. }
  31. ?>
  32. </thead>
  33. <tr>
  34. <td><a id="add-mailboxfolder" href="#" data-uid="<?php echo $this->_['user']->getUserId(); ?>" data-lid="<?php echo $this->_['label']->getId(); ?>"><i class="fa fa-plus-circle"></i></a></td>
  35. <td></td>
  36. <td></td>
  37. <td></td>
  38. <td></td>
  39. </tr> <!-- TODO: Fit fancybox -->
  40. </table>
  41. </div>
  42. </form> <!-- TODO: Make this AJAX, remove form -->
  43. </div>
  44. </div>