     <table cellpadding="4" class="my-4">
       <thead>
         <tr>
-          <th class="border border-gray-light">Id</th>
-          <th class="border border-gray-light">User</th>
-          <th class="border border-gray-light">Content type</th>
-          <th class="border border-gray-light">Filename</th>
-          <th class="border border-gray-light">inserted at</th>
-          <th class="border border-gray-light">Path</th>
+          <th class="border border-gray-light">
+            <SortLink field={:id} click="sort" {=@sort_order} {=@sort_by}>Id</SortLink>
+          </th>
+          <th class="border border-gray-light">
+            <SortLink field={:user_name} click="sort" {=@sort_order} {=@sort_by}>User</SortLink></th>
+          <th class="border border-gray-light">
+            <SortLink field={:content_type} click="sort" {=@sort_order} {=@sort_by}>Content Type</SortLink>
+          </th>
+          <th class="border border-gray-light">
+            <SortLink field={:filename} click="sort" {=@sort_order} {=@sort_by}>Filename</SortLink>
+          </th>
+          <th class="border border-gray-light">
+            <SortLink field={:inserted_at} click="sort" {=@sort_order} {=@sort_by}>inserted at</SortLink>
+          </th>
+          <th class="border border-gray-light">
+            <SortLink field={:path} click="sort" {=@sort_order} {=@sort_by}>Path</SortLink>
+          </th>
           <th class="border border-gray-light">Actions</th>
         </tr>
       </thead>
       <tbody>
-        {#for opml <- @opmls}
+        {#for opml <- @filtered_opmls}
           <tr class="odd:bg-white">
             <td class="border border-gray-light">{opml.id}</td>
-            <td class="border border-gray-light">{opml.user.name}</td>
+            <td class="border border-gray-light">{opml.user_name}</td>
             <td class="border border-gray-light">{opml.content_type}</td>
             <td class="border border-gray-light">{opml.filename}</td>
             <td class="border border-gray-light"><nobr> {opml.inserted_at |> Timex.format!("{YYYY}-{0M}-{0D} {h24}:{m}:{s}")}</nobr></td>

      </tbody>
    </table>

    <LinkButton title="New opml"
                to={opml_path(Endpoint, :new)} />
    """

            <td class="border border-gray-light">
              <LinkButton title="Parse"
                          to={opml_path(Endpoint, :import, opml.id)}
                          class="text-sm border-primary-dark bg-primary hover:bg-primary-light text-white" />
              <LinkButton title="Show"
                          class="text-sm border-gray bg-white hover:bg-gray-light"
                          to={opml_path(Endpoint, :show, opml.id)} />
              <LinkButton title="Edit"
                          class="text-sm border-warning-dark bg-warning hover:bg-warning-light text-white"
                          to={opml_path(Endpoint, :edit, opml.id)} />
              <LinkButton title="Delete"
                          to={opml_path(Endpoint, :delete, opml.id)}
                          method={:delete}
                          class="text-sm border-danger-dark bg-danger hover:bg-danger-light text-white"
                          opts={[confirm: "Are you sure?"]} />
            </td>
          </tr>
