Permalink
Browse files

add more styling to some of the basic pages, like genres and index pages

  • Loading branch information...
1 parent d76ac5a commit a6db0d0761bd839e3f88366ba92b0bcb86f6ad50 @bryanlarsen bryanlarsen committed Aug 15, 2012
@@ -2,6 +2,6 @@ class AuthorsController < ApplicationController
hobo_model_controller
- auto_actions :all
+ auto_actions :index, :new, :create, :edit, :update
end
@@ -1,6 +1,6 @@
<index-page>
<content-body:>
- <a action="new" to="&model">
+ <a action="new" to="&model" class="btn pull-right">
<ht key="anchor.actions.new">New Anchor</ht>
</a>
<filter-menu param-name="type" options="&['labelled', 'unlabelled']"/>
@@ -0,0 +1,12 @@
+<index-page>
+ <collection: fields="this, birthdate, creations, #{'actions' if can_view?(this.first)}">
+ <this-view:>
+ <if test="&this.hlink">
+ <a href="&this.hlink"><%= this.name %></a>
+ </if>
+ <else>
+ <%= this.name %>
+ </else>
+ </this-view:>
+ </collection:>
+</index-page>
@@ -0,0 +1,8 @@
+<index-page>
+ <collection: fields="this, authors, publisher, first_published_at, genres, #{'actions' if can_view?(this.first)}">
+ <publisher-view:>
+ <a href="&this_parent.publisher_url"><%= this %></a>
+ </publisher-view:>
+ </collection:>
+</index-page>
+
@@ -13,7 +13,7 @@
</repeat:fragments>
</mapstraction>
</before-field-list:>
- <field-list: fields="isbn10, isbn13, published_at, first_published_at, publisher">
+ <field-list: fields="isbn10, isbn13, published_at, first_published_at, publisher, genres">
<publisher-view:>
<a href="&this_parent.publisher_url"><%= this %></a>
</publisher-view:>
@@ -0,0 +1,3 @@
+<index-page>
+ <collection: fields="this, creations, #{'actions' if can_view?(this.first)}"/>
+</index-page>
@@ -152,3 +152,12 @@
<nav-item with="&Genre"><ht key="genre.nav_item" count="100"><model-name-human count="100"/></ht></nav-item>
</navigation>
</def>
+
+<def tag="view" for="Genre">
+ <if test="&this.hlink">
+ <a href="&this.hlink"><%= this.title %></a>
+ </if>
+ <else>
+ <%= this.title %>
+ </else>
+</def>

0 comments on commit a6db0d0

Please sign in to comment.