implement copying of Stations for Seminary copy feature

This commit is contained in:
oliver 2016-01-30 20:15:13 +01:00
commit 40a233fa7d
4342 changed files with 1215466 additions and 0 deletions

View file

@ -0,0 +1,81 @@
{% if onlyShowAddNewGoal is defined %}
<h2 piwik-enriched-headline>{{ 'Goals_AddNewGoal'|translate }}</h2>
<p>{{ 'Goals_NewGoalIntro'|translate }}</p>
<p>{{ 'Goals_NewGoalDescription'|translate }}
{{ 'Goals_NewWhatDoYouWantUsersToDo'|translate }}
{{ 'Goals_NewGoalYouWillBeAbleTo'|translate }}</p>
<p>{{ 'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/docs/tracking-goals-web-analytics/' target='_blank'>","</a>")|raw }}
</p>
{% else %}
<div class="clear"></div>
<h2 piwik-enriched-headline>{{ 'Goals_GoalsManagement'|translate }}</h2>
<div class="entityList">
<ul class='listCircle'>
<li><a onclick='' name='linkAddNewGoal'>{{ 'Goals_CreateNewGOal'|translate }}</a></li>
<li><a onclick='' name='linkEditGoals'>{{ 'Goals_ViewAndEditGoals'|translate }}</a></li>
<li>{{ 'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/docs/tracking-goals-web-analytics/' target='_blank'>","</a>")|raw }}</li>
<li>
{% if not ecommerceEnabled %}
{% set websiteManageText %}
<a href='{{ linkTo({'module':'SitesManager','action':'index' }) }}'>{{ 'SitesManager_WebsitesManagement'|translate }}</a>
{% endset %}
{% set ecommerceReportText %}
<a href="http://piwik.org/docs/ecommerce-analytics/" target="_blank">{{ 'Goals_EcommerceReports'|translate }}</a>
{% endset %}
{{ 'Goals_Optional'|translate }} {{ 'Goals_Ecommerce'|translate }}: {{ 'Goals_YouCanEnableEcommerceReports'|translate(ecommerceReportText,websiteManageText)|raw }}
{% else %}
{{ 'SitesManager_PiwikOffersEcommerceAnalytics'|translate('<a href="http://piwik.org/docs/ecommerce-analytics/" target="_blank">',"</a>")|raw }}
{% endif %}
</li>
</ul>
</div>
<br/>
{% endif %}
{% import 'ajaxMacros.twig' as ajax %}
{{ ajax.errorDiv() }}
{{ ajax.loadingDiv('goalAjaxLoading') }}
<div class="entityContainer">
{% if onlyShowAddNewGoal is not defined %}
{% include "@Goals/_listGoalEdit.twig" %}
{% endif %}
{% include "@Goals/_formAddGoal.twig" %}
{% if onlyShowAddNewGoal is not defined %}
<div class='entityCancel' style='display:none;'>
{{ 'General_OrCancel'|translate("<a class='entityCancelLink'>","</a>")|raw }}
</div>
{% endif %}
<a id='bottom'></a>
</div>
<br/><br/>
<script type="text/javascript">
var mappingMatchTypeName = {
"url": "{{ 'Goals_URL'|translate }}",
"title": "{{ 'Goals_PageTitle'|translate }}",
"file": "{{ 'Goals_Filename'|translate }}",
"external_website": "{{ 'Goals_ExternalWebsiteUrl'|translate }}"
};
var mappingMatchTypeExamples = {
"url": "{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'checkout/confirmation'") }} \
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_IsExactly'|translate("'http://example.com/thank-you.html'") }} \
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_MatchesExpression'|translate("'(.*)\\\/demo\\\/(.*)'") }}",
"title": "{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'Order confirmation'") }}",
"file": "{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'files/brochure.pdf'") }} \
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_IsExactly'|translate("'http://example.com/files/brochure.pdf'") }} \
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_MatchesExpression'|translate("'(.*)\\\.zip'") }}",
"external_website": "{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'amazon.com'") }} \
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_IsExactly'|translate("'http://mypartner.com/landing.html'") }} \
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_MatchesExpression'|translate("'http://www.amazon.com\\\/(.*)\\\/yourAffiliateId'") }}"
};
bindGoalForm();
{% if onlyShowAddNewGoal is not defined %}
piwik.goals = {{ goalsJSON|raw }};
bindListGoalEdit();
{% else %}
initAndShowAddGoalForm();
{% endif %}
</script>

View file

@ -0,0 +1,97 @@
<div class='entityAddContainer' style="display:none;">
<form>
<table class="dataTable entityTable">
<thead>
<tr class="first">
<th colspan="2">{{ 'Goals_AddNewGoal'|translate }}</th>
<tr>
</thead>
<tbody>
<tr>
<td class="first">{{ 'Goals_GoalName'|translate }} </td>
<td><input type="text" name="name" value="" size="28" id="goal_name" class="inp"/></td>
</tr>
<tr>
<td style='width:260px;' class="first">{{ 'Goals_GoalIsTriggered'|translate }}
<select name="trigger_type" class="inp">
<option value="visitors">{{ 'Goals_WhenVisitors'|translate }}</option>
<option value="manually">{{ 'Goals_Manually'|translate }}</option>
</select>
</td>
<td>
<input type="radio" id="match_attribute_url" value="url" name="match_attribute"/>
<label for="match_attribute_url">{{ 'Goals_VisitUrl'|translate }}</label>
<br/>
<input type="radio" id="match_attribute_title" value="title" name="match_attribute"/>
<label for="match_attribute_title">{{ 'Goals_VisitPageTitle'|translate }}</label>
<br/>
<input type="radio" id="match_attribute_file" value="file" name="match_attribute"/>
<label for="match_attribute_file">{{ 'Goals_Download'|translate }}</label>
<br/>
<input type="radio" id="match_attribute_external_website" value="external_website" name="match_attribute"/>
<label for="match_attribute_external_website">{{ 'Goals_ClickOutlink'|translate }}</label>
</td>
</tr>
</tbody>
<tbody id="match_attribute_section">
<tr>
<td class="first">{{ 'Goals_WhereThe'|translate }} <span id="match_attribute_name"></span></td>
<td>
<select name="pattern_type" class="inp">
<option value="contains">{{ 'Goals_Contains'|translate("") }}</option>
<option value="exact">{{ 'Goals_IsExactly'|translate("") }}</option>
<option value="regex">{{ 'Goals_MatchesExpression'|translate("") }}</option>
</select>
<input type="text" name="pattern" value="" size="16" class="inp"/>
<br/>
<div id="examples_pattern" class="entityInlineHelp"></div>
<br/>
<span style="float:right;">
{{ 'Goals_Optional'|translate }} <input type="checkbox" id="case_sensitive"/>
<label for="case_sensitive">{{ 'Goals_CaseSensitive'|translate }}</label>
</span>
</td>
</tr>
</tbody>
<tbody id="manual_trigger_section" style="display:none;">
<tr>
<td colspan="2" class="first">
{{ 'Goals_WhereVisitedPageManuallyCallsJavascriptTrackerLearnMore'|translate("<a target='_blank' href='?module=Proxy&action=redirect&url=http://piwik.org/docs/javascript-tracking/%23toc-manually-trigger-a-conversion-for-a-goal'>","</a>")|raw }}
</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="first"> {{ 'Goals_AllowMultipleConversionsPerVisit'|translate }} </td>
<td>
<input type="radio" id="allow_multiple_0" value="0" name="allow_multiple"/>
<label for="allow_multiple_0">{{ 'Goals_DefaultGoalConvertedOncePerVisit'|translate }}</label>
<div class="entityInlineHelp">
{{ 'Goals_HelpOneConversionPerVisit'|translate }}
</div>
<br/>
<input type="radio" id="allow_multiple_1" value="1" name="allow_multiple"/>
<label for="allow_multiple_1">{{ 'Goals_AllowGoalConvertedMoreThanOncePerVisit'|translate }}</label>
<br/><br/>
</tr>
<tr>
</tbody>
<tbody>
<tr>
<td class="first">{{ 'Goals_Optional'|translate }} {{ 'Goals_DefaultRevenue'|translate }}</td>
<td>{{ ' <input type="text" name="revenue" size="2" value="0" class="inp" /> '|money(idSite)|raw }}
<div class="entityInlineHelp"> {{ 'Goals_DefaultRevenueHelp'|translate }} </div>
</td>
</tr>
<tr>
</tbody>
</table>
<input type="hidden" name="methodGoalAPI" value=""/>
<input type="hidden" name="goalIdUpdate" value=""/>
<input type="submit" value="" name="submit" id="goal_submit" class="submit"/>
</form>
</div>

View file

@ -0,0 +1,64 @@
<div id='entityEditContainer' style="display:none;">
<table class="dataTable entityTable">
<thead>
<tr>
<th class="first">Id</th>
<th>{{ 'Goals_GoalName'|translate }}</th>
<th>{{ 'Goals_GoalIsTriggeredWhen'|translate }}</th>
<th>{{ 'General_ColumnRevenue'|translate }}</th>
<th>{{ 'General_Edit'|translate }}</th>
<th>{{ 'General_Delete'|translate }}</th>
</tr>
</thead>
{% for goal in goals %}
<tr>
<td class="first">{{ goal.idgoal }}</td>
<td>{{ goal.name|raw }}</td>{# NOTE: goal names are escaped in the DB #}
<td><span class='matchAttribute'>{{ goal.match_attribute }}</span>
{% if goal.pattern_type is defined %}
<br/>
{{ 'Goals_Pattern'|translate }} {{ goal.pattern_type }}: {{ goal.pattern|raw }}
{% endif %}
</td>
<td>{% if goal.revenue==0 %}-{% else %}{{ goal.revenue|money(idSite)|raw }}{% endif %}</td>
<td>
<a href='#' name="linkEditGoal" id="{{ goal.idgoal }}" class="link_but">
<img src='plugins/Zeitgeist/images/ico_edit.png' border="0"/>
{{ 'General_Edit'|translate }}
</a>
</td>
<td>
<a href='#' name="linkDeleteGoal" id="{{ goal.idgoal }}" class="link_but">
<img src='plugins/Zeitgeist/images/ico_delete.png' border="0"/>
{{ 'General_Delete'|translate }}
</a>
</td>
</tr>
{% endfor %}
</table>
</div>
<div class="ui-confirm" id="confirm">
<h2></h2>
<input role="yes" type="button" value="{{ 'General_Yes'|translate }}"/>
<input role="no" type="button" value="{{ 'General_No'|translate }}"/>
</div>
<script type="text/javascript">
var goalTypeToTranslation = {
"manually": "{{ 'Goals_ManuallyTriggeredUsingJavascriptFunction'|translate }}",
"file": "{{ 'Goals_Download'|translate }}",
"url": "{{ 'Goals_VisitUrl'|translate }}",
"title": "{{ 'Goals_VisitPageTitle'|translate }}",
"external_website": "{{ 'Goals_ClickOutlink'|translate }}"
};
$(document).ready(function () {
// translation of the goal "match attribute" to human readable description
$('.matchAttribute').each(function () {
var matchAttribute = $(this).text();
var translation = goalTypeToTranslation[matchAttribute];
$(this).text(translation);
});
});
</script>

View file

@ -0,0 +1,16 @@
{% for element in topDimension %}
{% set goal_nb_conversion=element.nb_conversions %}
{% set goal_conversion_rate=element.conversion_rate %}
<span class='goalTopElement' title='{{ 'Goals_Conversions'|translate("<b>"~goal_nb_conversion~"</b>")|raw }},
{{ 'Goals_ConversionRate'|translate("<b>"~goal_conversion_rate~"</b>")|raw }}'>
{{ element.name }}
</span>
{% import 'macros.twig' as piwik %}
{{ piwik.logoHtml(element.metadata, element.name) }}
{% if loop.index == loop.length-1 %}
and
{% elseif loop.index < loop.length-1 %}
,
{% endif %}
{% endfor %}

View file

@ -0,0 +1,81 @@
<span data-graph-id="{{ nameGraphEvolution }}"></span>
{% if displayFullReport %}
<h2 piwik-enriched-headline>{% if goalName is defined %}{{ 'Goals_GoalX'|translate(goalName)|raw }}{% else %}{{ 'Goals_GoalsOverview'|translate }}{% endif %}</h2>
{% endif %}
{{ graphEvolution|raw }}
<div id='leftcolumn' {% if not isWidget %}style='width:33%;'{% endif %}>
<div class="sparkline">{{ sparkline(urlSparklineConversions) }}
{% if ecommerce is defined %}
<strong>{{ nb_conversions }}</strong>
{{ 'General_EcommerceOrders'|translate }}
<img src='plugins/Zeitgeist/images/ecommerceOrder.gif'>
{% else %}
{{ 'Goals_Conversions'|translate("<strong>"~nb_conversions~"</strong>")|raw }}
{% endif %}
{% if goalAllowMultipleConversionsPerVisit is defined and goalAllowMultipleConversionsPerVisit %}
({{ 'General_NVisits'|translate("<strong>"~nb_visits_converted~"</strong>")|raw }})
{% endif %}
</div>
{% if revenue != 0 or ecommerce is defined %}
<div class="sparkline">
{{ sparkline(urlSparklineRevenue) }}
{% set revenue=revenue|money(idSite) %}
{% if ecommerce is defined %}
<strong>{{ revenue|raw }}</strong> {{ 'General_TotalRevenue'|translate }}
{% else %}
{{ 'Goals_OverallRevenue'|translate("<strong>"~revenue~"</strong>")|raw }}
{% endif %}
</div>
{% endif %}
{% if ecommerce is defined %}
<div class="sparkline">{{ sparkline(urlSparklineAverageOrderValue) }}
<strong>{{ avg_order_revenue|money(idSite)|raw }}</strong>
{{ 'General_AverageOrderValue'|translate }}
</div>
{% endif %}
</div>
<div id='leftcolumn' {% if not isWidget %}style='width:33%;'{% endif %}>
<div class="sparkline">{{ sparkline(urlSparklineConversionRate) }}
{% if ecommerce is defined %}
{% set ecommerceOrdersText %}{{ 'General_EcommerceOrders'|translate }}{% endset %}
{{ 'Goals_ConversionRate'|translate("<strong>"~conversion_rate~"</strong> "~ecommerceOrdersText)|raw }}
{% else %}
{{ 'Goals_OverallConversionRate'|translate("<strong>"~conversion_rate~"</strong>")|raw }}
{% endif %}
</div>
{% if ecommerce is defined %}
<div class="sparkline">{{ sparkline(urlSparklinePurchasedProducts) }}
<strong>{{ items }}</strong> {{ 'General_PurchasedProducts'|translate }}</div>
{% endif %}
</div>
{% if ecommerce is defined %}
<div id='rightcolumn' {% if not isWidget %}style='width:30%;'{% endif %}>
<div>
<img src='plugins/Zeitgeist/images/ecommerceAbandonedCart.gif'> <em>{{ 'General_AbandonedCarts'|translate }}</em>
</div>
<div class="sparkline">
{{ sparkline(cart_urlSparklineConversions) }}
{% set ecommerceAbandonedCartsText %}{{ 'Goals_AbandonedCart'|translate }}{% endset %}
<strong>{{ cart_nb_conversions }}</strong> {{ 'General_VisitsWith'|translate(ecommerceAbandonedCartsText) }}
</div>
<div class="sparkline">
{{ sparkline(cart_urlSparklineRevenue) }}
{% set revenue %}{{ cart_revenue|money(idSite)|raw }}{% endset %}
{% set revenueText %}{{ 'General_ColumnRevenue'|translate }}{% endset %}
<strong>{{ revenue }}</strong> {{ 'Goals_LeftInCart'|translate(revenueText) }}
</div>
<div class="sparkline">
{{ sparkline(cart_urlSparklineConversionRate) }}
<strong>{{ cart_conversion_rate }}</strong>
{{ 'General_VisitsWith'|translate(ecommerceAbandonedCartsText) }}
</div>
</div>
{% endif %}
{% include "_sparklineFooter.twig" %}

View file

@ -0,0 +1,11 @@
{% if userCanEditGoals %}
{% include "@Goals/_addEditGoal.twig" %}
{% else %}
<h2>{{ 'Goals_CreateNewGOal'|translate }}</h2>
<p>
{{ 'Goals_NoGoalsNeedAccess'|translate|raw }}
</p>
<p>
{{ 'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/docs/tracking-goals-web-analytics/' target='_blank'>","</a>")|raw }}
</p>
{% endif %}

View file

@ -0,0 +1,66 @@
<link rel="stylesheet" type="text/css" href="plugins/Goals/stylesheets/goals.css"/>
{% include "@Goals/_titleAndEvolutionGraph.twig" | raw %}
<div class="clear"></div>
{% if nb_conversions > 0 %}
<h2>{{ 'Goals_ConversionsOverview'|translate }}</h2>
<ul class="ulGoalTopElements">
{% if ecommerce is not defined %}
{% if topDimensions.country is defined %}
<li>{{ 'Goals_BestCountries'|translate }} {% include '@Goals/_listTopDimension.twig' with {'topDimension':topDimensions.country} %}</li>
{% endif %}
{% if topDimensions.keyword is defined and topDimensions.keyword|length > 0 %}
<li>{{ 'Goals_BestKeywords'|translate }} {% include '@Goals/_listTopDimension.twig' with {'topDimension':topDimensions.keyword} %}</li>
{% endif %}
{% if topDimensions.website is defined and topDimensions.website|length > 0 %}
<li>{{ 'Goals_BestReferrers'|translate }} {% include '@Goals/_listTopDimension.twig' with {'topDimension':topDimensions.website} %}</li>
{% endif %}
<li>
{{ 'Goals_ReturningVisitorsConversionRateIs'|translate("<strong>"~conversion_rate_returning~"</strong>")|raw }}
, {{ 'Goals_NewVisitorsConversionRateIs'|translate("<strong>"~conversion_rate_new~"</strong>")|raw }}
</li>
{% else %}
<li>
{{ 'General_ColumnRevenue'|translate }}: {{ revenue|money(idSite)|raw -}}
{% if revenue_subtotal is not empty %},
{{ 'General_Subtotal'|translate }}: {{ revenue_subtotal|money(idSite)|raw -}}
{% endif %}
{%- if revenue_tax is not empty -%},
{{ 'General_Tax'|translate }}: {{ revenue_tax|money(idSite)|raw -}}
{% endif %}
{%- if revenue_shipping is not empty -%},
{{ 'General_Shipping'|translate }}: {{ revenue_shipping|money(idSite)|raw -}}
{% endif %}
{%- if revenue_discount is not empty -%},
{{ 'General_Discount'|translate }}: {{ revenue_discount|money(idSite)|raw -}}
{% endif %}
</li>
{% endif %}
</ul>
{% endif %}
<script type="text/javascript">
$(document).ready(function () {
$('.goalTopElement').tooltip({
track: true,
content: function () {
return $(this).attr("title");
},
show: false,
hide: false
});
});
</script>
{% if displayFullReport %}
{% if nb_conversions > 0 or cart_nb_conversions is defined %}
<h2 id='titleGoalsByDimension'>
{% if idGoal is defined %}
{{ 'Goals_GoalConversionsBy'|translate(goalName)|raw }}
{% else %}
{{ 'Goals_ConversionsOverviewBy'|translate }}
{% endif %}
</h2>
{{ goalReportsByDimension|raw }}
{% endif %}
{% endif %}

View file

@ -0,0 +1,50 @@
<link rel="stylesheet" type="text/css" href="plugins/Goals/stylesheets/goals.css"/>
{% include "@Goals/_titleAndEvolutionGraph.twig" %}
{% set sum_nb_conversions=nb_conversions %}
{% for goal in goalMetrics %}
{% set nb_conversions=goal.nb_conversions %}
{% set nb_visits_converted=goal.nb_visits_converted %}
{% set conversion_rate=goal.conversion_rate %}
{% set name=goal.name %}
<div class="goalEntry">
<h2>
<a href="javascript:broadcast.propagateAjax('module=Goals&action=goalReport&idGoal={{ goal.id }}')">
{{ 'Goals_GoalX'|translate("'"~name~"'")|raw }}
</a>
</h2>
<div id='leftcolumn'>
<div class="sparkline">{{ sparkline(goal.urlSparklineConversions) }}
{{ 'Goals_Conversions'|translate("<strong>"~nb_conversions~"</strong>")|raw }}
{% if goal.goalAllowMultipleConversionsPerVisit %}
({{ 'General_NVisits'|translate("<strong>"~nb_visits_converted~"</strong>") | raw }})
{% endif %}
</div>
</div>
<div id='rightcolumn'>
<div class="sparkline">{{ sparkline(goal.urlSparklineConversionRate) }}
{{ 'Goals_ConversionRate'|translate("<strong>"~conversion_rate~"</strong>")|raw }}
</div>
</div>
<br class="clear"/>
</div>
{% endfor %}
{% if displayFullReport %}
{% if sum_nb_conversions != 0 %}
<h2 id='titleGoalsByDimension'>
{% if idGoal is defined %}
{{ 'Goals_GoalConversionsBy'|translate(goalName)|raw }}
{% else %}
{{ 'Goals_ConversionsOverviewBy'|translate }}
{% endif %}
</h2>
{{ goalReportsByDimension|raw }}
{% endif %}
{% if userCanEditGoals %}
{% include "@Goals/_addEditGoal.twig" %}
{% endif %}
{% endif %}