diff options
author | Jason Croft | 2016-05-12 12:28:08 -0400 |
---|---|---|
committer | Jason Croft | 2016-05-12 12:28:08 -0400 |
commit | 30e602a7400f3b38918a55f1470610b8d4ee49d7 (patch) | |
tree | 97269da7d7e1b1b964495df3e6365e14c99bb316 /public/views | |
parent | c16345ab128288b92023e789f09cabb5197d1181 (diff) |
Enable snippet exporting.
Diffstat (limited to 'public/views')
-rw-r--r-- | public/views/body.ejs | 45 | ||||
-rw-r--r-- | public/views/header.ejs | 4 |
2 files changed, 47 insertions, 2 deletions
diff --git a/public/views/body.ejs b/public/views/body.ejs index a0b872d4..f0b62c28 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -189,4 +189,49 @@ </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 modal %>
\ No newline at end of file diff --git a/public/views/header.ejs b/public/views/header.ejs index 051817dc..ee89ddeb 100644 --- a/public/views/header.ejs +++ b/public/views/header.ejs @@ -43,7 +43,7 @@ </li> <% } %> <% if(typeof gitlab !== 'undefined' && gitlab) { %> - <li role="presentation"><a role="menuitem" class="ui-save-snippet" tabindex="-1" href="#" target="_blank"><i class="fa fa-gitlab fa-fw"></i> Snippet</a> + <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> @@ -136,7 +136,7 @@ </li> <% } %> <% if(typeof gitlab !== 'undefined' && gitlab) { %> - <li role="presentation"><a role="menuitem" class="ui-save-snippet" tabindex="-1" href="#" target="_blank"><i class="fa fa-gitlab fa-fw"></i> Snippet</a> + <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> |