Skip to content

Commit

Permalink
Merge branch 'development' into feature/update-upload-ontology
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Aug 22, 2023
2 parents 29ff91a + 1bc089a commit 9a0b226
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 38 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/bioportal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1162,3 +1162,7 @@ turbo-frame[busy] .hide-if-loading, .show-if-loading {
turbo-frame[busy] ~ .show-if-loading {
display: inline-block;
}

.hide{
display:none;
}
4 changes: 3 additions & 1 deletion app/assets/stylesheets/components/progress_pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
.progress-pages-container .progress-item:first-of-type {
& > div {
align-items: start;
left: 0;
}
}

.progress-pages-container .progress-item:last-of-type {
& > div {
align-items: end;
left: -23px;
}
}

Expand Down Expand Up @@ -69,7 +71,7 @@

.outlined-checked-circle {
border: 2px solid var(--primary-color) !important;
background-color: var(--primary-color);
background-color: var(--primary-color) !important;
display: flex;
align-items: center;
justify-content: center;
Expand Down
4 changes: 3 additions & 1 deletion app/components/buttons/regular_button_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def initialize(id: , value:, variant: "primary", color: "normal", href: "", size
end

def button_label
content_tag(:span, icon_left, class: "#{@variant}-button-icon left-button-icon") + @value + content_tag(:span, icon_right, class: "#{@variant}-button-icon right-button-icon")
hide_icon_left = icon_left == nil ? "hide" : " "
hide_icon_right = icon_right == nil ? "hide" : " "
content_tag(:span, icon_left, class: "#{@variant}-button-icon left-button-icon #{hide_icon_left}") + @value + content_tag(:span, icon_right, class: "#{@variant}-button-icon right-button-icon #{hide_icon_right}")
end

def button_elem
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
- slim_class = @size == "slim" ? "slim " : " "
- danger_class = @color == "danger" ? "danger-button " : " "
- warning_class = @color == "warning" ? "warning-button " : " "
- disabled_class = @state == "disabled" ? "disabled-button " : " "
.button-container
= button_elem

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def omniauth_providers_info
end

def omniauth_provider_info(strategy)
omniauth_providers_info.select {|k,v| v[:strategy].eql?(strategy.to_sym)}
omniauth_providers_info.select {|k,v| v[:strategy].eql?(strategy.to_sym) || k.eql?(strategy)}
end

def omniauth_token_provider(strategy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,7 @@ def disabled
def no_animation
render Buttons::RegularButtonComponent.new(id:'regular-button', value: "Login", variant: "primary", state: "regular")
end

def slim
def slim()
render Buttons::RegularButtonComponent.new(value: "Login", name: "login", type: "regular", variant: "primary", size: "slim")
end
end

def danger
def danger()
render Buttons::RegularButtonComponent.new(value: "Login", name: "login", type: "regular", variant: "primary", color: "danger")
end
end

def warning
def warning()
render Buttons::RegularButtonComponent.new(value: "Login", name: "login", type: "regular", variant: "primary", color: "warning")
end
end

def disabled
def disabled()
render Buttons::RegularButtonComponent.new(value: "Login", name: "login", type: "regular", variant: "primary", state: "disabled")
end
end

def no_animation
def no_animation()
render Buttons::RegularButtonComponent.new(value: "Login", name: "login", type: "regular", variant: "primary", state: "regular")
end
end


def icon_left
render Buttons::RegularButtonComponent.new(id:'regular-button', value: "Login", variant: "primary") do |btn|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Layout::ProgressPagesComponentPreview < ViewComponent::Preview
# @param pages_count number
def default(pages_count: 5)
render Layout::ProgressPagesComponent.new(pages_title: (pages_count || 0).times.map { |x| "page #{x}" }) do |c|
5.times.each { |i| c.page { content_tag(:div, "page #{i}", class: "p-5 mx-5") } }
5.times.each { |i| c.page { content_tag(:div, "page #{i}", class: "p-5 mx-5 text-center", style: 'width: 500px') } }
end
end
end

0 comments on commit 9a0b226

Please sign in to comment.