mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Alter the caption text format for services.
"(Twitter) knu" -> "Twitter: knu"
This commit is contained in:
parent
5b89bcdb68
commit
082cffce5f
2 changed files with 5 additions and 1 deletions
|
@ -60,4 +60,8 @@ module ApplicationHelper
|
|||
content_tag(:span, "Authenticate with #{omniauth_provider_name(provider)}")
|
||||
].join.html_safe, user_omniauth_authorize_path(provider), class: "btn btn-default btn-service service-#{provider}"
|
||||
end
|
||||
|
||||
def service_label_text(service)
|
||||
"#{omniauth_provider_name(service.provider)} - #{service.name}"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% if agent.try(:oauthable?) %>
|
||||
<div class="form-group type-select">
|
||||
<%= label_tag :service %>
|
||||
<%= select_tag 'agent[service_id]', options_for_select(agent.valid_services_for(current_user).collect { |s| ["(#{s.provider}) #{s.name}", s.id]}, agent.service_id), class: 'form-control' %>
|
||||
<%= select_tag 'agent[service_id]', options_for_select(agent.valid_services_for(current_user).collect { |s| [service_label_text(s), s.id] }, agent.service_id), class: 'form-control' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Reference in a new issue