mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-21 22:17:48 +01:00
Merge branch 'feature/bootstrap' of github.com:Retrospring/retrospring into feature/bootstrap
This commit is contained in:
commit
322cfceeab
5 changed files with 20 additions and 14 deletions
|
@ -43,7 +43,7 @@ module ThemeHelper
|
||||||
|
|
||||||
body += "}"
|
body += "}"
|
||||||
|
|
||||||
content_tag(:style, body, data: { "turbolinks-track": false })
|
content_tag(:style, body)
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_active_theme
|
def get_active_theme
|
||||||
|
|
|
@ -12,13 +12,12 @@
|
||||||
%title= yield(:title)
|
%title= yield(:title)
|
||||||
= javascript_include_tag 'i18n', 'data-turbolinks-track' => true
|
= javascript_include_tag 'i18n', 'data-turbolinks-track' => true
|
||||||
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
|
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
|
||||||
= render_theme
|
|
||||||
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
- if current_user.mod?
|
- if current_user.mod?
|
||||||
= javascript_include_tag 'moderation', 'data-turbolinks-track' => true
|
= javascript_include_tag 'moderation', 'data-turbolinks-track' => true
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
%body#version1
|
%body
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
= render 'navigation/main'
|
= render 'navigation/main'
|
||||||
- else
|
- else
|
||||||
|
@ -37,4 +36,5 @@
|
||||||
= succeed ')' do
|
= succeed ')' do
|
||||||
= `git rev-parse --short HEAD`.strip
|
= `git rev-parse --short HEAD`.strip
|
||||||
%p.text-danger Debug params:
|
%p.text-danger Debug params:
|
||||||
= debug params
|
= debug params
|
||||||
|
= render_theme
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @answers_last_id }}
|
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @answers_last_id }}
|
||||||
Load more
|
Load more
|
||||||
|
|
||||||
- if user_signed_in? and !current_user.answered? @question and current_user != @question.user and @question.user.privacy_allow_stranger_answers
|
- if user_signed_in? && !current_user.answered?(@question) && current_user != @question.user && @question.user&.privacy_allow_stranger_answers
|
||||||
.card#q-answer-box
|
.card#q-answer-box
|
||||||
.card-header
|
.card-header
|
||||||
%h3.card-title= t('views.question.title')
|
%h3.card-title= t('views.question.title')
|
||||||
|
|
|
@ -132,22 +132,28 @@
|
||||||
%h4 Sign In
|
%h4 Sign In
|
||||||
|
|
||||||
%p.font-weight-bold.mb-0 Current Sign In
|
%p.font-weight-bold.mb-0 Current Sign In
|
||||||
%p.text-muted= localize(current_user.current_sign_in_at)
|
%p.text-muted= current_user.current_sign_in_at ? localize(current_user.current_sign_in_at) : "Not set"
|
||||||
|
|
||||||
%p.font-weight-bold.mb-0 Last Sign In
|
%p.font-weight-bold.mb-0 Last Sign In
|
||||||
%p.text-muted= localize(current_user.last_sign_in_at)
|
%p.text-muted= current_user.last_sign_in_at ? localize(current_user.last_sign_in_at) : "Not set"
|
||||||
|
|
||||||
%p.font-weight-bold.mb-0 Remember me set at
|
%p.font-weight-bold.mb-0 Remember me set at
|
||||||
%p.text-muted= localize(current_user.remember_created_at)
|
%p.text-muted= current_user.remember_created_at ? localize(current_user.remember_created_at) : "Not set"
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
%h4 Create/Update
|
%h4 Create/Update
|
||||||
|
|
||||||
%p.font-weight-bold.mb-0 Account created
|
%p.font-weight-bold.mb-0 Account created
|
||||||
%p.text-muted
|
%p.text-muted
|
||||||
= localize(current_user.created_at)
|
- if current_user.created_at
|
||||||
= " (#{time_ago_in_words(current_user.created_at)} ago)"
|
= localize(current_user.created_at)
|
||||||
|
= " (#{time_ago_in_words(current_user.created_at)} ago)"
|
||||||
|
- else
|
||||||
|
Not set
|
||||||
|
|
||||||
%p.font-weight-bold.mb-0 Account last updated
|
%p.font-weight-bold.mb-0 Account last updated
|
||||||
%p.text-muted
|
%p.text-muted
|
||||||
= localize(current_user.updated_at)
|
- if current_user.created_at
|
||||||
= " (#{time_ago_in_words(current_user.updated_at)} ago)"
|
= localize(current_user.updated_at)
|
||||||
|
= " (#{time_ago_in_words(current_user.updated_at)} ago)"
|
||||||
|
- else
|
||||||
|
Not set
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe ThemeHelper, :type => :helper do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns a theme" do
|
it "returns a theme" do
|
||||||
expect(helper.render_theme).to include('<style data-turbolinks-track="false">:root {')
|
expect(helper.render_theme).to include('<style>:root {')
|
||||||
end
|
end
|
||||||
|
|
||||||
it "contains correct theme background colors" do
|
it "contains correct theme background colors" do
|
||||||
|
@ -141,4 +141,4 @@ describe ThemeHelper, :type => :helper do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue