Implement consistent admin interface
* Consistent route/model/controller/view layout * Get rid of unused photos, speakers, dietchoices, social_events controllers * Drop unused :public from Rooms and :description from CallForPapers
This commit is contained in:
parent
f6a87331be
commit
28063129c7
133 changed files with 1461 additions and 1461 deletions
|
|
@ -1,12 +1,24 @@
|
|||
= f.inputs do
|
||||
= f.input :name
|
||||
= f.inputs name: 'UTM Parameters' do
|
||||
= f.input :utm_campaign, label: 'Campaign', hint: 'Groups all of the content form one campaign. E.g. 20percentpromocode'
|
||||
= f.input :utm_source, label: 'Source', hint: 'Which website is sending you traffic. E.g. Facebook, google+, blog'
|
||||
= f.input :utm_medium, label: 'Medium', hint: 'The type of marketing medium that the link is featured in. E.g. Facebook wallpost or facebook advertisement'
|
||||
= f.input :utm_term, label: 'Term', hint: 'Campaign keywords. E.g. marketing+conference+opensource'
|
||||
= f.input :utm_content, label: 'Content', hint: 'Used to track the different types of content that point to the same URL (A/B Test).'
|
||||
= f.inputs name: 'Targets' do
|
||||
= f.input :targets
|
||||
= f.actions do
|
||||
= f.action :submit, button_html: { class: 'btn btn-primary' }
|
||||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
-if @campaign.new_record?
|
||||
New
|
||||
Campaign
|
||||
= @campaign.name
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for(@campaign, :url => (@campaign.new_record? ? admin_conference_campaigns_path : admin_conference_campaign_path(@conference.short_title, @campaign))) do |f|
|
||||
= f.inputs do
|
||||
= f.input :name
|
||||
= f.inputs name: 'UTM Parameters' do
|
||||
= f.input :utm_campaign, label: 'Campaign', hint: 'Groups all of the content from one campaign. E.g. 20percentpromocode'
|
||||
= f.input :utm_source, label: 'Source', hint: 'Which website is sending you traffic. E.g. Facebook, google+, blog'
|
||||
= f.input :utm_medium, label: 'Medium', hint: 'The type of marketing medium that the link is featured in. E.g. Facebook wallpost or facebook advertisement'
|
||||
= f.input :utm_term, label: 'Term', hint: 'Campaign keywords. E.g. marketing+conference+opensource'
|
||||
= f.input :utm_content, label: 'Content', hint: 'Used to track the different types of content that point to the same URL (A/B Test).'
|
||||
= f.inputs name: 'Targets' do
|
||||
= f.input :targets
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
= semantic_form_for(@campaign, url: admin_conference_campaign_path(@conference.short_title, @campaign)) do |f|
|
||||
= render partial: 'form', locals: {f: f}
|
||||
|
|
@ -1,41 +1,42 @@
|
|||
%h1
|
||||
Campaigns
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table
|
||||
%thead
|
||||
.page-header
|
||||
%h1 Campaigns
|
||||
%p.text-muted
|
||||
Track where people come from
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-hover#campaigns
|
||||
%thead
|
||||
%tr
|
||||
%th Name
|
||||
%th Visits
|
||||
%th Registrations
|
||||
%th Submissions
|
||||
%th Link
|
||||
%th Actions
|
||||
%tbody
|
||||
- @campaigns.each do |campaign|
|
||||
%tr
|
||||
%th #
|
||||
%th Name
|
||||
%th Visits
|
||||
%th Registrations
|
||||
%th Submissions
|
||||
%th Link
|
||||
%th Edit
|
||||
%th Delete
|
||||
%tbody
|
||||
- @campaigns.each_with_index do |campaign, index|
|
||||
%tr
|
||||
%td
|
||||
= index + 1
|
||||
%td{'id'=> "name_#{index}"}
|
||||
= campaign.name
|
||||
%td{'id'=> "visits_#{index}"}
|
||||
= campaign.visits_count
|
||||
%td{'id'=> "registrations_#{index}"}
|
||||
= campaign.registrations_count
|
||||
%td{'id'=> "submissions_#{ + index}"}
|
||||
= campaign.submissions_count
|
||||
%td
|
||||
%a.copyLink{'href'=> '#', 'data-url'=>root_path + campaign.url_parameters}
|
||||
Copy link
|
||||
%td
|
||||
%td{'id'=> "name_#{campaign.id}"}
|
||||
= campaign.name
|
||||
%td{'id'=> "visits_#{campaign.id}"}
|
||||
= campaign.visits_count
|
||||
%td{'id'=> "registrations_#{campaign.id}"}
|
||||
= campaign.registrations_count
|
||||
%td{'id'=> "submissions_#{campaign.id}"}
|
||||
= campaign.submissions_count
|
||||
%td
|
||||
%a.copyLink{'href'=> '#', 'data-url'=>root_path + campaign.url_parameters}
|
||||
Copy link
|
||||
%td
|
||||
.btn-group
|
||||
= link_to 'Edit',
|
||||
edit_admin_conference_campaign_path(@conference.short_title, campaign.id)
|
||||
%td
|
||||
edit_admin_conference_campaign_path(@conference.short_title, campaign.id),
|
||||
class: 'btn btn-primary'
|
||||
= link_to 'Delete',
|
||||
admin_conference_campaign_path(@conference.short_title, campaign.id), method: :delete
|
||||
admin_conference_campaign_path(@conference.short_title, campaign.id),
|
||||
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the campaign #{campaign.name}?" }
|
||||
.row
|
||||
.col-md-12
|
||||
%b= link_to 'New Campaign', new_admin_conference_campaign_path, class: 'btn btn-success'
|
||||
= link_to 'New Campaign', new_admin_conference_campaign_path, class: 'btn btn-success pull-right'
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
= semantic_form_for(@campaign, url: admin_conference_campaigns_path(@conference.short_title)) do |f|
|
||||
= render partial: 'form', locals: {f: f}
|
||||
Loading…
Add table
Add a link
Reference in a new issue