adds basic spending proposals index
This commit is contained in:
7
app/controllers/spending_proposals_controller.rb
Normal file
7
app/controllers/spending_proposals_controller.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class SpendingProposalsController < ApplicationController
|
||||
before_action :authenticate_user!, except: [:index]
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
end
|
||||
@@ -36,6 +36,7 @@
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= link_to t("layouts.header.debates"), debates_path, class: ("active" if current_page?(controller: "/debates")) %>
|
||||
<%= link_to t("layouts.header.proposals"), proposals_path, class: ("active" if current_page?(controller: "/proposals")) %>
|
||||
<%= link_to t("layouts.header.spending_proposals"), spending_proposals_path, class: ("active" if current_page?(controller: "/spending_proposals")) %>
|
||||
<%= link_to t("layouts.header.more_information"), page_path('more_information'), class: ("active" if current_page?("/more_information")) %>
|
||||
<%= link_to t("layouts.header.external_link_blog_url"), target: "_blank" do %>
|
||||
<%= t("layouts.header.external_link_blog") %>
|
||||
|
||||
13
app/views/spending_proposals/index.html.erb
Normal file
13
app/views/spending_proposals/index.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<% provide :title do %><%= t('spending_proposals.index.title') %><% end %>
|
||||
<div class="page row-full">
|
||||
<div class="row">
|
||||
<div class="more-information text small-12 medium-8 column">
|
||||
<h1><%= t('spending_proposals.index.title') %></h1>
|
||||
|
||||
<p><%= t('spending_proposals.index.text') %></p>
|
||||
|
||||
<%= link_to t('spending_proposals.index.create_link'), new_spending_proposal_path, class: 'button radius' %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -29,6 +29,7 @@ en:
|
||||
more_information: "More information"
|
||||
debates: "Debates"
|
||||
proposals: "Proposals"
|
||||
spending_proposals: "Spending proposals"
|
||||
new_notifications:
|
||||
one: "You have a new notification"
|
||||
other: "You have %{count} new notifications"
|
||||
@@ -75,6 +76,7 @@ en:
|
||||
user: "Account"
|
||||
debate: "Debate"
|
||||
proposal: "Proposal"
|
||||
spending_proposal: "Spending proposal"
|
||||
verification::sms: "Telephone"
|
||||
verification::letter: "the verification"
|
||||
application:
|
||||
@@ -244,6 +246,11 @@ en:
|
||||
update:
|
||||
form:
|
||||
submit_button: "Save changes"
|
||||
spending_proposals:
|
||||
index:
|
||||
title: "Citizen budget"
|
||||
text: "Here you can send spending proposals to be considered in the frame of the annual citizen budgets."
|
||||
create_link: "Create spending proposal"
|
||||
comments:
|
||||
show:
|
||||
return_to_commentable: "Go back to "
|
||||
|
||||
@@ -29,6 +29,7 @@ es:
|
||||
more_information: "Más información"
|
||||
debates: "Debates"
|
||||
proposals: "Propuestas"
|
||||
spending_proposals: "Presupuestos ciudadanos"
|
||||
new_notifications:
|
||||
one: "Tienes una nueva notificación"
|
||||
other: "Tienes %{count} notificaciones nuevas"
|
||||
@@ -75,6 +76,7 @@ es:
|
||||
user: "la cuenta"
|
||||
debate: "el debate"
|
||||
proposal: "la propuesta"
|
||||
spending_proposal: "la propuesta de gasto"
|
||||
verification::sms: "el teléfono"
|
||||
verification::letter: "la verificación"
|
||||
application:
|
||||
@@ -244,6 +246,11 @@ es:
|
||||
update:
|
||||
form:
|
||||
submit_button: "Guardar cambios"
|
||||
spending_proposals:
|
||||
index:
|
||||
title: "Presupuestos ciudadanos"
|
||||
text: "Desde esta sección podrás sugerir propuestas de gasto que irán asociadas a las partidas de presupuestos ciudadanos. El requisito principal es que sean propuestas presupuestables."
|
||||
create_link: "Enviar propuesta de gasto"
|
||||
comments:
|
||||
show:
|
||||
return_to_commentable: "Volver a "
|
||||
|
||||
@@ -61,6 +61,8 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
resources :spending_proposals, only: [:index, :new, :create]
|
||||
|
||||
resources :legislations, only: [:show]
|
||||
|
||||
resources :annotations do
|
||||
|
||||
11
spec/features/spending_proposals_spec.rb
Normal file
11
spec/features/spending_proposals_spec.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
require 'rails_helper'
|
||||
|
||||
feature 'Spending proposals' do
|
||||
|
||||
scenario 'Index' do
|
||||
visit spending_proposals_path
|
||||
|
||||
expect(page).to have_link('Create spending proposal', href: new_spending_proposal_path)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user