Implements targets and campaigns for conference
This commit is contained in:
parent
678fe38a25
commit
857ac43e74
40 changed files with 1086 additions and 44 deletions
12
app/views/admin/campaigns/_form.html.haml
Normal file
12
app/views/admin/campaigns/_form.html.haml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
= 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' }
|
||||
2
app/views/admin/campaigns/edit.html.haml
Normal file
2
app/views/admin/campaigns/edit.html.haml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
= semantic_form_for(@campaign, url: admin_conference_campaign_path(@conference.short_title, @campaign)) do |f|
|
||||
= render partial: 'form', locals: {f: f}
|
||||
41
app/views/admin/campaigns/index.html.haml
Normal file
41
app/views/admin/campaigns/index.html.haml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
%h1
|
||||
Campaigns
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table
|
||||
%thead
|
||||
%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
|
||||
= link_to 'Edit',
|
||||
edit_admin_conference_campaign_path(@conference.short_title, campaign.id)
|
||||
%td
|
||||
= link_to 'Delete',
|
||||
admin_conference_campaign_path(@conference.short_title, campaign.id), method: :delete
|
||||
.row
|
||||
.col-md-12
|
||||
%b= link_to 'New Campaign', new_admin_conference_campaign_path, class: 'btn btn-success'
|
||||
2
app/views/admin/campaigns/new.html.haml
Normal file
2
app/views/admin/campaigns/new.html.haml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
= 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