Sha256: adbdb59739d331f1a56b2a226c7657ebf782b6659648b34b75c4d766a51e32d6

Contents?: true

Size: 1.35 KB

Versions: 15

Compression:

Stored size: 1.35 KB

Contents

<div id="content_detail" class="ui-corner-all">
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.answer')) -%></h1>
<div id="content_list">

<%- if @question -%>
  <p><%= link_to textilize(h(@question.body)), @question -%></p>
<%- end -%>

<table class="index">
  <tr>
    <th><%= t('activerecord.models.user') -%></th>
    <th><%= t('activerecord.attributes.answer.body') -%></th>
    <th><%= t('page.created_at') -%></th>
    <th><%= t('page.updated_at') -%></th>
    <th></th>
  </tr>

<%- @answers.each_with_index do |answer, i| -%>
  <tr class="line<%= cycle("0", "1") -%>">
    <td><%= link_to answer.user.username, answer.user -%></td>
    <td><%= link_to truncate(answer.body, :length => 20), answer -%></td>
    <td><%= l(answer.created_at) -%></td>
    <td><%= l(answer.updated_at) -%></td>
    <td>
      <%- if can? :destroy, answer -%>
        <%= link_to t('page.edit'), edit_answer_path(answer) -%>
        <%= link_to t('page.destroy'), answer, :confirm => t('page.are_you_sure'), :method => :delete -%>
      <%- end -%>
    </td>
  </tr>
<%- end -%>
</table>

<%= will_paginate(@answers) -%>
</div>
</div>

<div id="submenu" class="ui-corner-all">
  <%- if @question -%>
    <ul>
      <li><%= link_to t('page.new', :model => t('activerecord.models.answer')), new_question_answer_path(@question) -%></li>
    </ul>
  <%- end -%>
</div>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
enju_question-0.0.17 app/views/answers/index.html.erb
enju_question-0.0.16 app/views/answers/index.html.erb
enju_question-0.0.15 app/views/answers/index.html.erb
enju_question-0.0.14 app/views/answers/index.html.erb
enju_question-0.0.13 app/views/answers/index.html.erb
enju_question-0.0.12 app/views/answers/index.html.erb
enju_question-0.0.11 app/views/answers/index.html.erb
enju_question-0.0.10 app/views/answers/index.html.erb
enju_question-0.0.9 app/views/answers/index.html.erb
enju_question-0.0.8 app/views/answers/index.html.erb
enju_question-0.0.7 app/views/answers/index.html.erb
enju_question-0.0.6 app/views/answers/index.html.erb
enju_question-0.0.5 app/views/answers/index.html.erb
enju_question-0.0.4 app/views/answers/index.html.erb
enju_question-0.0.3 app/views/answers/index.html.erb