PageRenderTime 57ms CodeModel.GetById 32ms RepoModel.GetById 0ms app.codeStats 0ms

/src/Puphpet/Extension/VagrantfileLocalBundle/Resources/views/form/sections/SyncedFolder.html.twig

https://gitlab.com/reyjmc03/puphpet
Twig Template | 131 lines | 123 code | 8 blank | 0 comment | 10 complexity | 6e7c47eb9c9bafe4e1d471dc3ae5e9bb MD5 | raw file
  1. {% import "PuphpetMainBundle:front:macros/popover.html.twig" as popover %}
  2. {% set uniqid = uniqid('vvs_', true) %}
  3. <!-- vagrantfile-local / Shared Folders -->
  4. <div id="{{ uniqid }}">
  5. <div class="panel-heading">
  6. <h3 class="panel-title">Sharing Folders with Local VM</h3>
  7. </div>
  8. <div class="panel-body">
  9. <div class="row form-group">
  10. <div class="col-md-6">
  11. <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-source">
  12. Box Sync Folder Source
  13. {{ popover.small('Path your files are stored on host machine,
  14. <a href="http://docs.vagrantup.com/v2/synced-folders/index.html" target="_blank">more information</a>.
  15. <strong>Windows users:</strong> You must use forward-slash
  16. <code>c:/dev/vagrant/webroot</code> or double back-slash
  17. <code>c:\\\\dev\\\\vagrant\\\\webroot</code>')
  18. }}
  19. </label>
  20. <input type="text" id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-source"
  21. name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][source]"
  22. required placeholder="/path/to/your/web/files"
  23. value="{{ synced_folder.source }}" class="form-control" />
  24. </div>
  25. <div class="col-md-6">
  26. <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-target">
  27. Box Sync Folder Target
  28. {{ popover.small('Path your hosts\' files are mounted on guest machine,
  29. <a href="http://docs.vagrantup.com/v2/synced-folders/index.html" target="_blank">more information</a>')
  30. }}
  31. </label>
  32. <input type="text" id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-target"
  33. name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][target]"
  34. required placeholder="/path/on/vm"
  35. value="{{ synced_folder.target }}" class="form-control" />
  36. </div>
  37. </div>
  38. <div class="row form-group">
  39. <div class="col-md-12">
  40. <label>
  41. Shared Folder Type
  42. {{ popover.small('Windows users should choose the Default or SMB option,
  43. <a href="http://docs.vagrantup.com/v2/synced-folders/nfs.html" target="_blank">more information</a>.')
  44. }}
  45. </label><br />
  46. <label class="radio-inline">
  47. <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][sync_type]"
  48. {% if synced_folder.sync_type is not defined or synced_folder.sync_type == 'default' %}checked{% endif %}
  49. value="default" class="hasAvailableOptions" /> Default
  50. <a href="http://docs.vagrantup.com/v2/synced-folders/basic_usage.html" target="_blank"><i
  51. class="popover-container fa fa-question-circle text-warning"></i></a>
  52. </label>
  53. <label class="radio-inline">
  54. <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][sync_type]"
  55. {% if synced_folder.sync_type is defined and synced_folder.sync_type == 'nfs' %}checked{% endif %}
  56. value="nfs" class="hasAvailableOptions" /> NFS
  57. <a href="http://docs.vagrantup.com/v2/synced-folders/nfs.html" target="_blank"><i
  58. class="popover-container fa fa-question-circle text-warning"></i></a>
  59. </label>
  60. <label class="radio-inline">
  61. <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][sync_type]"
  62. {% if synced_folder.sync_type is defined and synced_folder.sync_type == 'smb' %}checked{% endif %}
  63. value="smb" class="hasAvailableOptions" /> SMB
  64. <a href="http://docs.vagrantup.com/v2/synced-folders/smb.html" target="_blank"><i
  65. class="popover-container fa fa-question-circle text-warning"></i></a>
  66. </label>
  67. <label class="radio-inline">
  68. <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][sync_type]"
  69. {% if synced_folder.sync_type is defined and synced_folder.sync_type == 'rsync' %}checked{% endif %}
  70. value="rsync" class="hasAvailableOptions" /> RSync
  71. <a href="http://docs.vagrantup.com/v2/synced-folders/rsync.html" target="_blank"><i
  72. class="popover-container fa fa-question-circle text-warning"></i></a>
  73. </label>
  74. <div class="availableOptions">
  75. <div class="rsync" style="display:none;">
  76. <div class="col-md-6">
  77. <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-rsync-args">Rsync Args</label>
  78. <select id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-rsync-args"
  79. name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][rsync][args][]"
  80. multiple class="form-control select-tags-editable">
  81. {% if synced_folder.rsync.args is defined and synced_folder.rsync.args is iterable %}
  82. {% for arg in synced_folder.rsync.args %}
  83. <option selected value="{{ arg }}">{{ arg }}</option>
  84. {% endfor %}
  85. {% endif %}
  86. </select>
  87. </div>
  88. <div class="col-md-6">
  89. <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-rsync-exclude">Exclude directories</label>
  90. <select id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-rsync-exclude"
  91. name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][rsync][exclude][]"
  92. multiple class="form-control select-tags-editable">
  93. {% if synced_folder.rsync.exclude is defined and synced_folder.rsync.exclude is iterable %}
  94. {% for dir in synced_folder.rsync.exclude %}
  95. <option selected value="{{ dir }}">{{ dir }}</option>
  96. {% endfor %}
  97. {% endif %}
  98. </select>
  99. </div>
  100. <div class="col-md-6">
  101. <label>Auto sync</label><br />
  102. <label class="radio-inline">
  103. <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][rsync][auto]"
  104. {% if synced_folder.rsync.auto is defined and synced_folder.rsync.auto == 'true' %}checked{% endif %}
  105. value="true" class="hasAvailableOptions" /> On
  106. </label>
  107. <label class="radio-inline">
  108. <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][rsync][auto]"
  109. {% if synced_folder.rsync.auto is not defined or synced_folder.rsync.auto == 'false' %}checked{% endif %}
  110. value="false" class="hasAvailableOptions" /> Off
  111. </label>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <p class="text-center">
  118. <button type="button" class="btn btn-danger btn-sm deleteParentContainer"
  119. data-parent-id="{{ uniqid }}">Remove this shared folder</button>
  120. </p>
  121. </div>
  122. </div>
  123. <!-- end vagrantfile-local / Shared Folders -->