module Ktistec::ViewHelper

Direct including types

Defined in:

views/view_helper.cr

Macro Summary

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_path(activity = nil) #

[View source]
macro actor_path(actor = nil) #

[View source]
macro actor_relationships_path(actor = nil, relationship = nil) #

[View source]
macro actor_remote_follow_path(actor = nil) #

[View source]
macro anchor(object = nil) #

[View source]
macro approve_path(object = nil) #

[View source]
macro authenticity_token(env) #

[View source]
macro back_path #

[View source]
macro block_actor_path(actor = nil) #

[View source]
macro block_object_path(object = nil) #

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

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


[View source]
macro edit_object_path(object = nil) #

[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 everything_path #

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

[View source]
macro filter_path(filter = nil) #

[View source]
macro filters_path #

[View source]
macro follow_hashtag_path(hashtag = nil) #

[View source]
macro follow_mention_path(mention = nil) #

[View source]
macro follow_thread_path(object = nil) #

[View source]
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.


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

[View source]
macro hashtag_path(hashtag = nil) #

[View source]
macro home_path #

[View source]
macro id #

Generates a random, URL-safe identifier.


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

[View source]
macro inbox_path(actor = nil) #

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

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

[View source]
macro mention_path(mention = nil) #

[View source]
macro metrics_path #

[View source]
macro object_path(object = nil) #

[View source]
macro objects_path #

[View source]
macro outbox_path(actor = nil) #

[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 remote_activity_path(activity = nil) #

[View source]
macro remote_actor_path(actor = nil) #

[View source]
macro remote_object_path(object = nil) #

[View source]
macro remote_thread_path(object = nil) #

[View source]
macro render(content, layout) #

Render a view with a layout as the superview.


[View source]
macro render(content) #

Render a view with the given filename.


[View source]
macro reply_path(object = nil) #

[View source]
macro s(str) #

Sanitizes HTML.

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


[View source]
macro search_path #

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

[View source]
macro sessions_path #

[View source]
macro settings_path #

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

[View source]
macro thread_path(object = nil) #

[View source]
macro unapprove_path(object = nil) #

[View source]
macro unblock_actor_path(actor = nil) #

[View source]
macro unblock_object_path(object = nil) #

[View source]
macro unfollow_hashtag_path(hashtag = nil) #

[View source]
macro unfollow_mention_path(mention = nil) #

[View source]
macro unfollow_thread_path(object = nil) #

[View source]