.description-container
  .description-body
    - too_long = true if model.description && model.description.length > 500
    .short-description.model-description
      ~ markdown(truncate(model.description, length: 500, omission: '...', separator: ' '))
    .long-description.model-description{style: "display: none"}
      ~ markdown(model.description)
    = link_to "Show More", "#", class: 'see-more' if too_long
    - if can? :edit_description, model
      = link_to "Edit", "#", class: "edit-description edit-#{model_name}-description"

  - if can? :edit_description, model
    = form_tag send("edit_description_#{model_name}_path"), :id => "description-edit-form", :class => "hidden", :remote => true do |f|
      = hidden_field_tag 'id'
      .control-group
        - class_str = 'inputError limit-250' if model_name == "group"
        = text_area_tag 'description', model.description, {id: 'description-input', class: class_str, :autofocus => true }
        - unless model_name == "discussion"
          .character-counter
      .save-buttons.clearfix
        = submit_tag "Save", class: 'btn btn-small btn-grey run-validations', id: 'add-description-submit', :data => {:disable_with => "Saving"}
        = link_to "Cancel", "#", id: 'cancel-add-description'

.description-container
  .description-body
    - too_long = true if model.description && model.description.length > 500
    .short-description.model-description
      ~ markdown(truncate(model.description, length: 500, omission: '...', separator: ' '))
    .long-description.model-description{style: "display: none"}
      ~ markdown(model.description)
    = link_to "Show More", "#", class: 'see-more' if too_long
    - if can? :edit_description, model
      = link_to "Edit #{model_name} info", "#", class: "edit-description edit-#{model_name}-description"

  - if can? :edit_description, model
    = form_tag send("edit_description_#{model_name}_path"), :id => "description-edit-form", :class => "hidden", :remote => true do |f|
      = hidden_field_tag 'id'
      .control-group
        - class_str = 'inputError limit-250' if model_name == "group"
        = text_area_tag 'description', model.description, {id: 'description-input', class: class_str, :autofocus => true }
        - unless model_name == "discussion"
          .character-counter
      .save-buttons.clearfix
        = submit_tag "Save", class: 'btn btn-small btn-grey run-validations', id: 'add-description-submit', :data => {:disable_with => "Saving"}
        = link_to "Cancel", "#", id: 'cancel-add-description'

Revert "changed edit link in description"
Revert "changed edit link in description"

This reverts commit e015e275d59efe4576f8a34753953563fc078b7e.
