diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-30 18:40:08 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-30 18:40:08 -0400 |
commit | bb2a315df93c173db84d2d6fc0cf1b2bdbd931a7 (patch) | |
tree | 831f46bd240348af1df70eb0abf98bb92b360f3e /src/views/dialogs/admin/site.ecr | |
parent | 9cec164e724465c11ff91772cdad3126de663ade (diff) | |
download | guff-bb2a315df93c173db84d2d6fc0cf1b2bdbd931a7.tar.bz2 guff-bb2a315df93c173db84d2d6fc0cf1b2bdbd931a7.zip |
refactor site dialogs and add site editing
Diffstat (limited to 'src/views/dialogs/admin/site.ecr')
-rw-r--r-- | src/views/dialogs/admin/site.ecr | 264 |
1 files changed, 264 insertions, 0 deletions
diff --git a/src/views/dialogs/admin/site.ecr b/src/views/dialogs/admin/site.ecr new file mode 100644 index 0000000..fa5d7d7 --- /dev/null +++ b/src/views/dialogs/admin/site.ecr @@ -0,0 +1,264 @@ +<div id='<%= @id %>-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-plus-circle'></i> + <%= h(@name) %> + </h4><!-- modal-title --> + </div><!-- modal-header --> + + <div class='modal-body loading'> + <i class='fa fa-spinner fa-spin'></i> + Loading... + </div><!-- modal-body --> + + <div class='modal-body loading-done'> + <div class='row'> + <div class='col-md-3'> + <ul class='nav nav-pills nav-stacked' role='tablist'><%= + tabs + %></ul><!-- nav --> + </div><!-- col-md-3 --> + + <div class='col-md-9'> + <div class='tab-content'> + <div + id='<%= @id %>-pane-content' + class='tab-pane active' + role='tabpanel' + > + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='<%= @id %>-name'> + Name + </label> + + <input + type='text' + id='<%= @id %>-name' + class='form-control' + title='Enter site name.' + placeholder='Some Site' + aria-describedby='<%= @id %>-name-help' + /> + + <p id='<%= @id %>-name-help' class='help-block'> + Site name. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <div class='form-group'> + <label for='<%= @id %>-slug'> + Slug + </label> + + <input + type='text' + id='<%= @id %>-slug' + class='form-control' + title='Enter site slug (lowercase).' + readonly='readonly' + placeholder='some-site' + aria-describedby='<%= @id %>-slug-help' + /> + + <p id='<%= @id %>-slug-help' class='help-block'> + Name of files directory on server. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + </div><!-- row --> + + <div class='form-group'> + <label for='<%= @id %>-body'> + Description + </label> + + <textarea + id='<%= @id %>-body' + class='form-control' + title='Enter site description.' + placeholder='A brief site description' + aria-describedby='<%= @id %>-body-help' + /></textarea> + + <p id='<%= @id %>-body-help' class='help-block'> + Brief description of site. + </p> + </div><!-- form-group --> + + <div class='form-group'> + <label for='<%= @id %>-domains'> + Domains + </label> + + <textarea + id='<%= @id %>-domains' + class='form-control' + title='Newline-delimited list of site domains.' + placeholder='some.example.com' + aria-describedby='<%= @id %>-domains-help' + /></textarea> + + <p id='<%= @id %>-domains-help' class='help-block'> + Newline-deilmited list of site domains. + </p> + </div><!-- form-group --> + </div><!-- tab-pane --> + + <div + id='<%= @id %>-pane-domains' + class='tab-pane' + role='tabpanel' + > + </div><!-- tab-pane --> + + <div + id='<%= @id %>-pane-theme' + class='tab-pane' + role='tabpanel' + > + <div class='row'> + <div class='col-md-12'> + <div class='form-group'> + <label for='<%= @id %>-theme_id'> + Theme + </label> + + <select + id='<%= @id %>-theme_id' + class='form-control' + title='Choose site theme.' + aria-describedby='<%= @id %>-theme-help' + ><%= + theme_options + %></select> + + <p id='<%= @id %>-theme-help' class='help-block'> + Site theme. + </p> + </div><!-- form-group --> + </div><!-- col-md-12 --> + </div><!-- row --> + + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='<%= @id %>-styles'> + Styles + </label> + + <textarea + id='<%= @id %>-styles' + class='form-control asset-list' + title='Newline-delimited site styles.' + aria-describedby='<%= @id %>-styles-help' + ></textarea> + + <p id='<%= @id %>-styles-help' class='help-block'> + Newline-delimited site styles. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <div class='form-group'> + <label for='<%= @id %>-scripts'> + Scripts + </label> + + <textarea + id='<%= @id %>-scripts' + class='form-control asset-list' + title='Newline-delimited site scripts.' + aria-describedby='<%= @id %>-scripts-help' + ></textarea> + + <p id='<%= @id %>-scripts-help' class='help-block'> + Newline-delimited site scripts. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + </div><!-- row --> + </div><!-- tab-pane --> + + <div + id='<%= @id %>-pane-other' + class='tab-pane' + role='tabpanel' + > + <div class='row'> + <div class='col-md-12'> + <div class='form-group'> + <label for='<%= @id %>-lang'> + Language + </label> + + <input + type='text' + id='<%= @id %>-lang' + class='form-control' + title='Enter site IETF language tag (BCP 47).' + aria-describedby='<%= @id %>-lang-help' + /> + + <p id='<%= @id %>-lang-help' class='help-block'> + <a + href='https://en.wikipedia.org/wiki/IETF_language_tag' + title='View IETF language tag information.' + rel='noopener nofollow' + target='_blank' + >IETF BCP 47 language tag</a> for site. + </p> + </div><!-- form-group --> + </div><!-- col-md-12 --> + </div><!-- row --> + </div><!-- tab-pane --> + </div><!-- tab-content --> + </div><!-- col-md-9 --> + </div><!-- row --> + </div><!-- modal-body --> + + <div class='modal-footer'> + <button + id='<%= @id %>-confirm' + class='btn btn-primary' + title='<%= h(@save_text) %>' + > + <span class='hidden loading'> + <i class='fa fa-spinner fa-spin'></i> + Please Wait... + </span> + + <span class='loading'> + <i class='fa <%= h(@save_icon) %>'></i> + <%= h(@save_name) %> + </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 --> |