forked from consuldemocracy/consuldemocracy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/consul/consul
- Loading branch information
Showing
34 changed files
with
567 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module SpendingProposalsHelper | ||
|
||
def spending_proposal_tags_select_options | ||
ActsAsTaggableOn::Tag.spending_proposal_tags.pluck(:name) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class Administrator < ActiveRecord::Base | ||
belongs_to :user, touch: true | ||
delegate :name, :email, to: :user | ||
delegate :name, :email, :name_and_email, to: :user | ||
|
||
validates :user_id, presence: true, uniqueness: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
app/views/admin/spending_proposals/_written_by_author.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<div class="callout primary float-right"> | ||
<%= t "admin.spending_proposals.show.heading", id: @spending_proposal.id %> | ||
</div> | ||
|
||
<br> | ||
<h1 class="inline-block"><%= @spending_proposal.title %></h1> | ||
|
||
<div class="row small-collapse info"> | ||
<div class="small-12 medium-4 column"> | ||
<p> | ||
<strong><%= t("admin.spending_proposals.show.geozone") %>:</strong> | ||
<%= geozone_name(@spending_proposal) %> | ||
</p> | ||
</div> | ||
|
||
<div class="small-12 medium-4 column"> | ||
<p> | ||
<strong><%= t("admin.spending_proposals.show.by") %>:</strong> | ||
<%= link_to @spending_proposal.author.name, admin_user_path(@spending_proposal.author) %> | ||
</p> | ||
</div> | ||
|
||
<div class="small-12 medium-4 column"> | ||
<p> | ||
<strong><%= t("admin.spending_proposals.show.sent") %>:</strong> | ||
<%= l @spending_proposal.created_at, format: :datetime %> | ||
</p> | ||
</div> | ||
|
||
</div> | ||
|
||
<% if @spending_proposal.association_name.present? %> | ||
<p><strong><%= t("admin.spending_proposals.show.association_name") %>:</strong> | ||
<%= @spending_proposal.association_name %> | ||
</p> | ||
<% end %> | ||
<% if @spending_proposal.external_url.present? %> | ||
<p><%= text_with_links @spending_proposal.external_url %> <i class="icon-external small"></i></p> | ||
<% end %> | ||
<%= safe_html_with_links @spending_proposal.description %> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<%= link_to admin_spending_proposals_path(@spending_proposal), class: 'back' do %> | ||
<i class="icon-angle-left"></i> <%= t("admin.spending_proposals.show.back") %> | ||
<% end %> | ||
<%= render 'written_by_author' %> | ||
|
||
<h2 id="form"><%= t("admin.spending_proposals.edit.classification") %></h2> | ||
|
||
<%= form_for @spending_proposal, url: admin_spending_proposal_path(@spending_proposal) do |f| %> | ||
<%= f.select(:administrator_id, | ||
@admins.collect{ |a| [a.name_and_email, a.id ] }, | ||
{ include_blank: t("admin.spending_proposals.edit.undefined") }, | ||
class: "small-12 medium-6") %> | ||
<%= f.label :valuator_ids, t("admin.spending_proposals.edit.assigned_valuators") %> | ||
<%= f.collection_check_boxes :valuator_ids, @valuators, :id, :name_and_email do |b| %> | ||
<%= b.label { b.check_box + b.text } %> | ||
<% end %> | ||
<%= f.label :tag_list, t("admin.spending_proposals.edit.tags") %> | ||
<div class="tags"> | ||
<% @tags.each do |tag| %> | ||
<a class="js-add-tag-link"><%= tag.name %></a> | ||
<% end %> | ||
</div> | ||
|
||
<%= f.text_field :tag_list, value: @spending_proposal.tag_list.to_s, | ||
label: false, | ||
placeholder: t("admin.spending_proposals.edit.tags_placeholder"), | ||
class: 'js-tag-list' %> | ||
|
||
<p> | ||
<%= f.submit(class: "button", value: t("admin.spending_proposals.edit.submit_button")) %> | ||
</p> | ||
|
||
<% end %> | ||
|
||
<hr> | ||
<%= render 'valuation/spending_proposals/written_by_valuators' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.