Work on create_new modal

This commit is contained in:
Alexei Nikitin 2014-04-07 23:27:42 +04:00
parent 630c44135a
commit 69406df0ed
3 changed files with 40 additions and 37 deletions
app
locale
templates/kinds

View file

@ -330,6 +330,7 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
article_search_title: "Search Articles Here"
thang_search_title: "Search Thang Types Here"
level_search_title: "Search Levels Here"
signup_to_create: "Sign Up to Create a New Content"
read_only_warning: "Note: you can't save any edits here, because you're not logged in as an admin."
article:

View file

@ -330,6 +330,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
article_search_title: "Искать статьи"
thang_search_title: "Искать типы объектов"
level_search_title: "Искать уровни"
signup_to_create: "Авторизуйтесь для создания нового контента"
read_only_warning: "Примечание: вы не можете сохранять здесь любые правки, потому что вы не вошли как администратор."
article:

View file

@ -1,37 +1,38 @@
extends /templates/base
block content
div
ol.breadcrumb
li
a(href="/editor", data-i18n="editor.main_title") CodeCombat Editors
li.active(data-i18n="#{currentEditor}")
| #{currentEditor}
if me.get('anonymous')
a.btn.btn-primary.open-modal-button(data-toggle="coco-modal", data-target="modal/signup", role="button") Sign Up to Create a New #{modelLabel}
else
a.btn.btn-primary.open-modal-button(href='#new-model-modal', role="button", data-toggle="modal" data-i18n="#{currentNew}") Create a New Something
input#search(data-i18n="[placeholder]#{currentSearch}")
hr
div.results
table
// TODO: make this into a ModalView subview
div.modal.fade#new-model-modal
.modal-dialog
.modal-content
.modal-header
h3 Create New #{modelLabel}
.modal-body
form.form
.form-group
label.control-label(for="name") Name
input#name.form-control(name="name", type="text")
.modal-footer
button.btn(data-dismiss="modal") Cancel
button.btn.btn-primary.new-model-submit Create
.modal-body.wait.secret
h3 Reticulating Splines...
.progress.progress-striped.active
.progress-bar
extends /templates/base
block content
div
ol.breadcrumb
li
a(href="/editor", data-i18n="editor.main_title") CodeCombat Editors
li.active(data-i18n="#{currentEditor}")
| #{currentEditor}
if me.get('anonymous')
a.btn.btn-primary.open-modal-button(data-toggle="coco-modal", data-target="modal/signup", role="button", data-i18n="editor.signup_to_create") Sign Up to Create a New Content
else
a.btn.btn-primary.open-modal-button(href='#new-model-modal', role="button", data-toggle="modal", data-i18n="#{currentNew}") Create a New Something
input#search(data-i18n="[placeholder]#{currentSearch}")
hr
div.results
table
// TODO: make this into a ModalView subview
div.modal.fade#new-model-modal
.modal-dialog
.background-wrapper
.modal-content
.modal-header
h3(data-i18n="#{currentNew}") Create New #{modelLabel}
.modal-body
form.form
.form-group
label.control-label(for="name", data-i18n="general.name") Name
input#name.form-control(name="name", type="text")
.modal-footer
button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
button.btn.btn-primary.new-model-submit(data-i18n="common.create") Create
.modal-body.wait.secret
h3(data-i18n="play_level.tip_reticulating") Reticulating Splines...
.progress.progress-striped.active
.progress-bar