Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Admin settings section #3328

Merged
merged 7 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
Remove unused settings
These settings are customised for Madrid's fork. On CONSUL any user can include new links using site customisation content blocks from admin panel.
  • Loading branch information
decabeza committed Feb 18, 2019
commit ccee843da7a158d0e67a6bad447de230510322cf
4 changes: 0 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ def home_page?
request.path == '/'
end

def opendata_page?
request.path == '/opendata'
end

# if current path is /debates current_path_with_query_params(foo: 'bar') returns /debates?foo=bar
# notice: if query_params have a param which also exist in current path, it "overrides" (query_params is merged last)
def current_path_with_query_params(query_parameters)
Expand Down
9 changes: 0 additions & 9 deletions app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@
<% end %>
</li>
<% end %>
<% if setting['blog_url'] %>
<li class="inline-block">
<%= link_to setting['blog_url'], target: "_blank",
title: t("shared.go_to_page") + t("social.blog", org: setting['org_name']) + t('shared.target_blank_html') do %>
<span class="show-for-sr"><%= t("social.blog", org: setting['org_name']) %></span>
<span class="icon-blog" aria-hidden="true"></span>
<% end %>
</li>
<% end %>
<% if setting['youtube_handle'] %>
<li class="inline-block">
<%= link_to "https://www.youtube.com/#{setting['youtube_handle']}", target: "_blank",
Expand Down
10 changes: 0 additions & 10 deletions app/views/shared/_top_links.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
<ul class="no-bullet external-links">
<% if setting['blog_url'] %>
<li>
<%= link_to t("layouts.header.external_link_blog"),
setting['blog_url'],
target: "_blank",
rel: "",
title: t("shared.go_to_page") + t("layouts.header.external_link_blog") + t('shared.target_blank_html') %>
</li>
<% end %>

<%= raw content_block("top_links", I18n.locale) %>
</ul>
2 changes: 0 additions & 2 deletions config/locales/en/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ en:
available_locales: Available languages
collaborative_legislation: Legislation processes
debates: Debates
external_link_blog: Blog
locale: 'Language:'
logo: CONSUL logo
management: Management
Expand Down Expand Up @@ -624,7 +623,6 @@ en:
see_more: See more recommendations
hide: Hide recommendations
social:
blog: "%{org} Blog"
facebook: "%{org} Facebook"
twitter: "%{org} Twitter"
youtube: "%{org} YouTube"
Expand Down
3 changes: 0 additions & 3 deletions config/locales/en/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ en:
min_age_to_participate: Minimum age needed to participate
min_age_to_participate_description: "Users over this age can participate in all processes"
analytics_url: "Analytics URL"
blog_url: "Blog URL"
transparency_url: "Transparency URL"
opendata_url: "Open Data URL"
verification_offices_url: Verification offices URL
proposal_improvement_path: Proposal improvement info internal link
feature:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/es/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ es:
available_locales: Idiomas disponibles
collaborative_legislation: Procesos legislativos
debates: Debates
external_link_blog: Blog
locale: 'Idioma:'
logo: Logo de CONSUL
management: Gestión
Expand Down Expand Up @@ -623,7 +622,6 @@ es:
see_more: Ver más recomendaciones
hide: Ocultar recomendaciones
social:
blog: "Blog de %{org}"
facebook: "Facebook de %{org}"
twitter: "Twitter de %{org}"
youtube: "YouTube de %{org}"
Expand Down
3 changes: 0 additions & 3 deletions config/locales/es/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ es:
min_age_to_participate: Edad mínima para participar
min_age_to_participate_description: "Los usuarios mayores de esta edad podrán participar en todos los procesos"
analytics_url: "URL de estadísticas externas"
blog_url: "URL del blog"
transparency_url: "URL de transparencia"
opendata_url: "URL de open data"
verification_offices_url: URL oficinas verificación
proposal_improvement_path: Link a información para mejorar propuestas
feature:
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@
get 'help/faq', to: 'pages#show', id: 'help/faq/index', as: 'faq'

# Static pages
get '/blog' => redirect("http:https://blog.consul/")
resources :pages, path: '/', only: [:show]
end
1 change: 0 additions & 1 deletion db/dev_seeds/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
Setting.create(key: 'youtube_handle', value: 'CONSUL')
Setting.create(key: 'telegram_handle', value: 'CONSUL')
Setting.create(key: 'instagram_handle', value: 'CONSUL')
Setting.create(key: 'blog_url', value: '/blog')
Setting.create(key: 'url', value: 'http:https://localhost:3000')
Setting.create(key: 'org_name', value: 'CONSUL')
Setting.create(key: 'place_name', value: 'City')
Expand Down
3 changes: 0 additions & 3 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
Setting["youtube_handle"] = nil
Setting["telegram_handle"] = nil
Setting["instagram_handle"] = nil
Setting["blog_url"] = nil
Setting["transparency_url"] = nil
Setting["opendata_url"] = "/opendata"

# Public-facing URL of the app.
Setting["url"] = "http:https://example.com"
Expand Down