diff --git a/app/views/services/index.html.haml b/app/views/services/index.html.haml index 98d876a5..66cf366e 100644 --- a/app/views/services/index.html.haml +++ b/app/views/services/index.html.haml @@ -1,2 +1,19 @@ -

Services#index

-

Find me in app/views/services/index.html.erb

+.container.j2-page + = render 'user/settings_tabs' + .col-md-9.col-xs-12.col-sm-9 + .panel.panel-default + .panel-body + - if @services.count > 0 + Sharing is enabled for the following services: + %ul + - @services.each do |service| + %li + %strong= service.provider + (#{service.nickname}) + = link_to 'Disconnect', service_path(service), data: { confirm: "Really disconnect service #{service.provider}?" }, method: :delete + - else + You have not connected any services yet. + + - APP_CONFIG['sharing'].each do |service, service_options| + - if service_options['enabled'] + %p=link_to "Connect to #{service.capitalize}", "/auth/#{service}" \ No newline at end of file diff --git a/app/views/user/_settings_tabs.html.haml b/app/views/user/_settings_tabs.html.haml index 9db9a477..a58d3517 100644 --- a/app/views/user/_settings_tabs.html.haml +++ b/app/views/user/_settings_tabs.html.haml @@ -4,5 +4,6 @@ %ul.nav.nav-pills.nav-stacked = nav_entry "Account", edit_user_registration_path = nav_entry "Profile", edit_user_profile_path + = nav_entry "Sharing", services_path .hidden-xs= render "shared/links" \ No newline at end of file