module Ktistec::ViewHelper
Extended Modules
Direct including types
- ActivitiesController
- ActivityModelRenderer
- ActorModelRenderer
- ActorsController
- CollectionModelRenderer
- EverythingController
- FiltersController
- HomeController
- InteractionsController
- Ktistec::Auth
- Ktistec::Handler::Canonical
- LookupsController
- MentionsController
- MetricsController
- ObjectModelRenderer
- ObjectsController
- RelationshipsController
- SearchesController
- SessionsController
- SettingsController
- StreamingController
- SuggestionsController
- SystemController
- TagsController
- TasksController
- UploadsController
- WellKnownController
Defined in:
views/view_helper.crClass Method Summary
- ._layout_src_views_layouts_default_html_ecr(env, title, head, content)
- ._view_src_views_activities_activity_json_ecr(env, activity, recursive)
- ._view_src_views_actors_actor_html_slang_layout_src_views_layouts_default_html_ecr(env, actor)
- ._view_src_views_actors_actor_json_ecr(env, actor)
- ._view_src_views_actors_notifications_html_slang_layout_src_views_layouts_default_html_ecr(env, account, actor, notifications)
- ._view_src_views_actors_notifications_json_ecr(env, account, actor, notifications)
- ._view_src_views_actors_posts_html_slang_layout_src_views_layouts_default_html_ecr(env, actor, objects)
- ._view_src_views_actors_posts_json_ecr(env, actor, objects)
- ._view_src_views_actors_public_posts_html_slang_layout_src_views_layouts_default_html_ecr(env, actor, objects)
- ._view_src_views_actors_public_posts_json_ecr(env, actor, objects)
- ._view_src_views_actors_remote_html_slang_layout_src_views_layouts_default_html_ecr(env, actor)
- ._view_src_views_actors_remote_json_ecr(env, actor)
- ._view_src_views_actors_timeline_html_slang_layout_src_views_layouts_default_html_ecr(env, actor, timeline)
- ._view_src_views_actors_timeline_json_ecr(env, actor, timeline)
- ._view_src_views_everything_index_html_slang_layout_src_views_layouts_default_html_ecr(env, collection)
- ._view_src_views_everything_index_json_ecr(env, collection)
- ._view_src_views_filters_form_html_slang_layout_src_views_layouts_default_html_ecr(env, term)
- ._view_src_views_filters_form_json_ecr(env, term)
- ._view_src_views_filters_index_html_slang_layout_src_views_layouts_default_html_ecr(env, terms)
- ._view_src_views_filters_index_json_ecr(env, terms)
- ._view_src_views_home_index_html_slang_layout_src_views_layouts_default_html_ecr(env, accounts, objects)
- ._view_src_views_home_index_json_ecr(env, accounts, objects)
- ._view_src_views_home_step_1_html_slang_layout_src_views_layouts_default_html_ecr(env, settings)
- ._view_src_views_home_step_1_json_ecr(env, settings)
- ._view_src_views_home_step_2_html_slang_layout_src_views_layouts_default_html_ecr(env, account, actor)
- ._view_src_views_home_step_2_json_ecr(env, account, actor)
- ._view_src_views_interactions_index_html_slang_layout_src_views_layouts_default_html_ecr(env, message, error, target, action, domain)
- ._view_src_views_interactions_index_json_ecr(env, message, error, target, action, domain)
- ._view_src_views_mentions_index_html_slang_layout_src_views_layouts_default_html_ecr(env, mention, collection, count, follow)
- ._view_src_views_mentions_index_json_ecr(env, mention, collection, count, follow)
- ._view_src_views_metrics_metrics_html_slang_layout_src_views_layouts_default_html_ecr(env, charts, range, granularity, labels)
- ._view_src_views_metrics_metrics_json_ecr(env, charts, range, granularity, labels)
- ._view_src_views_objects_edit_html_slang_layout_src_views_layouts_default_html_ecr(env, object, recursive)
- ._view_src_views_objects_edit_json_ecr(env, object, recursive)
- ._view_src_views_objects_index_html_slang_layout_src_views_layouts_default_html_ecr(env, drafts)
- ._view_src_views_objects_index_json_ecr(env, drafts)
- ._view_src_views_objects_object_html_slang_layout_src_views_layouts_default_html_ecr(env, object, recursive)
- ._view_src_views_objects_object_json_ecr(env, object, recursive)
- ._view_src_views_objects_replies_json_ecr(env, object, replies, recursive)
- ._view_src_views_objects_reply_html_slang_layout_src_views_layouts_default_html_ecr(env, object)
- ._view_src_views_objects_thread_html_slang_layout_src_views_layouts_default_html_ecr(env, object, thread, follow, task)
- ._view_src_views_objects_thread_json_ecr(env, object, thread, follow, task)
- ._view_src_views_pages_generic_html_slang_layout_src_views_layouts_default_html_ecr(env, message)
- ._view_src_views_partials_actor_panel_html_slang(env, actor)
- ._view_src_views_partials_collection_json_ecr(env, collection)
- ._view_src_views_partials_editor_html_slang(env, object, recursive)
- ._view_src_views_partials_editor_html_slang_layout_src_views_layouts_default_html_ecr(env, object, recursive)
- ._view_src_views_partials_editor_json_ecr(env, object, recursive)
- ._view_src_views_partials_object_content_html_slang(env, object, author, actor, with_detail, for_thread)
- ._view_src_views_partials_object_label_html_slang(env, author, actor)
- ._view_src_views_relationships_actors_html_slang_layout_src_views_layouts_default_html_ecr(env, related)
- ._view_src_views_relationships_actors_json_ecr(env, related)
- ._view_src_views_relationships_inbox_html_slang_layout_src_views_layouts_default_html_ecr(env, account, activities)
- ._view_src_views_relationships_inbox_json_ecr(env, account, activities)
- ._view_src_views_relationships_objects_html_slang_layout_src_views_layouts_default_html_ecr(env, objects)
- ._view_src_views_relationships_objects_json_ecr(env, objects)
- ._view_src_views_relationships_outbox_html_slang_layout_src_views_layouts_default_html_ecr(env, activities)
- ._view_src_views_relationships_outbox_json_ecr(env, activities)
- ._view_src_views_searches_actor_html_slang_layout_src_views_layouts_default_html_ecr(env, actor, message, query)
- ._view_src_views_searches_actor_json_ecr(env, actor, message, query)
- ._view_src_views_searches_form_html_slang_layout_src_views_layouts_default_html_ecr(env, message, query)
- ._view_src_views_searches_form_json_ecr(env, message, query)
- ._view_src_views_searches_object_html_slang_layout_src_views_layouts_default_html_ecr(env, object, message, query)
- ._view_src_views_searches_object_json_ecr(env, object, message, query)
- ._view_src_views_sessions_new_html_slang_layout_src_views_layouts_default_html_ecr(env, message, username, password)
- ._view_src_views_sessions_new_json_ecr(env, message, username, password)
- ._view_src_views_settings_settings_html_slang_layout_src_views_layouts_default_html_ecr(env, account, actor, settings)
- ._view_src_views_settings_settings_json_ecr(env, account, actor, settings)
- ._view_src_views_system_index_html_slang_layout_src_views_layouts_default_html_ecr(env, log_levels, sources)
- ._view_src_views_system_index_json_ecr(env, log_levels, sources)
- ._view_src_views_tags_index_html_slang_layout_src_views_layouts_default_html_ecr(env, hashtag, collection, count, follow, task)
- ._view_src_views_tags_index_json_ecr(env, hashtag, collection, count, follow, task)
- ._view_src_views_tasks_index_html_slang_layout_src_views_layouts_default_html_ecr(env, tasks)
- ._view_src_views_tasks_index_json_ecr(env, tasks)
Macro 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)
-
activity_pub_collection(collection, &block)
Renders an ActivityPub collection as JSON-LD.
- 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)
- cancel_fetch_hashtag_path(hashtag = nil)
- cancel_fetch_thread_path(object = nil)
-
comma(collection, counter)
Emits a comma when one would be necessary when iterating through a collection.
-
distance_of_time_in_words(*args)
Transforms the span of time between two different times into words.
- 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
-
fetch_task_status_line(task, collection = nil, detail = false)
Returns the fetch task status line.
- 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", form = nil, class _class = "ui form", data = nil, csrf = env.session.string?("csrf"), &block)
- hashtag_path(hashtag = nil)
- home_path
-
host
Returns the host.
-
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)
- object_remote_like_path(object = nil)
- object_remote_reply_path(object = nil)
- object_remote_share_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_interaction_path
- remote_object_path(object = nil)
- remote_thread_path(object = nil, anchor = true)
- 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
- start_fetch_hashtag_path(hashtag = nil)
- start_fetch_thread_path(object = nil)
- submit_button(value = "Submit", class _class = "ui primary button")
- system_path
-
task_status_line(task, detail = false)
Returns the task status line.
- tasks_path
- thread_path(object = nil, anchor = true)
- 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)
Class Method Detail
Macro Detail
Posts an activity to an outbox.
Emits a comma when one would be necessary when iterating through a collection.
Transforms the span of time between two different times into words.
For use in views: <%= distance_of_time_in_words(from_time, to_time) %>
Returns the fetch task status line.
If collection
is specified, also includes the most recent
published
date of posts in that collection.
General purpose form-powered button.
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") %>