diff --git a/app/views/admin/events/new.html.haml b/app/views/admin/events/new.html.haml new file mode 100644 index 0000000000..79774803e9 --- /dev/null +++ b/app/views/admin/events/new.html.haml @@ -0,0 +1,3 @@ += form_for(@event, url: @url) do |f| + = render partial: 'proposals/form', locals: { f: f } + = render partial: 'shared/user_selectize' \ No newline at end of file diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml new file mode 100644 index 0000000000..173bcfd8ee --- /dev/null +++ b/app/views/admin/users/edit.html.haml @@ -0,0 +1,10 @@ +.row + .col-md-12 + .page-header + %h1 + Edit User + = form_for [:admin, @user] do |f| + = render partial: 'users/form', locals: { f: f, full: true } + .form-group + .text-right + = f.submit nil, class: 'btn btn-primary' \ No newline at end of file diff --git a/app/views/users/_form.html.haml b/app/views/users/_form.html.haml new file mode 100644 index 0000000000..7ca7bb783a --- /dev/null +++ b/app/views/users/_form.html.haml @@ -0,0 +1,47 @@ +.form-group + = f.label :name + = f.text_field :name, class: 'form-control' + %span.help-block + This is your real name +.form-group + = f.label :nickname + = f.text_field :nickname, class: 'form-control' +- if full + .form-group + = f.label :email_public + %abbr{title: 'This field is required'} + = f.email_field :email, class: 'form-control', placeholder: 'Email' + .form-group + = f.label :languages + = f.select :languages, I18nData.languages.invert, { include_blank: 'Any Language', include_hidden: false }, { multiple: true, class: 'form-control' } + .checkbox + %label + = f.check_box :is_admin + is Admin? + %span.help-block + An admin can create a new conference, manage users and make other users admins. + .checkbox + %label + = f.check_box :is_disabled + Disabled +.form-group + = f.label :avatar + %br + = image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", alt: '', class: 'img-rounded') + %span.help-block + Change your avatar on + = link_to 'gravatar.com', 'https://gravatar.com' +.form-group + = f.label :affiliation + = f.text_field :affiliation, class: 'form-control' + %span.help-block + The company you work work, the user group you belong to, or nothing at all. +.form-group + = f.label :biography + = f.text_area :biography, rows: 5, data: { provide: 'markdown' }, class: 'form-control' + %span.help-block + You have used + %span#bio_length + = @user.biography ? @user.biography.split.length : 0 + words. Biographies are limited to 150 words. + = markdown_hint \ No newline at end of file diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index fa85d57faf..c76f61cc35 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -6,35 +6,7 @@ .row .col-md-12 = form_for(@user) do |f| - .form-group - = f.label :name - = f.text_field :name, class: 'form-control' - %span.help-block - This is your real name - .form-group - = f.label :nickname - = f.text_field :nickname, class: 'form-control' - .form-group - = f.label :avatar - %br - = image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", alt: '', class: 'img-rounded') - %span.help-block - Change your avatar on - = link_to 'gravatar.com', 'https://gravatar.com' - .form-group - = f.label :affiliation - = f.text_field :affiliation, class: 'form-control' - %span.help-block - The company you work work, the user group you belong to, or nothing at all. - .form-group - = f.label :biography - = f.text_area :biography, rows: 5, data: { provide: 'markdown' }, class: 'form-control' - %span.help-block - You have used - %span#bio_length - = @user.biography ? @user.biography.split.length : 0 - words. Biographies are limited to 150 words. - = markdown_hint + = render partial: 'users/form', locals: { f: f, full: false } .form-group .text-right = f.submit nil, class: 'btn btn-primary'