gitlabhq/app/views/wikis/_new.html.haml
2013-03-18 23:08:54 +02:00

25 lines
753 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

%div#modal-new-wiki.modal.hide
.modal-header
%a.close{href: "#"} ×
%h3 New Wiki Page
.modal-body
= label_tag :new_wiki_path do
%span Page slug
= text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'input-xlarge'
.modal-footer
= link_to 'Build', '#', class: 'build-new-wiki btn btn-create'
:javascript
$(function(){
var modal = $('#modal-new-wiki').modal({modal: true, show:false});
$('.add-new-wiki').bind("click", function(){
modal.show();
});
$('.build-new-wiki').bind("click", function(){
location.href = "#{project_wikis_path(@project)}/" + $('#new_wiki_path').val();
});
$('.modal-header .close').bind("click", function(){
modal.hide();
})
})