Class: Tiler::Widgets::Comments

Inherits:
Tiler::Widget show all
Defined in:
lib/tiler/widgets/comments.rb

Instance Attribute Summary

Attributes inherited from Tiler::Widget

#config, #panel

Class Method Summary collapse

Methods inherited from Tiler::Widget

#data, #empty?, #initialize, #label, #partial, #query_class, supports_color_config?, supports_palette_config?

Constructor Details

This class inherits a constructor from Tiler::Widget

Class Method Details

.example_configObject



73
74
75
# File 'lib/tiler/widgets/comments.rb', line 73

def self.example_config
  { "quote_column" => "quote", "name_column" => "name", "rotate_seconds" => 8, "limit" => 10 }
end

.example_payloadObject



77
78
79
80
# File 'lib/tiler/widgets/comments.rb', line 77

def self.example_payload
  { "quote" => "Tiler turned our spreadsheet into a wallboard in an afternoon.",
    "name"  => "Avery from Ops" }
end

.example_previewObject



82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tiler/widgets/comments.rb', line 82

def self.example_preview
  {
    "items" => [
      { "quote" => "Tiler turned our spreadsheet into a wallboard in an afternoon.",
        "name"  => "Avery from Ops", "avatar" => nil },
      { "quote" => "Finally a status board the whole team actually looks at.",
        "name"  => "Jordan, SRE",     "avatar" => nil },
      { "quote" => "Drag-and-drop widgets are surprisingly addictive.",
        "name"  => "Sam, PM",         "avatar" => nil }
    ],
    "rotate_seconds" => 8
  }
end