/src/Puphpet/Extension/VagrantfileLocalBundle/Resources/views/form/sections/SyncedFolder.html.twig
Twig Template | 131 lines | 123 code | 8 blank | 0 comment | 10 complexity | 6e7c47eb9c9bafe4e1d471dc3ae5e9bb MD5 | raw file
- {% import "PuphpetMainBundle:front:macros/popover.html.twig" as popover %}
- {% set uniqid = uniqid('vvs_', true) %}
- <!-- vagrantfile-local / Shared Folders -->
- <div id="{{ uniqid }}">
- <div class="panel-heading">
- <h3 class="panel-title">Sharing Folders with Local VM</h3>
- </div>
- <div class="panel-body">
- <div class="row form-group">
- <div class="col-md-6">
- <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-source">
- Box Sync Folder Source
- {{ popover.small('Path your files are stored on host machine,
- <a href="http://docs.vagrantup.com/v2/synced-folders/index.html" target="_blank">more information</a>.
- <strong>Windows users:</strong> You must use forward-slash
- <code>c:/dev/vagrant/webroot</code> or double back-slash
- <code>c:\\\\dev\\\\vagrant\\\\webroot</code>')
- }}
- </label>
- <input type="text" id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-source"
- name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][source]"
- required placeholder="/path/to/your/web/files"
- value="{{ synced_folder.source }}" class="form-control" />
- </div>
- <div class="col-md-6">
- <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-target">
- Box Sync Folder Target
- {{ popover.small('Path your hosts\' files are mounted on guest machine,
- <a href="http://docs.vagrantup.com/v2/synced-folders/index.html" target="_blank">more information</a>')
- }}
- </label>
- <input type="text" id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-target"
- name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][target]"
- required placeholder="/path/on/vm"
- value="{{ synced_folder.target }}" class="form-control" />
- </div>
- </div>
- <div class="row form-group">
- <div class="col-md-12">
- <label>
- Shared Folder Type
- {{ popover.small('Windows users should choose the Default or SMB option,
- <a href="http://docs.vagrantup.com/v2/synced-folders/nfs.html" target="_blank">more information</a>.')
- }}
- </label><br />
- <label class="radio-inline">
- <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][sync_type]"
- {% if synced_folder.sync_type is not defined or synced_folder.sync_type == 'default' %}checked{% endif %}
- value="default" class="hasAvailableOptions" /> Default
- <a href="http://docs.vagrantup.com/v2/synced-folders/basic_usage.html" target="_blank"><i
- class="popover-container fa fa-question-circle text-warning"></i></a>
- </label>
- <label class="radio-inline">
- <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][sync_type]"
- {% if synced_folder.sync_type is defined and synced_folder.sync_type == 'nfs' %}checked{% endif %}
- value="nfs" class="hasAvailableOptions" /> NFS
- <a href="http://docs.vagrantup.com/v2/synced-folders/nfs.html" target="_blank"><i
- class="popover-container fa fa-question-circle text-warning"></i></a>
- </label>
- <label class="radio-inline">
- <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][sync_type]"
- {% if synced_folder.sync_type is defined and synced_folder.sync_type == 'smb' %}checked{% endif %}
- value="smb" class="hasAvailableOptions" /> SMB
- <a href="http://docs.vagrantup.com/v2/synced-folders/smb.html" target="_blank"><i
- class="popover-container fa fa-question-circle text-warning"></i></a>
- </label>
- <label class="radio-inline">
- <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][sync_type]"
- {% if synced_folder.sync_type is defined and synced_folder.sync_type == 'rsync' %}checked{% endif %}
- value="rsync" class="hasAvailableOptions" /> RSync
- <a href="http://docs.vagrantup.com/v2/synced-folders/rsync.html" target="_blank"><i
- class="popover-container fa fa-question-circle text-warning"></i></a>
- </label>
- <div class="availableOptions">
- <div class="rsync" style="display:none;">
- <div class="col-md-6">
- <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-rsync-args">Rsync Args</label>
- <select id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-rsync-args"
- name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][rsync][args][]"
- multiple class="form-control select-tags-editable">
- {% if synced_folder.rsync.args is defined and synced_folder.rsync.args is iterable %}
- {% for arg in synced_folder.rsync.args %}
- <option selected value="{{ arg }}">{{ arg }}</option>
- {% endfor %}
- {% endif %}
- </select>
- </div>
- <div class="col-md-6">
- <label for="vagrantfile-local-vm-synced_folder-{{ uniqid }}-rsync-exclude">Exclude directories</label>
- <select id="vagrantfile-local-vm-synced_folder-{{ uniqid }}-rsync-exclude"
- name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][rsync][exclude][]"
- multiple class="form-control select-tags-editable">
- {% if synced_folder.rsync.exclude is defined and synced_folder.rsync.exclude is iterable %}
- {% for dir in synced_folder.rsync.exclude %}
- <option selected value="{{ dir }}">{{ dir }}</option>
- {% endfor %}
- {% endif %}
- </select>
- </div>
- <div class="col-md-6">
- <label>Auto sync</label><br />
- <label class="radio-inline">
- <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][rsync][auto]"
- {% if synced_folder.rsync.auto is defined and synced_folder.rsync.auto == 'true' %}checked{% endif %}
- value="true" class="hasAvailableOptions" /> On
- </label>
- <label class="radio-inline">
- <input type="radio" name="vagrantfile-local[vm][synced_folder][{{ uniqid }}][rsync][auto]"
- {% if synced_folder.rsync.auto is not defined or synced_folder.rsync.auto == 'false' %}checked{% endif %}
- value="false" class="hasAvailableOptions" /> Off
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
- <p class="text-center">
- <button type="button" class="btn btn-danger btn-sm deleteParentContainer"
- data-parent-id="{{ uniqid }}">Remove this shared folder</button>
- </p>
- </div>
- </div>
- <!-- end vagrantfile-local / Shared Folders -->