%h1
  = t('words_overview')
.row
  / this if for later you will cann select, what category you want to see, but need js or that
  .col-lg-12
    - categories_array = Category.all.map { |category| category.name_de}
    = select_tag :category_name_de, options_for_select(categories_array), {:onchange => 'this.form.submit()'}

.row
  .col-lg-12
    -for w in @word
      -if (w.name locale).to_s.empty? == false
        .panel.panel-default
          .panel-heading
            = w.name locale
            .btn.btn-default.btn-xs.pull-right
              = link_to t('show'), word_path(w), :method => :get
            .btn.btn-default.btn-xs.pull-right
              =link_to t('edit'), edit_word_path(w)
            .btn.btn-default.btn-xs.pull-right
              = link_to t('delete'), w, method: :delete, data: { confirm: t('confirmation_question') }
          .panel-body
            = w.description locale
%h1
  = t('words_overview')
.row
  / this if for later you will cann select, what category you want to see, but need js or that
  .col-lg-12
    - categories_array = Category.all.map { |category| category.name_de}
    = select_tag :category_name_de, options_for_select(categories_array), {:onchange => 'this.form.submit()'}

.row
  .col-lg-12
    -for w in @word
      -if (w.name locale).to_s.empty? == false
        .panel.panel-default
          .panel-heading
            = w.name locale
            .btn.btn-default.btn-xs.pull-right
              = link_to t('show'), word_path(w), :method => :get
            .btn.btn-default.btn-xs.pull-right
              =link_to t('edit'), edit_word_path(w)
              / todo use ajax to remove word from DB
            .btn.btn-default.btn-xs.pull-right
              = link_to t('delete'), w, method: :delete, data: { confirm: t('confirmation_question') }
          .panel-body
            = w.description locale
Set a 'todo' for later
Set a 'todo' for later
