puphpet/puphpet

View on GitHub
src/PuphpetBundle/Resources/views/vagrantfile-linode/synced-folder.html.twig

Summary

Maintainability
Test Coverage
{% set uniqid = uniqid ?? uniqid('folder_') %}
{% set idBase = "vagrantfile-vm-provider-linode-synced_folder-#{uniqid}" %}
{% set nameBase = "vagrantfile[vm][synced_folder][#{uniqid}]" %}

<div id="{{ idBase }}" data-uniqid="{{ uniqid }}" data-name="{{ nameBase }}"
     class="tab-pane {{ active is defined and active ? 'active' }}">
    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-source">
            Folder Source
        </label>
        <input type="text" id="{{ idBase }}-source"
               name="{{ nameBase }}[source]"
               placeholder="/path/to/your/web/files" class="form-control"
               value="{{ synced_folder.source }}" />
        <div class="help-block">
            <p>Path your files are stored on host machine,
                <span class="label label-info" data-toggle="help-text">
                    <i class="fa fa-ellipsis-h"></i></span>

                <span class="hidden">
                    <a href="http://docs.vagrantup.com/v2/synced-folders/index.html"
                   target="_blank">more information</a>.
                </span>
            </p>

            <div class="hidden">
                <p>Windows users: You must use forward-slash
                    <code>c:/dev/vagrant/webroot</code> or double back-slash
                    <code>c:\\dev\\vagrant\\webroot</code></p>
                <p>To upload files, <code>rsync</code> is used on <code>$ vagrant up</code>,
                    <code>$ vagrant provision</code> and <code>$ vagrant reload</code>.</p>
                <p>Now may be a good time to work out your deployment strategy.</p>
            </div>
        </div>
    </div>

    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-target">
            Folder Target
        </label>
        <input type="text" id="{{ idBase }}-target"
               name="{{ nameBase }}[target]"
               placeholder="/var/www" class="form-control"
               value="{{ synced_folder.target }}" />
        <div class="help-block">
            Path your hosts' files are uploaded to on guest machine,
            <a href="http://docs.vagrantup.com/v2/synced-folders/index.html"
               target="_blank">more information</a>.
        </div>
    </div>

    <div class="clearfix"></div>
</div>