diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-28 00:46:28 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-28 00:46:28 -0400 |
commit | e765b136e4cf7d80bf44ffaac2b626ba06c4469d (patch) | |
tree | eaad7e568076ea369ebd9d717fd5605c6cc42d48 | |
parent | 7f994c65451a90d55cfd8ca6f863d2f7e475e8fb (diff) | |
download | guff-e765b136e4cf7d80bf44ffaac2b626ba06c4469d.tar.bz2 guff-e765b136e4cf7d80bf44ffaac2b626ba06c4469d.zip |
refactor dialogs
-rw-r--r-- | src/guff/views/admin/dialogs/blog-edit.cr | 5 | ||||
-rw-r--r-- | src/guff/views/admin/dialogs/page-edit.cr | 24 | ||||
-rw-r--r-- | src/guff/views/admin/dialogs/post-edit.cr | 16 | ||||
-rw-r--r-- | src/guff/views/admin/dialogs/project-edit.cr | 5 | ||||
-rw-r--r-- | src/guff/views/admin/dialogs/user-add.cr | 2 | ||||
-rw-r--r-- | src/guff/views/admin/dialogs/user-edit.cr | 4 | ||||
-rw-r--r-- | src/guff/views/admin/dialogs/user.cr | 2 | ||||
-rw-r--r-- | src/guff/views/admin/page.cr | 37 | ||||
-rw-r--r-- | src/views/admin/dialogs/blog-edit.ecr | 166 | ||||
-rw-r--r-- | src/views/admin/dialogs/page-edit.ecr | 175 | ||||
-rw-r--r-- | src/views/admin/dialogs/project-edit.ecr | 179 | ||||
-rw-r--r-- | src/views/admin/page.ecr | 522 |
12 files changed, 580 insertions, 557 deletions
diff --git a/src/guff/views/admin/dialogs/blog-edit.cr b/src/guff/views/admin/dialogs/blog-edit.cr new file mode 100644 index 0000000..409b8d3 --- /dev/null +++ b/src/guff/views/admin/dialogs/blog-edit.cr @@ -0,0 +1,5 @@ +require "./post-edit" + +class Guff::Views::Admin::Dialogs::BlogEdit < Guff::Views::Admin::Dialogs::PostEdit + ECR.def_to_s("src/views/admin/dialogs/blog-edit.ecr") +end diff --git a/src/guff/views/admin/dialogs/page-edit.cr b/src/guff/views/admin/dialogs/page-edit.cr new file mode 100644 index 0000000..138691d --- /dev/null +++ b/src/guff/views/admin/dialogs/page-edit.cr @@ -0,0 +1,24 @@ +require "./post-edit" + +class Guff::Views::Admin::Dialogs::PageEdit < Guff::Views::Admin::Dialogs::PostEdit + private def theme_options + tmpl = Guff::Views::Admin::PageView::TEMPLATES[:option] + + [{ + "id" => "site-default", + "name" => "Site Default", + }].concat(@context.models.theme.all.map { |row| + { + "id" => row["theme_id"], + "name" => "%s (%s)" % %w{ + name + version + }.map { |k| row["theme_#{k}"] }, + } + }).map { |row| + tmpl % %w{id name}.map { |k| row[k] } + }.join("") + end + + ECR.def_to_s("src/views/admin/dialogs/page-edit.ecr") +end diff --git a/src/guff/views/admin/dialogs/post-edit.cr b/src/guff/views/admin/dialogs/post-edit.cr new file mode 100644 index 0000000..f817d5c --- /dev/null +++ b/src/guff/views/admin/dialogs/post-edit.cr @@ -0,0 +1,16 @@ +class Guff::Views::Admin::Dialogs::PostEdit < Guff::Views::HTMLView + protected def state_buttons + tmpl = Guff::Views::Admin::PageView::TEMPLATES[:state_button] + + @state_buttons ||= String.build do |io| + @context.models.state.get_states.each do |row| + io << tmpl % [ + h(row["name"]), + h(row["state"]), + h(row["icon"]), + h(row["name"]) + ] + end + end + end +end diff --git a/src/guff/views/admin/dialogs/project-edit.cr b/src/guff/views/admin/dialogs/project-edit.cr new file mode 100644 index 0000000..0db1f11 --- /dev/null +++ b/src/guff/views/admin/dialogs/project-edit.cr @@ -0,0 +1,5 @@ +require "./post-edit" + +class Guff::Views::Admin::Dialogs::ProjectEdit < Guff::Views::Admin::Dialogs::PostEdit + ECR.def_to_s("src/views/admin/dialogs/project-edit.ecr") +end diff --git a/src/guff/views/admin/dialogs/user-add.cr b/src/guff/views/admin/dialogs/user-add.cr index e347225..1a404fe 100644 --- a/src/guff/views/admin/dialogs/user-add.cr +++ b/src/guff/views/admin/dialogs/user-add.cr @@ -1,5 +1,5 @@ require "./user" -class Guff::Views::Admin::Dialogs::UserAddDialog < Guff::Views::Admin::Dialogs::UserDialog +class Guff::Views::Admin::Dialogs::UserAdd < Guff::Views::Admin::Dialogs::User ECR.def_to_s("src/views/admin/dialogs/user-add.ecr") end diff --git a/src/guff/views/admin/dialogs/user-edit.cr b/src/guff/views/admin/dialogs/user-edit.cr index e14211a..27789b7 100644 --- a/src/guff/views/admin/dialogs/user-edit.cr +++ b/src/guff/views/admin/dialogs/user-edit.cr @@ -1,3 +1,5 @@ -class Guff::Views::Admin::Dialogs::UserEditDialog < Guff::Views::Admin::Dialogs::UserDialog +require "./user" + +class Guff::Views::Admin::Dialogs::UserEdit < Guff::Views::Admin::Dialogs::User ECR.def_to_s("src/views/admin/dialogs/user-edit.ecr") end diff --git a/src/guff/views/admin/dialogs/user.cr b/src/guff/views/admin/dialogs/user.cr index 98a632e..4dea3cf 100644 --- a/src/guff/views/admin/dialogs/user.cr +++ b/src/guff/views/admin/dialogs/user.cr @@ -1,4 +1,4 @@ -class Guff::Views::Admin::Dialogs::UserDialog < Guff::Views::HTMLView +class Guff::Views::Admin::Dialogs::User < Guff::Views::HTMLView protected def role_options tmpl = Guff::Views::Admin::PageView::TEMPLATES[:option] diff --git a/src/guff/views/admin/page.cr b/src/guff/views/admin/page.cr index a61f52a..fe37ce5 100644 --- a/src/guff/views/admin/page.cr +++ b/src/guff/views/admin/page.cr @@ -150,19 +150,6 @@ class Guff::Views::Admin::PageView < Guff::Views::HTMLView TEMPLATES[:new_post_button] end - private def state_buttons - @state_buttons ||= String.build do |io| - @context.models.state.get_states.each do |row| - io << TEMPLATES[:state_button] % [ - h(row["name"]), - h(row["state"]), - h(row["icon"]), - h(row["name"]) - ] - end - end - end - private def authors_menu_items @context.models.user.get_users.map do |row| { @@ -194,31 +181,17 @@ class Guff::Views::Admin::PageView < Guff::Views::HTMLView end end - private def theme_options - [{ - "id" => "site-default", - "name" => "Site Default", - }].concat(@context.models.theme.all.map { |row| - { - "id" => row["theme_id"], - "name" => "%s (%s)" % %w{ - name - version - }.map { |k| row["theme_#{k}"] }, - } - }).map { |row| - TEMPLATES[:option] % %w{id name}.map { |k| row[k] } - }.join("") - end - private def page_data { post_types: POST_TYPES}.to_json end private def dialogs String.build do |io| - io << Dialogs::UserAddDialog.new(@context) - io << Dialogs::UserEditDialog.new(@context) + io << Dialogs::UserAdd.new(@context) + io << Dialogs::UserEdit.new(@context) + io << Dialogs::BlogEdit.new(@context) + io << Dialogs::PageEdit.new(@context) + io << Dialogs::ProjectEdit.new(@context) end end diff --git a/src/views/admin/dialogs/blog-edit.ecr b/src/views/admin/dialogs/blog-edit.ecr new file mode 100644 index 0000000..bbe946f --- /dev/null +++ b/src/views/admin/dialogs/blog-edit.ecr @@ -0,0 +1,166 @@ +<div id='blog-edit-dialog' class='modal fade' role='dialog'> + <div class='modal-dialog modal-lg' role='document'> + <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><!-- close --> + + <h4 class='modal-title'> + <i class='fa fa-edit'></i> + Edit Blog Entry + </h4><!-- modal-title --> + </div><!-- modal-header --> + + <div class='modal-body loading-done'> + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='blog-edit-name'> + Title + </label> + + <input + type='text' + id='blog-edit-name' + class='form-control post-name' + title='Enter title for blog entry.' + placeholder='Blog Entry Title' + aria-describedby='blog-edit-name-help' + /> + + <p id='blog-edit-name-help' class='help-block'> + Title of blog entry. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <div class='form-group'> + <label for='blog-edit-slug'> + Slug + </label> + + <div class='input-group'> + <input + type='text' + id='blog-edit-slug' + class='form-control post-slug' + disabled='disabled' + title='Enter slug for blog entry.' + placeholder='blog-post-title' + aria-describedby='blog-edit-slug-help' + /> + + <a + href='#' + id='blog-edit-slug-lock' + class='btn input-group-addon btn-default post-slug-lock' + title='Toggle slug lock.' + aria-describedby='page-edit-slug-help' + > + <i class='fa fa-lock'></i> + </a><!-- slog-lock --> + </div><!-- input-group --> + + <p id='blog-edit-slug-help' class='help-block'> + Slug of blog entry. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + </div><!-- row --> + + <div class='form-group'> + <label for='blog-edit-body'> + Body + </label> + + <textarea + id='blog-edit-body' + class='form-control' + rows='15' + aria-describedby='blog-edit-body-help' + ></textarea> + + <p id='blog-edit-body-help' class='help-block'> + Body of this blog entry. + </p> + </div><!-- form-group --> + + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='blog-edit-tags'> + Tags + </label> + + <input + type='text' + id='blog-edit-tags' + class='form-control' + title='Enter tags for this blog entry.' + placeholder='Blog Entry Tags' + aria-describedby='blog-edit-tags-help' + /> + + <p id='blog-edit-tags-help' class='help-block'> + Space-delimited list of tags. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <label> + State + </label> + + <div + id='blog-edit-state' + class='btn-group btn-group-justified state-buttons' + ><%= + state_buttons + %></div><!-- btn-group --> + + <p class='help-block'> + Visibility of this blog post. + </p> + </div><!-- col-md-6 --> + </div><!-- row --> + + </div><!-- modal-body --> + + <div class='modal-footer'> + <button + id='blog-edit-confirm' + class='btn btn-primary' + title='Create post.' + > + <span class='hidden loading'> + <i class='fa fa-spinner fa-spin'></i> + Please Wait... + </span> + + <span class='loading'> + <i class='fa fa-save'></i> + Save Changes + </span> + </button> + + <button + class='btn btn-default' + data-dismiss='modal' + title='Close dialog.' + > + × Close + </button> + </div><!-- modal-footer --> + </div><!-- modal-content --> + </div><!-- modal-dialog --> +</div><!-- modal --> diff --git a/src/views/admin/dialogs/page-edit.ecr b/src/views/admin/dialogs/page-edit.ecr new file mode 100644 index 0000000..c0b30e8 --- /dev/null +++ b/src/views/admin/dialogs/page-edit.ecr @@ -0,0 +1,175 @@ +<div id='page-edit-dialog' class='modal fade' role='dialog'> + <div class='modal-dialog modal-lg' role='document'> + <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><!-- close --> + + <h4 class='modal-title'> + <i class='fa fa-edit'></i> + Edit Page + </h4><!-- modal-title --> + </div><!-- modal-header --> + + <div class='modal-body loading-text'> + <p> + <i class='fa fa-spinner fa-spin'></i> + Loading... + </p> + </div><!-- modal-body --> + + <div class='modal-body loading-error'> + <div class='well'> + <i class='fa fa-exclamation-triangle'></i> + Error: <span class='error-text'></span> + </div><!-- well --> + </div><!-- modal-body --> + + <div class='modal-body loading-done'> + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='page-edit-name'> + Title + </label> + + <input + type='text' + id='page-edit-name' + class='form-control post-name' + title='Enter title for page.' + placeholder='Page Title' + aria-describedby='page-edit-name-help' + /> + + <p id='page-edit-name-help' class='help-block'> + Title of page. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <div class='form-group'> + <label for='page-edit-slug'> + Path + </label> + + <div class='input-group'> + <input + type='text' + id='page-edit-slug' + class='form-control post-slug' + disabled='disabled' + title='Enter path for this page.' + placeholder='page-title' + /> + + <a + href='#' + id='page-edit-slug-lock' + class='btn input-group-addon btn-default post-slug-lock' + title='Toggle path lock.' + aria-describedby='page-edit-slug-help' + > + <i class='fa fa-lock'></i> + </a><!-- slog-lock --> + </div><!-- input-group --> + + <p id='page-edit-slug-help' class='help-block'> + URL path of page. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + </div><!-- row --> + + <div class='form-group'> + <label for='page-edit-body'> + Body + </label> + + <textarea + id='page-edit-body' + class='form-control' + rows='15' + aria-describedby='page-edit-body-help' + ></textarea> + + <p id='page-edit-body-help' class='help-block'> + Body of this page. + </p> + </div><!-- form-group --> + + <div class='row'> + <div class='col-md-6'> + <label for='page-edit-theme'> + Theme + </label> + + <select + id='page-edit-theme' + class='form-control' + title='Choose theme for this page.' + ><%= + theme_options + %></select> + + <p class='help-block'> + Theme for this page. + </p> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <label> + State + </label> + + <div + id='page-edit-state' + class='btn-group btn-group-justified state-buttons' + ><%= + state_buttons + %></div><!-- btn-group --> + + <p class='help-block'> + Visibility state of this page. + </p> + </div><!-- col-md-6 --> + </div><!-- row --> + </div><!-- modal-body --> + + <div class='modal-footer'> + <button + id='page-edit-confirm' + class='btn btn-primary' + title='Save changes.' + > + <span class='hidden loading'> + <i class='fa fa-spinner fa-spin'></i> + Please Wait... + </span> + + <span class='loading'> + <i class='fa fa-save'></i> + Save Changes + </span> + </button> + + <button + class='btn btn-default' + data-dismiss='modal' + title='Close dialog.' + > + × Close + </button> + </div><!-- modal-footer --> + </div><!-- modal-content --> + </div><!-- modal-dialog --> +</div><!-- modal --> diff --git a/src/views/admin/dialogs/project-edit.ecr b/src/views/admin/dialogs/project-edit.ecr new file mode 100644 index 0000000..59c89d4 --- /dev/null +++ b/src/views/admin/dialogs/project-edit.ecr @@ -0,0 +1,179 @@ +<div id='project-edit-dialog' class='modal fade' role='dialog'> + <div class='modal-dialog modal-lg' role='document'> + <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><!-- close --> + + <h4 class='modal-title'> + <i class='fa fa-edit'></i> + Edit Project + </h4><!-- modal-title --> + </div><!-- modal-header --> + + <div class='modal-body loading-text'> + <p> + <i class='fa fa-spinner fa-spin'></i> + Loading... + </p> + </div><!-- modal-body --> + + <div class='modal-body loading-error'> + <div class='well well'> + <i class='fa fa-exclamation-triangle'></i> + Error: <span class='error-text'></span> + </div><!-- well --> + </div><!-- modal-body --> + + <div class='modal-body loading-done'> + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='project-edit-name'> + Name + </label> + + <input + type='text' + id='project-edit-name' + class='form-control post-name' + title='Enter project name.' + placeholder='Project Name' + aria-describedby='project-edit-name-help' + /> + + <p id='project-edit-name-help' class='help-block'> + Name of project. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <div class='form-group'> + <label for='project-edit-slug'> + Slug + </label> + + <div class='input-group'> + <input + type='text' + id='project-edit-slug' + class='form-control post-slug' + title='Enter project slug.' + disabled='disabled' + placeholder='project-name' + aria-describedby='project-edit-slug-help' + /> + + <a + href='#' + id='project-edit-slug-lock' + class='btn input-group-addon btn-default post-slug-lock' + title='Toggle slug lock.' + > + <i class='fa fa-lock'></i> + </a><!-- slog-lock --> + </div><!-- input-group --> + + <p id='project-edit-slug-help' class='help-block'> + URL path component of project. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + </div><!-- row --> + + <div class='form-group'> + <label for='project-edit-body'> + Description + </label> + + <textarea + id='project-edit-body' + class='form-control' + title='Description of this project.' + rows='15' + aria-describedby='project-edit-body-help' + ></textarea> + + <p id='project-edit-body-help' class='help-block'> + Description of this project. + </p> + </div><!-- form-group --> + + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='project-edit-repo'> + Git Repository + </label> + + <input + type='text' + id='project-edit-repo' + class='form-control' + title='Enter project Git repository URL.' + placeholder='https://example.com/git/example-project.git' + aria-describedby='project-edit-repo-help' + /> + + <p id='project-edit-repo-help' class='help-block'> + URL of Git repository for this project. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <label> + State + </label> + + <div + id='project-edit-state' + class='btn-group btn-group-justified state-buttons' + ><%= + state_buttons + %></div><!-- btn-group --> + + <p class='help-block'> + Visibility state of this project. + </p> + </div><!-- col-md-6 --> + </div><!-- row --> + </div><!-- modal-body --> + + <div class='modal-footer'> + <button + id='project-edit-confirm' + class='btn btn-primary' + title='Save changes.' + > + <span class='hidden loading'> + <i class='fa fa-spinner fa-spin'></i> + Please Wait... + </span> + + <span class='loading'> + <i class='fa fa-save'></i> + Save Changes + </span> + </button> + + <button + class='btn btn-default' + data-dismiss='modal' + title='Close dialog.' + > + × Close + </button> + </div><!-- modal-footer --> + </div><!-- modal-content --> + </div><!-- modal-dialog --> +</div><!-- modal --> diff --git a/src/views/admin/page.ecr b/src/views/admin/page.ecr index c06b5f0..231b956 100644 --- a/src/views/admin/page.ecr +++ b/src/views/admin/page.ecr @@ -559,528 +559,6 @@ <%= dialogs %> - <div id='blog-edit-dialog' class='modal fade' role='dialog'> - <div class='modal-dialog modal-lg' role='document'> - <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><!-- close --> - - <h4 class='modal-title'> - <i class='fa fa-edit'></i> - Edit Blog Entry - </h4><!-- modal-title --> - </div><!-- modal-header --> - - <div class='modal-body loading-done'> - <div class='row'> - <div class='col-md-6'> - <div class='form-group'> - <label for='blog-edit-name'> - Title - </label> - - <input - type='text' - id='blog-edit-name' - class='form-control post-name' - title='Enter title for blog entry.' - placeholder='Blog Entry Title' - aria-describedby='blog-edit-name-help' - /> - - <p id='blog-edit-name-help' class='help-block'> - Title of blog entry. - </p> - </div><!-- form-group --> - </div><!-- col-md-6 --> - - <div class='col-md-6'> - <div class='form-group'> - <label for='blog-edit-slug'> - Slug - </label> - - <div class='input-group'> - <input - type='text' - id='blog-edit-slug' - class='form-control post-slug' - disabled='disabled' - title='Enter slug for blog entry.' - placeholder='blog-post-title' - aria-describedby='blog-edit-slug-help' - /> - - <a - href='#' - id='blog-edit-slug-lock' - class='btn input-group-addon btn-default post-slug-lock' - title='Toggle slug lock.' - aria-describedby='page-edit-slug-help' - > - <i class='fa fa-lock'></i> - </a><!-- slog-lock --> - </div><!-- input-group --> - - <p id='blog-edit-slug-help' class='help-block'> - Slug of blog entry. - </p> - </div><!-- form-group --> - </div><!-- col-md-6 --> - </div><!-- row --> - - <div class='form-group'> - <label for='blog-edit-body'> - Body - </label> - - <textarea - id='blog-edit-body' - class='form-control' - rows='15' - aria-describedby='blog-edit-body-help' - ></textarea> - - <p id='blog-edit-body-help' class='help-block'> - Body of this blog entry. - </p> - </div><!-- form-group --> - - <div class='row'> - <div class='col-md-6'> - <div class='form-group'> - <label for='blog-edit-tags'> - Tags - </label> - - <input - type='text' - id='blog-edit-tags' - class='form-control' - title='Enter tags for this blog entry.' - placeholder='Blog Entry Tags' - aria-describedby='blog-edit-tags-help' - /> - - <p id='blog-edit-tags-help' class='help-block'> - Space-delimited list of tags. - </p> - </div><!-- form-group --> - </div><!-- col-md-6 --> - - <div class='col-md-6'> - <label> - State - </label> - - <div - id='blog-edit-state' - class='btn-group btn-group-justified state-buttons' - ><%= - state_buttons - %></div><!-- btn-group --> - - <p class='help-block'> - Visibility of this blog post. - </p> - </div><!-- col-md-6 --> - </div><!-- row --> - - </div><!-- modal-body --> - - <div class='modal-footer'> - <button - id='blog-edit-confirm' - class='btn btn-primary' - title='Create post.' - > - <span class='hidden loading'> - <i class='fa fa-spinner fa-spin'></i> - Please Wait... - </span> - - <span class='loading'> - <i class='fa fa-save'></i> - Save Changes - </span> - </button> - - <button - class='btn btn-default' - data-dismiss='modal' - title='Close dialog.' - > - × Close - </button> - </div><!-- modal-footer --> - </div><!-- modal-content --> - </div><!-- modal-dialog --> - </div><!-- modal --> - - <div id='page-edit-dialog' class='modal fade' role='dialog'> - <div class='modal-dialog modal-lg' role='document'> - <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><!-- close --> - - <h4 class='modal-title'> - <i class='fa fa-edit'></i> - Edit Page - </h4><!-- modal-title --> - </div><!-- modal-header --> - - <div class='modal-body loading-text'> - <p> - <i class='fa fa-spinner fa-spin'></i> - Loading... - </p> - </div><!-- modal-body --> - - <div class='modal-body loading-error'> - <div class='well'> - <i class='fa fa-exclamation-triangle'></i> - Error: <span class='error-text'></span> - </div><!-- well --> - </div><!-- modal-body --> - - <div class='modal-body loading-done'> - <div class='row'> - <div class='col-md-6'> - <div class='form-group'> - <label for='page-edit-name'> - Title - </label> - - <input - type='text' - id='page-edit-name' - class='form-control post-name' - title='Enter title for page.' - placeholder='Page Title' - aria-describedby='page-edit-name-help' - /> - - <p id='page-edit-name-help' class='help-block'> - Title of page. - </p> - </div><!-- form-group --> - </div><!-- col-md-6 --> - - <div class='col-md-6'> - <div class='form-group'> - <label for='page-edit-slug'> - Path - </label> - - <div class='input-group'> - <input - type='text' - id='page-edit-slug' - class='form-control post-slug' - disabled='disabled' - title='Enter path for this page.' - placeholder='page-title' - /> - - <a - href='#' - id='page-edit-slug-lock' - class='btn input-group-addon btn-default post-slug-lock' - title='Toggle path lock.' - aria-describedby='page-edit-slug-help' - > - <i class='fa fa-lock'></i> - </a><!-- slog-lock --> - </div><!-- input-group --> - - <p id='page-edit-slug-help' class='help-block'> - URL path of page. - </p> - </div><!-- form-group --> - </div><!-- col-md-6 --> - </div><!-- row --> - - <div class='form-group'> - <label for='page-edit-body'> - Body - </label> - - <textarea - id='page-edit-body' - class='form-control' - rows='15' - aria-describedby='page-edit-body-help' - ></textarea> - - <p id='page-edit-body-help' class='help-block'> - Body of this page. - </p> - </div><!-- form-group --> - - <div class='row'> - <div class='col-md-6'> - <label for='page-edit-theme'> - Theme - </label> - - <select - id='page-edit-theme' - class='form-control' - title='Choose theme for this page.' - ><%= - theme_options - %></select> - - <p class='help-block'> - Theme for this page. - </p> - </div><!-- col-md-6 --> - - <div class='col-md-6'> - <label> - State - </label> - - <div - id='page-edit-state' - class='btn-group btn-group-justified state-buttons' - ><%= - state_buttons - %></div><!-- btn-group --> - - <p class='help-block'> - Visibility state of this page. - </p> - </div><!-- col-md-6 --> - </div><!-- row --> - </div><!-- modal-body --> - - <div class='modal-footer'> - <button - id='page-edit-confirm' - class='btn btn-primary' - title='Save changes.' - > - <span class='hidden loading'> - <i class='fa fa-spinner fa-spin'></i> - Please Wait... - </span> - - <span class='loading'> - <i class='fa fa-save'></i> - Save Changes - </span> - </button> - - <button - class='btn btn-default' - data-dismiss='modal' - title='Close dialog.' - > - × Close - </button> - </div><!-- modal-footer --> - </div><!-- modal-content --> - </div><!-- modal-dialog --> - </div><!-- modal --> - - <div id='project-edit-dialog' class='modal fade' role='dialog'> - <div class='modal-dialog modal-lg' role='document'> - <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><!-- close --> - - <h4 class='modal-title'> - <i class='fa fa-edit'></i> - Edit Project - </h4><!-- modal-title --> - </div><!-- modal-header --> - - <div class='modal-body loading-text'> - <p> - <i class='fa fa-spinner fa-spin'></i> - Loading... - </p> - </div><!-- modal-body --> - - <div class='modal-body loading-error'> - <div class='well well'> - <i class='fa fa-exclamation-triangle'></i> - Error: <span class='error-text'></span> - </div><!-- well --> - </div><!-- modal-body --> - - <div class='modal-body loading-done'> - <div class='row'> - <div class='col-md-6'> - <div class='form-group'> - <label for='project-edit-name'> - Name - </label> - - <input - type='text' - id='project-edit-name' - class='form-control post-name' - title='Enter project name.' - placeholder='Project Name' - aria-describedby='project-edit-name-help' - /> - - <p id='project-edit-name-help' class='help-block'> - Name of project. - </p> - </div><!-- form-group --> - </div><!-- col-md-6 --> - - <div class='col-md-6'> - <div class='form-group'> - <label for='project-edit-slug'> - Slug - </label> - - <div class='input-group'> - <input - type='text' - id='project-edit-slug' - class='form-control post-slug' - title='Enter project slug.' - disabled='disabled' - placeholder='project-name' - aria-describedby='project-edit-slug-help' - /> - - <a - href='#' - id='project-edit-slug-lock' - class='btn input-group-addon btn-default post-slug-lock' - title='Toggle slug lock.' - > - <i class='fa fa-lock'></i> - </a><!-- slog-lock --> - </div><!-- input-group --> - - <p id='project-edit-slug-help' class='help-block'> - URL path component of project. - </p> - </div><!-- form-group --> - </div><!-- col-md-6 --> - </div><!-- row --> - - <div class='form-group'> - <label for='project-edit-body'> - Description - </label> - - <textarea - id='project-edit-body' - class='form-control' - title='Description of this project.' - rows='15' - aria-describedby='project-edit-body-help' - ></textarea> - - <p id='project-edit-body-help' class='help-block'> - Description of this project. - </p> - </div><!-- form-group --> - - <div class='row'> - <div class='col-md-6'> - <div class='form-group'> - <label for='project-edit-repo'> - Git Repository - </label> - - <input - type='text' - id='project-edit-repo' - class='form-control' - title='Enter project Git repository URL.' - placeholder='https://example.com/git/example-project.git' - aria-describedby='project-edit-repo-help' - /> - - <p id='project-edit-repo-help' class='help-block'> - URL of Git repository for this project. - </p> - </div><!-- form-group --> - </div><!-- col-md-6 --> - - <div class='col-md-6'> - <label> - State - </label> - - <div - id='project-edit-state' - class='btn-group btn-group-justified state-buttons' - ><%= - state_buttons - %></div><!-- btn-group --> - - <p class='help-block'> - Visibility state of this project. - </p> - </div><!-- col-md-6 --> - </div><!-- row --> - </div><!-- modal-body --> - - <div class='modal-footer'> - <button - id='project-edit-confirm' - class='btn btn-primary' - title='Save changes.' - > - <span class='hidden loading'> - <i class='fa fa-spinner fa-spin'></i> - Please Wait... - </span> - - <span class='loading'> - <i class='fa fa-save'></i> - Save Changes - </span> - </button> - - <button - class='btn btn-default' - data-dismiss='modal' - title='Close dialog.' - > - × Close - </button> - </div><!-- modal-footer --> - </div><!-- modal-content --> - </div><!-- modal-dialog --> - </div><!-- modal --> </body> |