module Ktistec::ViewHelper
Direct including types
- ActivitiesController
- ActivityModelRenderer
- ActorModelRenderer
- ActorsController
- CollectionModelRenderer
- EverythingController
- FiltersController
- HomeController
- Ktistec::Auth
- Ktistec::Handler::Canonical
- MentionsController
- MetricsController
- ObjectModelRenderer
- ObjectsController
- RelationshipsController
- RemoteFollowsController
- SearchesController
- SessionsController
- SettingsController
- SuggestionsController
- TagsController
- UploadsController
- WellKnownController
Defined in:
views/view_helper.crMacro Summary
-
activity_button(arg1, arg2, arg3, type = nil, method = "POST", public = true, form_class = "ui inline form", button_class = "ui button", form_data = nil, button_data = nil, csrf = env.session.string?("csrf"), &block)
Posts an activity to an outbox.
- activity_path(activity = nil)
- actor_path(actor = nil)
- actor_relationships_path(actor = nil, relationship = nil)
- actor_remote_follow_path(actor = nil)
- anchor(object = nil)
- approve_path(object = nil)
- authenticity_token(env)
- back_path
- block_actor_path(actor = nil)
- block_object_path(object = nil)
-
comma(collection, counter)
Emits a comma when one would be necessary when iterating through a collection.
- edit_object_path(object = nil)
-
embed(filename, io_name)
Embed a view with the given filename.
- error_block(model, comma = true)
- error_messages(model)
- everything_path
- field_pair(model, field, comma = true)
- filter_path(filter = nil)
- filters_path
- follow_hashtag_path(hashtag = nil)
- follow_mention_path(mention = nil)
- follow_thread_path(object = nil)
-
form_button(arg1, action = nil, method = "POST", form_class = "ui inline form", button_class = "ui button", form_data = nil, button_data = nil, csrf = env.session.string?("csrf"), &block)
General purpose form-powered button.
- form_tag(model, action, method = "POST", class _class = "ui form", data = nil, csrf = env.session.string?("csrf"), &block)
- hashtag_path(hashtag = nil)
- home_path
-
id
Generates a random, URL-safe identifier.
- id_param(env, type = :url, name = "id")
- inbox_path(actor = nil)
- input_tag(label, model, field, class _class = "", type = "text", placeholder = nil, data = nil)
- iri_param(env, path = nil, type = :url, name = "id")
- mention_path(mention = nil)
- metrics_path
- object_path(object = nil)
- objects_path
- outbox_path(actor = nil)
- params_to_inputs(params, exclude exclude_ = nil, include include_ = nil)
-
pluralize(count, noun)
Pluralizes the noun.
- remote_activity_path(activity = nil)
- remote_actor_path(actor = nil)
- remote_object_path(object = nil)
- remote_thread_path(object = nil)
-
render(content, layout)
Render a view with a layout as the superview.
-
render(content)
Render a view with the given filename.
- reply_path(object = nil)
-
s(str)
Sanitizes HTML.
- search_path
- select_tag(label, model, field, options, selected = nil, class _class = "ui selection dropdown", data = nil)
- sessions_path
- settings_path
- submit_button(value = "Submit", class _class = "ui primary button")
- thread_path(object = nil)
- unapprove_path(object = nil)
- unblock_actor_path(actor = nil)
- unblock_object_path(object = nil)
- unfollow_hashtag_path(hashtag = nil)
- unfollow_mention_path(mention = nil)
- unfollow_thread_path(object = nil)
Macro Detail
macro activity_button(arg1, arg2, arg3, type = nil, method = "POST", public = true, form_class = "ui inline form", button_class = "ui button", form_data = nil, button_data = nil, csrf = env.session.string?("csrf"), &block)
#
Posts an activity to an outbox.
macro comma(collection, counter)
#
Emits a comma when one would be necessary when iterating through a collection.
macro form_button(arg1, action = nil, method = "POST", form_class = "ui inline form", button_class = "ui button", form_data = nil, button_data = nil, csrf = env.session.string?("csrf"), &block)
#
General purpose form-powered button.
macro form_tag(model, action, method = "POST", class _class = "ui form", data = nil, csrf = env.session.string?("csrf"), &block)
#
macro input_tag(label, model, field, class _class = "", type = "text", placeholder = nil, data = nil)
#
macro pluralize(count, noun)
#
Pluralizes the noun.
Important note: if the count is zero, the noun is returned as is, without a quantity (e.g. "fox" not "0 foxes").
For use in views: <%= pluralize(1, "fox") %>
macro select_tag(label, model, field, options, selected = nil, class _class = "ui selection dropdown", data = nil)
#