module Ktistec::ViewHelper

Included Modules

Extended Modules

Direct including types

Defined in:

views/view_helper.cr

Class Method Summary

Macro Summary

Macros inherited from module Utils::Paths

activity_path(activity = nil) activity_path, actor_path(actor = nil) actor_path, actor_relationships_path(actor = nil, relationship = nil) actor_relationships_path, actor_remote_follow_path(actor = nil) actor_remote_follow_path, admin_accounts_path admin_accounts_path, admin_path admin_path, anchor(object = nil) anchor, approve_path(object = nil) approve_path, back_path back_path, block_actor_path(actor = nil) block_actor_path, block_object_path(object = nil) block_object_path, cancel_fetch_hashtag_path(hashtag = nil) cancel_fetch_hashtag_path, cancel_fetch_thread_path(object = nil) cancel_fetch_thread_path, clear_translation_object_path(object = nil) clear_translation_object_path, create_translation_object_path(object = nil) create_translation_object_path, edit_object_path(object = nil) edit_object_path, everything_path everything_path, filter_path(filter = nil) filter_path, filters_path filters_path, follow_hashtag_path(hashtag = nil) follow_hashtag_path, follow_mention_path(mention = nil) follow_mention_path, follow_thread_path(object = nil) follow_thread_path, hashtag_path(hashtag = nil) hashtag_path, home_path home_path, inbox_path(actor = nil) inbox_path, mcp_actor_path(actor) mcp_actor_path, mcp_information_path mcp_information_path, mcp_object_path(object) mcp_object_path, mcp_user_path(account) mcp_user_path, mention_path(mention = nil) mention_path, metrics_path metrics_path, object_path(object = nil) object_path, object_remote_like_path(object = nil) object_remote_like_path, object_remote_reply_path(object = nil) object_remote_reply_path, object_remote_share_path(object = nil) object_remote_share_path, objects_path objects_path, outbox_path(actor = nil) outbox_path, refresh_remote_actor_path(actor = nil) refresh_remote_actor_path, remote_activity_path(activity = nil) remote_activity_path, remote_actor_path(actor = nil) remote_actor_path, remote_interaction_path remote_interaction_path, remote_object_path(object = nil) remote_object_path, remote_thread_path(object = nil, anchor = true) remote_thread_path, reply_path(object = nil) reply_path, search_path search_path, sessions_path sessions_path, settings_path settings_path, start_fetch_hashtag_path(hashtag = nil) start_fetch_hashtag_path, start_fetch_thread_path(object = nil) start_fetch_thread_path, system_path system_path, tasks_path tasks_path, thread_path(object = nil, anchor = true) thread_path, unapprove_path(object = nil) unapprove_path, unblock_actor_path(actor = nil) unblock_actor_path, unblock_object_path(object = nil) unblock_object_path, unfollow_hashtag_path(hashtag = nil) unfollow_hashtag_path, unfollow_mention_path(mention = nil) unfollow_mention_path, unfollow_thread_path(object = nil) unfollow_thread_path

Class Method Detail

def self._layout_src_views_layouts_default_html_ecr(env, title, head, content) #

[View source]
def self._view_src_views_activities_activity_json_ecr(env, activity, recursive) #

[View source]
def self._view_src_views_actors_actor_html_slang_layout_src_views_layouts_default_html_ecr(env, actor) #

[View source]
def self._view_src_views_actors_actor_json_ecr(env, actor) #

[View source]
def self._view_src_views_actors_notifications_html_slang_layout_src_views_layouts_default_html_ecr(env, account, actor, notifications) #

[View source]
def self._view_src_views_actors_notifications_json_ecr(env, account, actor, notifications) #

[View source]
def self._view_src_views_actors_posts_html_slang_layout_src_views_layouts_default_html_ecr(env, actor, objects) #

[View source]
def self._view_src_views_actors_posts_json_ecr(env, actor, objects) #

[View source]
def self._view_src_views_actors_public_posts_html_slang_layout_src_views_layouts_default_html_ecr(env, actor, objects) #

[View source]
def self._view_src_views_actors_public_posts_json_ecr(env, actor, objects) #

[View source]
def self._view_src_views_actors_remote_html_slang_layout_src_views_layouts_default_html_ecr(env, actor) #

[View source]
def self._view_src_views_actors_remote_json_ecr(env, actor) #

[View source]
def self._view_src_views_actors_timeline_html_slang_layout_src_views_layouts_default_html_ecr(env, actor, timeline) #

[View source]
def self._view_src_views_actors_timeline_json_ecr(env, actor, timeline) #

[View source]
def self._view_src_views_admin_accounts_index_html_slang_layout_src_views_layouts_default_html_ecr(env, accounts) #

[View source]
def self._view_src_views_admin_accounts_index_json_ecr(env, accounts) #

[View source]
def self._view_src_views_admin_accounts_new_html_slang_layout_src_views_layouts_default_html_ecr(env, account, actor) #

[View source]
def self._view_src_views_admin_accounts_new_json_ecr(env, account, actor) #

[View source]
def self._view_src_views_admin_accounts_show_json_ecr(env, account) #

[View source]
def self._view_src_views_admin_index_html_slang_layout_src_views_layouts_default_html_ecr(env) #

[View source]
def self._view_src_views_admin_oauth_clients_index_html_slang_layout_src_views_layouts_default_html_ecr(env, clients, new_client) #

[View source]
def self._view_src_views_design_system_index_html_slang_layout_src_views_layouts_default_html_ecr(env, actor) #

[View source]
def self._view_src_views_everything_index_html_slang_layout_src_views_layouts_default_html_ecr(env, collection) #

[View source]
def self._view_src_views_everything_index_json_ecr(env, collection) #

[View source]
def self._view_src_views_filters_form_html_slang_layout_src_views_layouts_default_html_ecr(env, term) #

[View source]
def self._view_src_views_filters_form_json_ecr(env, term) #

[View source]
def self._view_src_views_filters_index_html_slang_layout_src_views_layouts_default_html_ecr(env, terms) #

[View source]
def self._view_src_views_filters_index_json_ecr(env, terms) #

[View source]
def self._view_src_views_home_index_html_slang_layout_src_views_layouts_default_html_ecr(env, accounts, objects) #

[View source]
def self._view_src_views_home_index_json_ecr(env, accounts, objects) #

[View source]
def self._view_src_views_home_step_1_html_slang_layout_src_views_layouts_default_html_ecr(env, settings) #

[View source]
def self._view_src_views_home_step_1_json_ecr(env, settings) #

[View source]
def self._view_src_views_home_step_2_html_slang_layout_src_views_layouts_default_html_ecr(env, account, actor) #

[View source]
def self._view_src_views_home_step_2_json_ecr(env, account, actor) #

[View source]
def self._view_src_views_interactions_index_html_slang_layout_src_views_layouts_default_html_ecr(env, message, error, target, action, domain) #

[View source]
def self._view_src_views_interactions_index_json_ecr(env, message, error, target, action, domain) #

[View source]
def self._view_src_views_mentions_index_html_slang_layout_src_views_layouts_default_html_ecr(env, mention, collection, count, follow) #

[View source]
def self._view_src_views_mentions_index_json_ecr(env, mention, collection, count, follow) #

[View source]
def self._view_src_views_metrics_metrics_html_slang_layout_src_views_layouts_default_html_ecr(env, charts, range, granularity, labels) #

[View source]
def self._view_src_views_metrics_metrics_json_ecr(env, charts, range, granularity, labels) #

[View source]
def self._view_src_views_oauth_authorize_html_slang_layout_src_views_layouts_default_html_ecr(env, state, code_challenge, code_challenge_method, client, redirect_uri, response_type, scope) #

[View source]
def self._view_src_views_objects_edit_html_slang_layout_src_views_layouts_default_html_ecr(env, object, recursive) #

[View source]
def self._view_src_views_objects_edit_json_ecr(env, object, recursive) #

[View source]
def self._view_src_views_objects_index_html_slang_layout_src_views_layouts_default_html_ecr(env, drafts) #

[View source]
def self._view_src_views_objects_index_json_ecr(env, drafts) #

[View source]
def self._view_src_views_objects_new_html_slang_layout_src_views_layouts_default_html_ecr(env, object, recursive) #

[View source]
def self._view_src_views_objects_new_json_ecr(env, object, recursive) #

[View source]
def self._view_src_views_objects_object_html_slang_layout_src_views_layouts_default_html_ecr(env, object, recursive) #

[View source]
def self._view_src_views_objects_object_json_ecr(env, object, recursive) #

[View source]
def self._view_src_views_objects_replies_json_ecr(env, object, replies, recursive) #

[View source]
def self._view_src_views_objects_reply_html_slang_layout_src_views_layouts_default_html_ecr(env, object) #

[View source]
def self._view_src_views_objects_thread_html_slang_layout_src_views_layouts_default_html_ecr(env, object, thread, follow, task) #

[View source]
def self._view_src_views_objects_thread_json_ecr(env, object, thread, follow, task) #

[View source]
def self._view_src_views_pages_generic_html_slang_layout_src_views_layouts_default_html_ecr(env, message) #

[View source]
def self._view_src_views_partials_actor_panel_html_slang(env, actor) #

[View source]
def self._view_src_views_partials_collection_json_ecr(env, collection) #

[View source]
def self._view_src_views_partials_editor_html_slang(env, object) #

[View source]
def self._view_src_views_partials_editor_json_ecr(env, object) #

[View source]
def self._view_src_views_partials_object_content_html_slang(env, object, author, actor, with_detail, for_thread) #

[View source]
def self._view_src_views_partials_object_label_html_slang(env, author, actor) #

[View source]
def self._view_src_views_relationships_actors_html_slang_layout_src_views_layouts_default_html_ecr(env, related) #

[View source]
def self._view_src_views_relationships_actors_json_ecr(env, related) #

[View source]
def self._view_src_views_relationships_inbox_html_slang_layout_src_views_layouts_default_html_ecr(env, account, activities) #

[View source]
def self._view_src_views_relationships_inbox_json_ecr(env, account, activities) #

[View source]
def self._view_src_views_relationships_objects_html_slang_layout_src_views_layouts_default_html_ecr(env, objects) #

[View source]
def self._view_src_views_relationships_objects_json_ecr(env, objects) #

[View source]
def self._view_src_views_relationships_outbox_html_slang_layout_src_views_layouts_default_html_ecr(env, activities) #

[View source]
def self._view_src_views_relationships_outbox_json_ecr(env, activities) #

[View source]
def self._view_src_views_searches_actor_html_slang_layout_src_views_layouts_default_html_ecr(env, actor, message, query) #

[View source]
def self._view_src_views_searches_actor_json_ecr(env, actor, message, query) #

[View source]
def self._view_src_views_searches_actors_html_slang_layout_src_views_layouts_default_html_ecr(env, actors, message, query) #

[View source]
def self._view_src_views_searches_actors_json_ecr(env, actors, message, query) #

[View source]
def self._view_src_views_searches_form_html_slang_layout_src_views_layouts_default_html_ecr(env, message, query) #

[View source]
def self._view_src_views_searches_form_json_ecr(env, message, query) #

[View source]
def self._view_src_views_searches_object_html_slang_layout_src_views_layouts_default_html_ecr(env, object, message, query) #

[View source]
def self._view_src_views_searches_object_json_ecr(env, object, message, query) #

[View source]
def self._view_src_views_sessions_new_html_slang_layout_src_views_layouts_default_html_ecr(env, message, username, password) #

[View source]
def self._view_src_views_sessions_new_json_ecr(env, message, username, password) #

[View source]
def self._view_src_views_settings_settings_html_slang_layout_src_views_layouts_default_html_ecr(env, account, actor, settings) #

[View source]
def self._view_src_views_settings_settings_json_ecr(env, account, actor, settings) #

[View source]
def self._view_src_views_system_index_html_slang_layout_src_views_layouts_default_html_ecr(env, log_levels, sources) #

[View source]
def self._view_src_views_system_index_json_ecr(env, log_levels, sources) #

[View source]
def self._view_src_views_tags_index_html_slang_layout_src_views_layouts_default_html_ecr(env, hashtag, collection, count, follow, task) #

[View source]
def self._view_src_views_tags_index_json_ecr(env, hashtag, collection, count, follow, task) #

[View source]
def self._view_src_views_tasks_index_html_slang_layout_src_views_layouts_default_html_ecr(env, tasks) #

[View source]
def self._view_src_views_tasks_index_json_ecr(env, tasks) #

[View source]

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.


[View source]
macro activity_pub_collection(collection, &block) #

Renders an ActivityPub collection as JSON-LD.


[View source]
macro authenticity_token(env) #

[View source]
macro comma(collection, counter) #

Emits a comma when one would be necessary when iterating through a collection.


[View source]
macro distance_of_time_in_words(*args) #

Transforms the span of time between two different times into words.

For use in views: <%= distance_of_time_in_words(from_time, to_time) %>


[View source]
macro embed(filename, io_name) #

Embed a view with the given filename.


[View source]
macro error_block(model, comma = true) #

[View source]
macro error_messages(model) #

[View source]
macro fetch_task_status_line(task, collection = nil, detail = false) #

Returns the fetch task status line.

If collection is specified, also includes the most recent published date of posts in that collection.


[View source]
macro field_pair(model, field, comma = true) #

[View source]
macro form_button(arg1, action = nil, method = "POST", form_id = nil, form_class = "ui inline form", button_id = nil, button_class = "ui button", form_data = nil, button_data = nil, csrf = env.session.string?("csrf"), &block) #

General purpose form-powered button.


[View source]
macro form_tag(model, action, *, method = "POST", form = nil, class _class = "ui form", data = nil, csrf = env.session.string?("csrf"), &block) #

[View source]
macro host #

Returns the host.


[View source]
macro id #

Generates a random, URL-safe identifier.


[View source]
macro id_param(env, type = :url, name = "id") #

[View source]
macro input_tag(label, model, field, id = nil, class _class = "", type = "text", placeholder = nil, autofocus = nil, data = nil) #

[View source]
macro iri_param(env, path = nil, type = :url, name = "id") #

[View source]
macro markdown_to_html(markdown) #

Converts Markdown to HTML.


[View source]
macro params_to_inputs(params, exclude exclude_ = nil, include include_ = nil) #

[View source]
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") %>


[View source]
macro s(str) #

Sanitizes HTML.

For use in views: <%= s string %>


[View source]
macro select_tag(label, model, field, options, selected = nil, id = nil, class _class = "ui selection dropdown", data = nil) #

[View source]
macro submit_button(value = "Submit", class _class = "ui primary button") #

[View source]
macro task_status_line(task, detail = false) #

Returns the task status line.


[View source]
macro textarea_tag(label, model, field, id = nil, class _class = "", rows = 4, placeholder = nil, autofocus = nil, data = nil) #

[View source]
macro trix_editor(label, model, field, id = nil, class _class = "") #

[View source]