Sha256: 130dcfc010b5ce6cf4bbaa3fa098c79ee85ad7b9af6359d1a6c6c248483ab92c

Contents?: true

Size: 1.4 KB

Versions: 17

Compression:

Stored size: 1.4 KB

Contents

<%
form ||= current_fields_form
labels = labels_for(form, method)
options ||= {}
other_options ||= {}

options[:class] = "formatted_content trix-content #{options[:class]}"
options[:placeholder] ||= labels.placeholder if labels.placeholder
options[:data] ||= {}
if defined?(current_team) && current_team.present?
  options[:data][:mentions] ||= ([current_team].map { |team|
    {key: team.name, value: team.id, protocol: 'bullettrain', model: 'teams', id: team.id, label: team.name, photo: photo_for(team)}
  } + current_team.memberships.current_and_invited.map { |membership|
    {key: membership.name, value: membership.id, protocol: 'bullettrain', model: 'memberships', id: membership.id, label: membership.name, photo: membership_profile_photo_url(membership)}
  }).to_json
end
options[:data][:topics] ||= []
# current_team.scaffolding_things.map { |scaffolding_thing|
#   {key: scaffolding_thing.name, value: scaffolding_thing.id, protocol: 'bullettrain', model: 'scaffolding/things', id: scaffolding_thing.id, label: scaffolding_thing.name, photo: photo_for(scaffolding_thing)}
# }.to_json
%>

<div class="<%= 'trix-hide-toolbar' if other_options[:hide_toolbar] %>">
<%= render 'shared/fields/field', form: form, method: method, options: options, other_options: other_options do %>
  <% content_for :field do %>
    <%= form.rich_text_area method, options %>
    <%= partial.submit_button.presence %>
  <% end %>
<% end %>
</div>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
bullet_train-themes-1.10.0 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.9.0 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.8.5 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.8.4 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.8.3 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.8.2 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.8.1 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.8.0 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.23 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.22 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.21 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.20 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.19 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.18 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.17 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.16 app/views/themes/base/fields/_trix_editor.html.erb
bullet_train-themes-1.7.15 app/views/themes/base/fields/_trix_editor.html.erb