Simplify renders in views (#2084)
* Simplify render in mailer views * Simplify render in about/more view * Simplify render in accounts follow views * Simplify render in recovery code views * Simplify render in stream entry embed * Simplify render in stream entries status partial * Simplify render in authorize follow new viewlolsob-rspec
parent
d299e70579
commit
2a86067f5e
|
@ -28,5 +28,5 @@
|
||||||
.panel= @instance_presenter.site_extended_description.html_safe
|
.panel= @instance_presenter.site_extended_description.html_safe
|
||||||
|
|
||||||
.sidebar
|
.sidebar
|
||||||
= render partial: 'contact', object: @instance_presenter
|
= render 'contact', contact: @instance_presenter
|
||||||
= render 'links'
|
= render 'links'
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
.accounts-grid
|
.accounts-grid
|
||||||
- if @followers.empty?
|
- if @followers.empty?
|
||||||
= render partial: 'nothing_here'
|
= render 'nothing_here'
|
||||||
- else
|
- else
|
||||||
= render partial: 'grid_card', collection: @followers, as: :account, cached: true
|
= render partial: 'grid_card', collection: @followers, as: :account, cached: true
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
.accounts-grid
|
.accounts-grid
|
||||||
- if @following.empty?
|
- if @following.empty?
|
||||||
= render partial: 'nothing_here'
|
= render 'nothing_here'
|
||||||
- else
|
- else
|
||||||
= render partial: 'grid_card', collection: @following, as: :account, cached: true
|
= render partial: 'grid_card', collection: @following, as: :account, cached: true
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
- if @statuses.empty?
|
- if @statuses.empty?
|
||||||
.accounts-grid
|
.accounts-grid
|
||||||
= render partial: 'nothing_here'
|
= render 'nothing_here'
|
||||||
- else
|
- else
|
||||||
.activity-stream
|
.activity-stream
|
||||||
= render partial: 'stream_entries/status', collection: @statuses, as: :status
|
= render partial: 'stream_entries/status', collection: @statuses, as: :status
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
.follow-prompt
|
.follow-prompt
|
||||||
%h2= t('authorize_follow.prompt_html', self: current_account.username)
|
%h2= t('authorize_follow.prompt_html', self: current_account.username)
|
||||||
|
|
||||||
= render partial: 'card', locals: { account: @account }
|
= render 'card', account: @account
|
||||||
|
|
||||||
= form_tag authorize_follow_path, method: :post, class: 'simple_form' do
|
= form_tag authorize_follow_path, method: :post, class: 'simple_form' do
|
||||||
= hidden_field_tag :acct, @account.acct
|
= hidden_field_tag :acct, @account.acct
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
<%= raw t('notification_mailer.favourite.body', name: @account.acct) %>
|
<%= raw t('notification_mailer.favourite.body', name: @account.acct) %>
|
||||||
|
|
||||||
<%= render partial: 'status', locals: { status: @status } %>
|
<%= render 'status', status: @status %>
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
<%= raw t('notification_mailer.mention.body', name: @status.account.acct) %>
|
<%= raw t('notification_mailer.mention.body', name: @status.account.acct) %>
|
||||||
|
|
||||||
<%= render partial: 'status', locals: { status: @status } %>
|
<%= render 'status', status: @status %>
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
<%= raw t('notification_mailer.reblog.body', name: @account.acct) %>
|
<%= raw t('notification_mailer.reblog.body', name: @account.acct) %>
|
||||||
|
|
||||||
<%= render partial: 'status', locals: { status: @status } %>
|
<%= render 'status', status: @status %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('settings.two_factor_auth')
|
= t('settings.two_factor_auth')
|
||||||
|
|
||||||
= render partial: 'recovery_codes', object: @codes
|
= render 'recovery_codes', recovery_codes: @codes
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('settings.two_factor_auth')
|
= t('settings.two_factor_auth')
|
||||||
|
|
||||||
= render partial: 'recovery_codes', object: @codes
|
= render 'recovery_codes', recovery_codes: @codes
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
%strong.emojify= display_name(status.account)
|
%strong.emojify= display_name(status.account)
|
||||||
= t('stream_entries.reblogged')
|
= t('stream_entries.reblogged')
|
||||||
|
|
||||||
= render partial: centered ? 'stream_entries/detailed_status' : 'stream_entries/simple_status', locals: { status: status.proper }
|
= render (centered ? 'stream_entries/detailed_status' : 'stream_entries/simple_status'), status: status.proper
|
||||||
|
|
||||||
- if include_threads
|
- if include_threads
|
||||||
= render partial: 'stream_entries/status', collection: @descendants, as: :status, locals: { is_successor: true, parent_id: status.id}
|
= render partial: 'stream_entries/status', collection: @descendants, as: :status, locals: { is_successor: true, parent_id: status.id}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
.activity-stream.activity-stream-headless
|
.activity-stream.activity-stream-headless
|
||||||
= render partial: @type, locals: { @type.to_sym => @stream_entry.activity, centered: true }
|
= render @type, @type.to_sym => @stream_entry.activity, centered: true
|
||||||
|
|
Loading…
Reference in New Issue