Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pluginDetails.twig « templates « CorePluginsAdmin « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 077f3755c5535d39e56fb07c7e495ea02f64d178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
{% import '@CorePluginsAdmin/macros.twig' as pluginsMacro %}

{% block content %}

    <div class="pluginDetails">
        {% if errorMessage %}
            {{ errorMessage }}
        {% elseif plugin %}

            {% set latestVersion = plugin.versions[plugin.versions|length - 1] %}

            <div class="header">
                <div class="intro" style="width:75%;float:left;">
                    <h2>{{ plugin.name }}</h2>
                    <p class="description">
                        {% if plugin.featured %}
                            {{ pluginsMacro.featuredIcon('left') }}
                        {% endif %}
                        {{ plugin.description }}
                    </p>
                </div>
                <div class="width:25%;float:left;">

                    {% if isSuperUser %}
                        {% if plugin.canBeUpdated and 0 == plugin.missingRequirements|length %}
                            <a class="install update"
                               href="{{ linkTo({'action':'updatePlugin', 'pluginName': plugin.name, 'nonce': updateNonce}) }}"
                                    >{{ 'CoreUpdater_UpdateTitle'|translate }}</a>
                        {% elseif plugin.isInstalled %}
                        {% elseif 0 < plugin.missingRequirements|length %}
                        {% else %}
                            <a href="{{ linkTo({'action': 'installPlugin', 'pluginName': plugin.name, 'nonce': installNonce}) }}"
                               class="install">{{ 'CorePluginsAdmin_ActionInstall'|translate }}</a>
                        {% endif %}
                    {% endif %}
                </div>
            </div>

            <div class="content">
                <div style="width:75%;float:left;">

                    <div id="pluginDetailsTabs">
                        <ul>
                            <li><a href="#tabs-description">{{ 'General_Description'|translate }}</a></li>
                            {% if latestVersion.readmeHtml.faq %}
                                <li><a href="#tabs-faq">{{ 'General_Faq'|translate }}</a></li>
                            {% endif %}
                            <li><a href="#tabs-changelog">{{ 'CorePluginsAdmin_Changelog'|translate }}</a></li>
                            {% if plugin.screenshots|length %}
                                <li><a href="#tabs-screenshots">{{ 'CorePluginsAdmin_Screenshots'|translate }}</a></li>
                            {% endif %}
                            {% if latestVersion.readmeHtml.support %}
                                <li><a href="#tabs-support">{{ 'CorePluginsAdmin_Support'|translate }}</a></li>
                            {% endif %}
                        </ul>

                        <div id="tabs-description">
                            {{ pluginsMacro.missingRequirementsPleaseUpdateNotice(plugin) }}
                            {{ latestVersion.readmeHtml.description|raw }}
                        </div>

                        {% if latestVersion.readmeHtml.faq %}
                            <div id="tabs-faq">
                                {{ latestVersion.readmeHtml.faq|raw }}
                            </div>
                        {% endif %}

                        <div id="tabs-changelog">
                            {{ pluginsMacro.missingRequirementsPleaseUpdateNotice(plugin) }}
                            {% if plugin.canBeUpdated %}
                                <p class="updateAvailableNotice">{{ 'CorePluginsAdmin_PluginUpdateAvailable'|translate(plugin.currentVersion, plugin.latestVersion) }}
                                    {% if plugin.repositoryChangelogUrl %}<a rel="noreferrer"  target="_blank" href="{{ plugin.repositoryChangelogUrl }}">{{ 'CorePluginsAdmin_ViewRepositoryChangelog'|translate }}</a>{% endif %}
                                </p>
                            {% endif %}

                            {% if latestVersion.readmeHtml.changelog %}
                                {{ latestVersion.readmeHtml.changelog|raw }}
                            {% endif %}

                            <h3>{{ 'CorePluginsAdmin_History'|translate }}</h3>

                            <ul>
                                {% for version in plugin.versions|reverse %}
                                    <li>
                                        {% set versionName %}
                                            <strong>
                                                {% if version.repositoryChangelogUrl %}
                                                    <a target="_blank" title="{{ 'CorePluginsAdmin_Changelog'|translate }}" href="{{ version.repositoryChangelogUrl }}">{{ version.name }}</a>
                                                {% else %}
                                                    {{ version.name }}
                                                {% endif %}
                                            </strong>
                                        {% endset %}
                                        {{ 'CorePluginsAdmin_PluginVersionInfo'|translate(versionName, version.release)|raw }}
                                        </li>
                                {% endfor %}
                            </ul>
                        </div>

                        {% if plugin.screenshots|length %}
                            <div id="tabs-screenshots">
                                <div class="thumbnails">
                                    {% for screenshot in plugin.screenshots %}
                                        <div class="thumbnail">
                                            <a href="{{ screenshot }}" target="_blank"><img src="{{ screenshot }}?w=400" width="400" alt=""></a>
                                            <p>
                                                {{ screenshot|split('/')|last|replace({'_': ' ', '.png': '', '.jpg': '', '.jpeg': ''}) }}
                                            </p>
                                        </div>
                                    {% endfor %}
                                </div>
                            </div>
                        {% endif %}

                        {% if latestVersion.readmeHtml.support %}
                            <div id="tabs-support">

                                {{ latestVersion.readmeHtml.support|raw }}

                            </div>
                        {% endif %}
                    </div>

                </div>
                <div class="metadata" style="width:25%;float:left;">
                    <p><br /></p>
                    <dl>
                        <dt>{{ 'CorePluginsAdmin_Version'|translate }}</dt>
                        <dd>{{ plugin.latestVersion }}</dd>
                        <dt>{{ 'CorePluginsAdmin_PluginKeywords'|translate }}</dt>
                        <dd>{{ plugin.keywords|join(', ') }}</dd>
                        <dt>{{ 'CorePluginsAdmin_LastUpdated'|translate }}</dt>
                        <dd>{{ plugin.lastUpdated }}</dd>
                        <dt>{{ 'General_Downloads'|translate }}</dt>
                        <dd title="{{ 'CorePluginsAdmin_NumDownloadsLatestVersion'|translate(latestVersion.numDownloads|number_format) }}">{{ plugin.numDownloads }}</dd>
                        <dt>{{ 'CorePluginsAdmin_Developer'|translate }}</dt>
                        <dd>{{ pluginsMacro.pluginDeveloper(plugin.owner) }}</dd>
                        <dt>{{ 'CorePluginsAdmin_Authors'|translate }}</dt>
                        <dd>{% for author in plugin.authors if author.name %}

                                {% spaceless %}
                                    {% if author.homepage %}
                                        <a target="_blank" href="{{ author.homepage }}">{{ author.name }}</a>
                                    {% elseif author.email %}
                                        <a href="mailto:{{ author.email|escape('url') }}">{{ author.name }}</a>
                                    {% else %}
                                        {{ author.name }}
                                    {% endif %}

                                    {% if loop.index < plugin.authors|length %}
                                        ,
                                    {% endif %}
                                {% endspaceless %}

                            {% endfor %}
                        </dd>
                        <dt>{{ 'CorePluginsAdmin_Websites'|translate }}</dt>
                        <dd>
                            {% if plugin.homepage %}
                                <a target="_blank" href="{{ plugin.homepage }}">{{ 'CorePluginsAdmin_PluginWebsite'|translate }}</a>,
                            {% endif %}
                            <a target="_blank" href="{{ plugin.repositoryUrl }}">GitHub</a></dd>
                        {% if plugin.activity %}
                            <dt>{{ 'CorePluginsAdmin_Activity'|translate }}</dt>
                            <dd>
                                {{ plugin.activity.numCommits }} commits

                                {% if plugin.activity.numContributors > 1 %}
                                    {{ 'CorePluginsAdmin_ByXDevelopers'|translate(plugin.activity.numContributors) }}
                                {% endif %}
                                {% if plugin.activity.lastCommitDate %}
                                    {{ 'CorePluginsAdmin_LastCommitTime'|translate(plugin.activity.lastCommitDate) }}
                                {% endif %}</dd>
                        {% endif %}
                    </dl>
                    <br />
                </div>
            </div>
            <script type="text/javascript">
                $(function() {

                    var active = 0;
                    {% if activeTab %}
                        var $activeTab = $('#tabs-{{ activeTab|e('js') }}');
                        if ($activeTab) {
                            active = $activeTab.index() - 1;
                        }
                    {% endif %}

                    $( "#pluginDetailsTabs" ).tabs({active: active >= 0 ? active : 0});

                    $('.pluginDetails a').each(function (index, a) {
                        var link = $(a).attr('href');

                        if (link && 0 === link.indexOf('http')) {
                            $(a).attr('target', '_blank');
                        }
                    });
                });
            </script>
        {% endif %}
    </div>

{% endblock %}