merges master and fixes conflicts
This commit is contained in:
@@ -1,6 +1,56 @@
|
||||
<ul id="admin_menu">
|
||||
<li><%= link_to t('admin.menu.debate_topics'), admin_tags_path %></li>
|
||||
<li><%= link_to t('admin.menu.hidden_debates'), admin_debates_path %></li>
|
||||
<li><%= link_to t('admin.menu.hidden_comments'), admin_comments_path %></li>
|
||||
<li><%= link_to t('admin.menu.organizations'), admin_organizations_path %></li>
|
||||
</ul>
|
||||
<nav class="admin-sidebar">
|
||||
<ul id="admin_menu">
|
||||
<li>
|
||||
<%= t("admin.dashboard.index.title") %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'tags' %>>
|
||||
<%= link_to admin_tags_path do %>
|
||||
<i class="icon-comment-quotes"></i>
|
||||
<%= t('admin.menu.debate_topics') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'debates' %>>
|
||||
<%= link_to admin_debates_path do %>
|
||||
<i class="icon-eye"></i>
|
||||
<%= t('admin.menu.hidden_debates') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'comments' %>>
|
||||
<%= link_to admin_comments_path do %>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<%= t('admin.menu.hidden_comments') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'organizations' %>>
|
||||
<%= link_to admin_organizations_path do %>
|
||||
<i class="icon-comment-quotes"></i>
|
||||
<%= t('admin.menu.organizations') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'officials' %>>
|
||||
<%= link_to admin_officials_path do %>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<%= t('admin.menu.officials') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'settings' %>>
|
||||
<%= link_to admin_settings_path do %>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<%= t('admin.menu.settings') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'stats' %>>
|
||||
<%= link_to stats_path do %>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<%= t('admin.menu.stats') %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
<div class="left">
|
||||
<h1><%= t("admin.comments.index.title") %></h1>
|
||||
<h2><%= t("admin.comments.index.title") %></h2>
|
||||
|
||||
<ul>
|
||||
<% @comments.each do |comment| %>
|
||||
<li id="<%= dom_id(comment) %>">
|
||||
<%= comment.body %>
|
||||
|
||||
<%= link_to t("admin.actions.restore"), restore_admin_comment_path(comment),
|
||||
method: :put, data: { confirm: t("admin.actions.confirm") } %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="admin-list">
|
||||
<% @comments.each do |comment| %>
|
||||
<li id="<%= dom_id(comment) %>">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-10 column">
|
||||
<%= comment.body %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= link_to t("admin.actions.restore"), restore_admin_comment_path(comment),
|
||||
method: :put, data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius tiny success right" %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
<h1><%= t("admin.dashboard.index.title") %></h1>
|
||||
<h2><%= t("admin.dashboard.index.title") %></h2>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
|
||||
|
||||
<p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<div class="left">
|
||||
<h1><%= t("admin.debates.index.title") %></h1>
|
||||
<h2><%= t("admin.debates.index.title") %></h2>
|
||||
|
||||
<ul>
|
||||
<% @debates.each do |debate| %>
|
||||
<%= link_to admin_debate_path(debate) do %>
|
||||
<li id="<%= dom_id(debate) %>">
|
||||
<%= link_to debate.title, admin_debate_path(debate) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="admin-list">
|
||||
<% @debates.each do |debate| %>
|
||||
<li id="<%= dom_id(debate) %>">
|
||||
<%= link_to debate.title, admin_debate_path(debate) %>
|
||||
|
||||
<%= link_to t("admin.actions.restore"), restore_admin_debate_path(debate),
|
||||
method: :put, data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius tiny success right" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<div class="left">
|
||||
<h1><%= t("admin.debates.index.title") %></h1>
|
||||
<h2><%= t("admin.debates.index.title") %></h2>
|
||||
|
||||
<div>
|
||||
<div><%= @debate.title %></div>
|
||||
<div><%= @debate.description %></div>
|
||||
<h3><%= @debate.title %></h3>
|
||||
|
||||
<div>
|
||||
<%= link_to t('admin.actions.restore'), restore_admin_debate_path(@debate),
|
||||
method: :put, data: { confirm: t('admin.actions.confirm') } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div><%= @debate.description %></div>
|
||||
|
||||
<%= link_to t("admin.debates.show.back"), admin_debates_path,
|
||||
class: "button radius small secondary" %>
|
||||
|
||||
<%= link_to t("admin.actions.restore"), restore_admin_debate_path(@debate),
|
||||
method: :put, data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius small success" %>
|
||||
|
||||
14
app/views/admin/officials/edit.html.erb
Normal file
14
app/views/admin/officials/edit.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<h1><%= t("admin.officials.edit.title") %></h1>
|
||||
|
||||
<%= @user.name %> (<%= @user.email %>)
|
||||
<%= form_for @user, url: admin_official_path(@user) do |f| %>
|
||||
<%= f.text_field :official_position %>
|
||||
<%= f.select :official_level, official_level_options %>
|
||||
<%= f.submit %>
|
||||
|
||||
<% if @user.official? %>
|
||||
<%= link_to t("admin.officials.edit.destroy"), admin_official_path(@user), method: :delete, class: 'button tiny alert' %>
|
||||
<% else %>
|
||||
<%= link_to t("admin.officials.edit.cancel"), admin_officials_path, class: 'button tiny alert' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
25
app/views/admin/officials/index.html.erb
Normal file
25
app/views/admin/officials/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<h1><%= t("admin.officials.index.title") %></h1>
|
||||
|
||||
<div>
|
||||
<%= form_for(User.new, url: search_admin_officials_path, as: :user, method: :get) do |f| %>
|
||||
<%= text_field_tag :email, "", label: false, placeholder: t("admin.officials.index.search_email_placeholder") %>
|
||||
<%= f.submit t("admin.officials.index.search") %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= page_entries_info @officials %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<% @officials.each do |official| %>
|
||||
<%= link_to official.name, edit_admin_official_path(official) %>
|
||||
<%= official.official_position %>
|
||||
<%= t("admin.officials.level_#{official.official_level}") %>
|
||||
<br/><br/>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= paginate @officials %>
|
||||
</div>
|
||||
21
app/views/admin/officials/search.html.erb
Normal file
21
app/views/admin/officials/search.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<h1><%= t("admin.officials.search.title") %></h1>
|
||||
|
||||
<div>
|
||||
<%= form_for(User.new, url: search_admin_officials_path, as: :user, method: :get) do |f| %>
|
||||
<%= text_field_tag :email, "", label: false, placeholder: t("admin.officials.index.search_email_placeholder") %>
|
||||
<%= f.submit t("admin.officials.search.search") %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= page_entries_info @users %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<% @users.each do |user| %>
|
||||
<%= link_to user.name, edit_admin_official_path(user) %>
|
||||
<%= user.official_position %>
|
||||
<%= t("admin.officials.level_#{user.official_level}") %>
|
||||
<%= link_to user.official? ? t("admin.officials.search.edit_official") : t("admin.officials.search.make_official"), edit_admin_official_path(user) %>
|
||||
<% end %>
|
||||
</div>
|
||||
15
app/views/admin/settings/index.html.erb
Normal file
15
app/views/admin/settings/index.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<h1><%= t("admin.settings.index.title") %></h1>
|
||||
|
||||
<ul>
|
||||
<% @settings.each do |setting| %>
|
||||
<li>
|
||||
<strong><%= setting.key.classify %></strong>
|
||||
|
||||
<%= form_for(setting, url: admin_setting_path(setting), html: { id: "edit_#{dom_id(setting)}"}) do |f| %>
|
||||
<%= f.text_field :value, label: false, id: dom_id(setting) %>
|
||||
<%= f.submit(class: "button radius tiny") %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
@@ -1,29 +1,46 @@
|
||||
<div class="left">
|
||||
<h1><%= t("admin.tags.index.add_tag") %></h1>
|
||||
<h2><%= t("admin.tags.index.add_tag") %></h2>
|
||||
|
||||
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
|
||||
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder") %>
|
||||
<%= f.check_box :featured, label: false %>
|
||||
<%= t("admin.tags.mark_as_featured") %>
|
||||
<%= f.submit(class: "button radius small") %>
|
||||
<% end %>
|
||||
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :name, t("admin.tags.name.placeholder") %>
|
||||
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
|
||||
</div>
|
||||
|
||||
<h1><%= t("admin.tags.index.title") %></h1>
|
||||
<div class="is-featured small-12 medium-6 column">
|
||||
<%= f.label :featured do %>
|
||||
<%= f.check_box :featured, label: false %>
|
||||
<span class="checkbox"><%= t("admin.tags.mark_as_featured") %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<% @tags.each do |tag| %>
|
||||
<li>
|
||||
<strong><%= tag.name %></strong>
|
||||
<%= f.submit(class: "button radius create") %>
|
||||
|
||||
<%= form_for(tag, url: admin_tag_path(tag), as: :tag, html: { id: "edit_tag_#{tag.id}"}) do |f| %>
|
||||
<%= f.check_box :featured, label: false, id: "tag_featured_#{tag.id}" %>
|
||||
<%= t("admin.tags.mark_as_featured") %>
|
||||
<%= f.submit(class: "button radius tiny") %>
|
||||
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: 'button tiny alert' %>
|
||||
<% end %>
|
||||
|
||||
<h3><%= t("admin.tags.index.title") %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<% @tags.each do |tag| %>
|
||||
<li>
|
||||
<span class="tag"><%= tag.name %></span>
|
||||
|
||||
<%= form_for(tag,
|
||||
url: admin_tag_path(tag),
|
||||
as: :tag,
|
||||
html: { id: "edit_tag_#{tag.id}", class: "text-right"}) do |f| %>
|
||||
|
||||
<%= f.label "featured_#{tag.id}" do %>
|
||||
<%= f.check_box :featured, label: false, id: "tag_featured_#{tag.id}", class: "left" %>
|
||||
<span class="checkbox left"><%= t("admin.tags.mark_as_featured") %></span>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<%= f.submit(class: "button radius tiny success") %>
|
||||
<br>
|
||||
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "delete" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user