<% if is_editable?("show") %>
<div class="modal fade" id="modal-add-link" tabindex="-1" role="dialog" aria-labelledby="modalAddLink">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="modalAddLinkLabel">
                    Add Link
                </h4>
            </div>
            <div class="modal-body">
                <form id="form-associated-doc">
                    <p>
                        To link an associated document from this archive with
                        this document, paste the URL of that document here.
                    </p>
                    <div class="form-group">
                        <input name="url" type="text" class="form-control" id="documentUrl" placeholder="https://example.com/link-to-document">
                    </div>
                </form>
                <form id="form-related-link">
                    <div class="form-group">
                        <label for="name">Type</label>
                        <select name="name" class="form-control">
                            <optgroup label="Personal">
                                <option value="website">Website</option>
                                <option value="blog">Blog</option>
                            </optgroup>
                            <optgroup label="Social Media">
                                <option value="twitter">Twitter</option>
                                <option value="facebook">Facebook</option>
                                <option value="linkedin">LinkedIn</option>
                                <option value="youtube">YouTube</option>
                                <option value="amazon">Amazon</option>
                                <option value="google-plus">Google+</option>
                                <option value="flickr">Flickr</option>
                                <option value="myspace">MySpace</option>
                            </optgroup>
                            <optgroup label="Profiles">
                                <option value="wikipedia">Wikipedia</option>
                                <option value="imdb">IMDB</option>
                                <option value="amazon">Amazon</option>
                                <option value="ebay">Ebay</option>
                                <option value="academic">Academic</option>
                                <option value="author">Author</option>
                                <option value="journalist">Journalist</option>
                            </optgroup>
                            <optgroup label="Business">
                                <option value="company_website">Company Website</option>
                                <option value="patents">Patents</option>
                                <option value="registration">Registration</option>
                                <option value="taxes">Tax Filing</option>
                            </optgroup>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="url">URL</label>
                        <input name="url" type="text" class="form-control" id="linkUrl" placeholder="https://example.com">
                    </div>
                </form>
                <form id="form-named-link">
                    <div class="form-group">
                        <label for="name">Name</label>
                        <input name="name" type="text" class="form-control" id="documentUrl" placeholder="Link Name">
                    </div>
                    <div class="form-group">
                        <label for="url">URL</label>
                        <input name="url" type="text" class="form-control" id="documentUrl" placeholder="https://example.com/link-to-document">
                    </div>
                </form>
                <div class="text-right">
                    <button type="button" class="btn btn-default add-right" data-dismiss="modal">
                        Cancel
                    </button>
                    <button type="button" class="btn btn-primary" id="buttonAddLink">
                        <i class="icon-plus"></i> Add Link
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<% end %>
