Removes guide feature

This commit is contained in:
decabeza
2018-09-28 17:55:01 +02:00
parent 74925a7022
commit dbf41421ed
18 changed files with 9 additions and 298 deletions

View File

@@ -9,7 +9,6 @@
// 07. Proposals successful
// 08. Polls
// 09. Polls results and stats
// 10. Guides
//
// 01. Votes and supports
@@ -2095,94 +2094,3 @@
line-height: rem-calc(60);
}
}
// 10. Guides
// ----------------------
.guides {
h2 {
margin: $line-height 0 $line-height * 2;
}
.guide-budget,
.guide-proposal {
border-radius: rem-calc(3);
margin: $line-height 0;
padding: $line-height;
position: relative;
.button {
color: $text;
font-weight: bold;
}
&::before {
border-radius: 100%;
color: #fff;
font-family: "icons" !important;
height: rem-calc(80);
left: 50%;
line-height: rem-calc(80);
margin-left: rem-calc(-40);
position: absolute;
text-align: center;
top: -40px;
width: rem-calc(80);
z-index: 99;
}
}
.guide-budget {
border: 1px solid $budget;
&::before {
background: $budget;
content: '\53';
font-size: rem-calc(40);
}
.button {
background: #f8f5f9;
border: 1px solid $budget;
}
}
.guide-proposal {
border: 1px solid $proposals;
&::before {
background: $proposals;
content: '\68';
font-size: rem-calc(40);
}
.button {
background: #fffaf4;
border: 1px solid $proposals;
}
}
ul {
@include breakpoint(medium) {
min-height: $line-height * 14;
}
li {
margin-bottom: $line-height;
padding-left: $line-height;
position: relative;
&::before {
color: #37af65;
content: '\56';
font-family: "icons" !important;
font-size: $small-font-size;
left: 0;
position: absolute;
top: 1px;
}
}
}
}

View File

@@ -1,8 +0,0 @@
class GuidesController < ApplicationController
skip_authorization_check
def new
end
end

View File

@@ -1,19 +0,0 @@
module GuidesHelper
def new_proposal_guide
if feature?('guides') && Budget.current&.accepting?
new_guide_path
else
new_proposal_path
end
end
def new_budget_investment_guide
if feature?('guides')
new_guide_path
else
new_budget_investment_path(current_budget)
end
end
end

View File

@@ -1,11 +1,11 @@
<ul id="information-texts-tabs" class="tabs" >
<% [:debates, :community, :proposals, :polls, :layouts, :mailers, :management, :guides, :welcome].each do |tab| %>
<% [:debates, :community, :proposals, :polls, :layouts, :mailers, :management, :welcome].each do |tab| %>
<li class="tabs-title">
<% if tab.to_s == @tab %>
<% if tab.to_s == @tab %>
<%= link_to t("admin.menu.site_customization.information_texts_menu.#{tab}"), admin_site_customization_information_texts_path(tab: tab), :class => 'is-active' %>
<% else %>
<%= link_to t("admin.menu.site_customization.information_texts_menu.#{tab}"), admin_site_customization_information_texts_path(tab: tab) %>
<% end %>
<% end %>
</li>
<% end %>
</ul>

View File

@@ -33,7 +33,7 @@
<% if current_user %>
<% if current_user.level_two_or_three_verified? %>
<%= link_to t("budgets.investments.index.sidebar.create"),
new_budget_investment_guide,
new_budget_investment_path(@budget),
class: "button margin-top expanded" %>
<% else %>
<div class="callout warning margin-top">

View File

@@ -1,58 +0,0 @@
<div class="guides">
<div class="row margin">
<div class="small-12 column text-center">
<h1><%= t("guides.title", org: setting['org_name']) %></h1>
<p class="lead"><%= t("guides.subtitle") %></p>
</div>
</div>
<div class="row" data-equalizer data-equalize-on="medium">
<div class="small-12 medium-5 medium-offset-1 column">
<div class="guide-budget" data-equalizer-watch>
<h2 class="text-center">
<%= t("guides.budget_investment.title") %>
</h2>
<ul class="no-bullet">
<li><%= t("guides.budget_investment.feature_1_html") %></li>
<li><%= t("guides.budget_investment.feature_2_html") %></li>
<li><%= t("guides.budget_investment.feature_3_html") %></li>
<li><%= t("guides.budget_investment.feature_4_html") %></li>
</ul>
<% if current_budget %>
<div class="small-12 medium-9 small-centered">
<%= link_to t("guides.budget_investment.new_button"),
new_budget_investment_path(current_budget),
class: "button expanded" %>
</div>
<% end %>
</div>
</div>
<div class="small-12 medium-5 column end">
<div class="guide-proposal" data-equalizer-watch>
<h2 class="text-center">
<%= t("guides.proposal.title") %>
</h2>
<ul class="no-bullet">
<li><%= t("guides.proposal.feature_1_html") %></li>
<li>
<%= t("guides.proposal.feature_2_html",
votes: setting["votes_for_proposal_success"],
org: setting['org_name']) %>
</li>
<li><%= t("guides.proposal.feature_3_html") %></li>
<li><%= t("guides.proposal.feature_4_html") %></li>
</ul>
<div class="small-12 medium-9 small-centered">
<%= link_to t("guides.proposal.new_button"),
new_proposal_path,
class: "button expanded" %>
</div>
</div>
</div>
</div>
</div>

View File

@@ -76,7 +76,7 @@
<% if @proposals.any? %>
<div class="show-for-small-only">
<%= link_to t("proposals.index.start_proposal"),
new_proposal_guide,
new_proposal_path,
class: 'button expanded' %>
</div>
<% end %>
@@ -109,7 +109,7 @@
<div class="small-12 medium-3 column">
<aside class="margin-bottom">
<%= link_to t("proposals.index.start_proposal"),
new_proposal_guide,
new_proposal_path,
class: 'button expanded' %>
<% if params[:retired].blank? %>
<%= render 'categories' %>