#436 ✓resolved
mkosma

table-plus fails to name "count" columns correctly and uniquely

Reported by mkosma | June 9th, 2009 @ 07:44 AM | in Beyond Hobo 1.0

when called by fails to generate the proper tag for columns that are specified as field.count.

To replicate, create a model with links to two other tables. In my case, projects have custodians and file_sets.

<index-page>
  <collection: replace>
    <table-plus fields="this, custodians.count, file_sets.count">
      <custodians_count-heading-link:>Custodians</custodians_count-heading-link:>
      <custodians_count-view: class="numeric-field"><%= number-with-delimiter(this) %></custodians_count-view:>
      <file_sets_count-heading-link:>File Sets</file_sets_count-heading-link:>
      <file_sets_count-view: class="numeric-field"><%= number_with_delimiter(this) %></file_sets_count-view:>
    </table-plus>
  </collection:>
</index-page>

The -heading tags are generated properly and the above substitution works. However, Rapid incorrectly truncates the class for

table entries to "count-view" instead of, e.g., "file_sets_count-view", as illustrated in the html below (and attached in a more complete version). As a result, the above attempt to substitute for file_sets_count-view and custodians_count-view has no effect.
  <th class="custodians-count-heading">
    <a class="column-sort custodians-count-heading-link" href="/projects?sort=custodians.count">Custodians Count</a>
  </th>
  <th class="file-sets-count-heading">
    <a class="column-sort file-sets-count-heading-link" href="/projects?sort=file_sets.count">File Sets Count</a>
  </th>

...

  <td class="count-view">
    <span class="view ">27</span>
  </td>
  <td class="count-view">
    <span class="view ">0</span>
  </td>

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Attachments

Referenced by

Pages