osem-fcy/app/views/users/edit.html.haml
gotens1211 c1b81755c9 Implementing Countable.js to count words.
Changed the words_count method to work with countable.js

Added the gem for countable.js
2017-03-01 19:15:19 +05:30

25 lines
984 B
Text

.container
.row
.col-md-12
.page-header
%h1 Edit your profile
.row
.col-md-12
= semantic_form_for(@user, url: user_path(@user.id)) do |f|
= f.input :name, as: :string
= f.input :nickname, as: :string
.control-label
= "Avatar"
= image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", :alt => '')
= link_to 'Change your avatar here', 'https://gravatar.com'
= f.input :affiliation, as: :string,
hint: 'This could be a company, a user group, or nothing at all.'
= f.input :biography, input_html: { rows: 5, data: { provide: 'markdown-editable' } },
hint: markdown_hint
You have used
%span#bio_length
= @user.biography ? @user.biography.split.length : 0
words. Biographies are limited to 150 words.
%br
%br
= f.action :submit, as: :button, label: 'Update', button_html: {class: 'btn btn-primary'}