Class: App::Views::InstancesShow

Inherits:
Layout
  • Object
show all
Includes:
App::ViewHelpers
Defined in:
app/views/instances_show.rb

Instance Method Summary collapse

Methods included from App::ViewHelpers

#add_book_button, #admin, #admin?, #app_name, #base_url, #book_permitted, #count_instances, #external_link_glyph, #flag_modal_button, #flags, #get_instances_per_page, #instance_permitted, #instances_by_names, #javascripts, #json_file, #logged_in, #map_height, #metadata, #not_empty, #place_permitted, #places, #rendered_flash, #stylesheets, #user_name

Methods inherited from Layout

#page_title, #selected_item

Instance Method Details

#instancesObject


11
12
13
14
15
16
17
18
19
20
21
# File 'app/views/instances_show.rb', line 11

def instances
  @instances.map{ |i| {
    page: i.page, sequence: i.sequence, place_name: i.place.name, place_slug: i.place.slug, instance_id: i.id,
    instance_permitted: ( admin? || i.user == @user ),
    owner: i.user.name,
    flagged: i.flagged,
    note: not_empty(i.note),
    special: i.special,
    slug: i.book.slug
  } }
end

#special_fieldObject


7
8
9
# File 'app/views/instances_show.rb', line 7

def special_field
  "Special"
end