diff options
Diffstat (limited to 'public/views')
-rw-r--r-- | public/views/body.ejs | 83 | ||||
-rw-r--r-- | public/views/header.ejs | 16 |
2 files changed, 99 insertions, 0 deletions
diff --git a/public/views/body.ejs b/public/views/body.ejs index 11bccfef..5e183dc3 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -151,5 +151,88 @@ </div> </div> </div> +<!-- snippet import modal --> +<div class="modal fade" id="snippetImportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="myModalLabel">Import from Snippet</h4> + </div> + <div class="modal-body"> + <input type="hidden" id="snippetImportModalAccessToken" /> + <input type="hidden" id="snippetImportModalBaseURL" /> + <div class="ui-field-contain" style="display:table;margin-bottom:10px;width:100%;"> + <div style="display:table-row;margin-bottom:5px;"> + <label style="display:table-cell;">Project:</label> + <select class="form-control" id="snippetImportModalProjects" style="display:table-cell;" disabled="disabled"> + <option value="init" selected="selected" disabled="disabled">Select From Available Projects</option> + </select> + </div> + <div style="display:table-row;"> + <label style="display:table-cell;">Snippet</label> + <select class="form-control" id="snippetImportModalSnippets" style="display:table-cell;" disabled="disabled"> + <option value="init" selected="selected" disabled="disabled">Select From Available Snippets</option> + </select> + </div> + </div> + <p class="snippet-import-or">OR</p> + <input type="url" class="form-control" placeholder="/projects/:id/snippets/:snippet_id" id="snippetImportModalContent" disabled="disabled"> + </div> + <div class="modal-footer"> + <span id="snippetImportModalLoading"><i class="fa fa-refresh fa-spin"></i></span> + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> + <button type="button" class="btn btn-danger" id="snippetImportModalClear">Clear</button> + <button type="button" class="btn btn-primary" id="snippetImportModalConfirm" disabled="disabled">Import</button> + </div> + </div> + </div> +</div> +<!-- snippet export modal --> +<div class="modal fade" id="snippetExportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="myModalLabel">Export to Snippet</h4> + </div> + <div class="modal-body"> + <input type="hidden" id="snippetExportModalAccessToken" /> + <input type="hidden" id="snippetExportModalBaseURL" /> + <div class="ui-field-contain" style="display:table;margin-bottom:10px;width:100%;"> + <div style="display:table-row;margin-bottom:5px;"> + <label style="display:table-cell;">Title:</label> + <input class="form-control" placeholder="new snippet" type="text" id="snippetExportModalTitle" /> + </div> + <div style="display:table-row;margin-bottom:5px;"> + <label style="display:table-cell;">File Name:</label> + <input class="form-control" placeholder="new_snippet.md" type="text" id="snippetExportModalFileName" /> + </div> + <div style="display:table-row;margin-bottom:5px;"> + <label style="display:table-cell;">Project:</label> + <select class="form-control" id="snippetExportModalProjects" style="display:table-cell;"> + <option value="init" selected="selected" disabled="disabled">Select From Available Projects</option> + </select> + </div> + <div style="display:table-row;margin-bottom:5px;"> + <label style="display:table-cell;">Visibility:</label> + <select class="form-control" id="snippetExportModalVisibility" style="display:table-cell;"> + <option value="" selected="selected" disabled="disabled">Select Visibility Level</option> + <option value="0">Private</option> + <option value="10">Internal</option> + </select> + </div> + </div> + </div> + <div class="modal-footer"> + <span id="snippetExportModalLoading"><i class="fa fa-refresh fa-spin"></i></span> + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> + <button type="button" class="btn btn-primary" id="snippetExportModalConfirm">Export</button> + </div> + </div> + </div> +</div> <%- include signin-modal %> <%- include help-modal %>
\ No newline at end of file diff --git a/public/views/header.ejs b/public/views/header.ejs index f45d6311..8610b861 100644 --- a/public/views/header.ejs +++ b/public/views/header.ejs @@ -42,6 +42,10 @@ <li role="presentation"><a role="menuitem" class="ui-save-gist" tabindex="-1" href="#" target="_blank"><i class="fa fa-github fa-fw"></i> Gist</a> </li> <% } %> + <% if(typeof gitlab !== 'undefined' && gitlab) { %> + <li role="presentation"><a role="menuitem" class="ui-save-snippet" href="#" data-toggle="modal" data-target="#snippetExportModal"><i class="fa fa-gitlab fa-fw"></i> Snippet</a> + </li> + <% } %> <li class="divider"></li> <li class="dropdown-header">Import</li> <li role="presentation"><a role="menuitem" class="ui-import-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a> @@ -50,6 +54,10 @@ </li> <li role="presentation"><a role="menuitem" class="ui-import-gist" href="#" data-toggle="modal" data-target="#gistImportModal"><i class="fa fa-github fa-fw"></i> Gist</a> </li> + <% if(typeof gitlab !== 'undefined' && gitlab) { %> + <li role="presentation"><a role="menuitem" class="ui-import-snippet" href="#" data-toggle="modal" data-target="#snippetImportModal"><i class="fa fa-gitlab fa-fw"></i> Snippet</a> + </li> + <% } %> <li role="presentation"><a role="menuitem" class="ui-import-clipboard" href="#" data-toggle="modal" data-target="#clipboardModal"><i class="fa fa-clipboard fa-fw"></i> Clipboard</a> </li> <li class="divider"></li> @@ -127,6 +135,10 @@ <li role="presentation"><a role="menuitem" class="ui-save-gist" tabindex="-1" href="#" target="_blank"><i class="fa fa-github fa-fw"></i> Gist</a> </li> <% } %> + <% if(typeof gitlab !== 'undefined' && gitlab) { %> + <li role="presentation"><a role="menuitem" class="ui-save-snippet" href="#" data-toggle="modal" data-target="#snippetExportModal"><i class="fa fa-gitlab fa-fw"></i> Snippet</a> + </li> + <% } %> <li class="divider"></li> <li class="dropdown-header">Import</li> <li role="presentation"><a role="menuitem" class="ui-import-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a> @@ -135,6 +147,10 @@ </li> <li role="presentation"><a role="menuitem" class="ui-import-gist" href="#" data-toggle="modal" data-target="#gistImportModal"><i class="fa fa-github fa-fw"></i> Gist</a> </li> + <% if(typeof gitlab !== 'undefined' && gitlab) { %> + <li role="presentation"><a role="menuitem" class="ui-import-snippet" href="#" data-toggle="modal" data-target="#snippetImportModal"><i class="fa fa-gitlab fa-fw"></i> Snippet</a> + </li> + <% } %> <li role="presentation"><a role="menuitem" class="ui-import-clipboard" href="#" data-toggle="modal" data-target="#clipboardModal"><i class="fa fa-clipboard fa-fw"></i> Clipboard</a> </li> <li class="divider"></li> |