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

detail.html « app « templates « core « nextcloudappstore - github.com/nextcloud/appstore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e49d1717c3c20091ea4c01457403d9d56ed0c563 (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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
{% extends 'base.html' %}
{% load i18n sort_by_version static app_rating app_rating_class humanize %}

{% block head-title %}{{ object.name }} - {% trans 'Apps' %} - {% endblock %}
{% block head %}
    <link rel="stylesheet" href="{% static 'assets/css/img-slider.css' %}" charset="utf-8">
    <link rel="stylesheet" href="{% static 'vendor/github.css' %}" charset="utf-8">
    <script defer src="{% static 'public/app/detail.js' %}" type="text/javascript"></script>
    <meta name="description-url" content="{% url 'app-description' object.id %}">
    <meta name="ratings-url" content="{% url 'app-ratings' object.id %}">
    <meta name="language-code" content="{{ request.LANGUAGE_CODE }}">
    <meta name="fallback-language-code" content="{{ fallbackLang }}">

    <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.css">
    <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css">

    <script src="https://unpkg.com/swiper/swiper-bundle.js"></script>
    <script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
{% endblock %}

{% block feeds %}
    <link rel="alternate" type="application/atom+xml" title="{% blocktrans with app_name=object.name %}Latest {{ app_name }} releases{% endblocktrans %}" href="{% url 'feeds-releases-atom'%}?app={{ object.id }}" />
    <link rel="alternate" type="application/rss+xml" title="{% blocktrans with app_name=object.name %}Latest {{ app_name }} releases{% endblocktrans %}" href="{% url 'feeds-releases-rss'%}?app={{ object.id }}" />
{% endblock %}

{% block content %}

<nav class="flex mx-auto px-6 pt-8 lg:px-8 lg:max-w-7xl" aria-label="Breadcrumb">
  <ol role="list" class="flex items-center space-x-4">
    <li>
      <div>
        <a href="#" class="text-gray-400 hover:text-gray-500">
          <!-- Heroicon name: solid/home -->
          <svg class="flex-shrink-0 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
            <path d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" />
          </svg>
          <span class="sr-only">{% trans 'Home' %}</span>
        </a>
      </div>
    </li>

    <li>
      <div class="flex items-center">
        <svg class="flex-shrink-0 h-5 w-5 text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
          <path d="M5.555 17.776l8-16 .894.448-8 16-.894-.448z" />
        </svg>
        <a href="#" class="ml-4 text-sm font-medium text-gray-500 hover:text-gray-700">{% trans 'Applications' %}</a>
      </div>
    </li>

    <li>
      <div class="flex items-center">
        <svg class="flex-shrink-0 h-5 w-5 text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
          <path d="M5.555 17.776l8-16 .894.448-8 16-.894-.448z" />
        </svg>
        <a href="#" class="ml-4 text-sm font-medium text-gray-500 hover:text-gray-700" aria-current="page">{{ object.name }}</a>
      </div>
    </li>
  </ol>
</nav>

<div class="bg-white">
  <div class="mx-auto pb-4 px-6 pt-8 lg:max-w-7xl lg:px-8">
    <!-- App detail -->
    <div class="lg:grid lg:grid-rows-1 lg:grid-cols-7 lg:gap-x-8 lg:gap-y-10 xl:gap-x-16">
      {% if object.screenshots.all %}
        <!-- App image -->
        <div class="lg:row-end-1 lg:col-span-4">
          <div id="slider" class="swiper-container w-full overflow-hidden relative pb-10">
            <div class="swiper-wrapper">
              {% for screenshot in object.screenshots.all %}
                <div class="aspect-w-4 aspect-h-3 rounded-lg bg-gray-100 overflow-hidden swiper-slide {% if forloop.first %}active{% endif %}">
                  <img src="{{ screenshot.url }}" alt="{% trans 'Screenshot' %}" class="object-contain">
                </div>
              {% endfor %}
            </div>
            <div class="md:flex swiper-button-prev bg-white w-16 h-16 text-2xl rounded-full"></div>
            <div class="md:flex swiper-button-next bg-white w-16 h-16 text-2xl rounded-full"></div>
            <div class="swiper-pagination"></div>
          </div>
        </div>
      {% endif %}

      <!-- Product details -->
      <div class="max-w-2xl mx-auto mt-14 sm:mt-16 lg:max-w-none lg:mt-0 lg:row-end-2 lg:row-span-2 lg:col-span-3">
        <div>
            <h1 class="text-2xl font-extrabold tracking-tight text-gray-900 sm:text-3xl">{{ object.name }}</h1>

            <h2 id="information-heading" class="sr-only">{% trans "App information" %}</h2>
            <p class="text-sm text-gray-500 mt-2">
            {% trans "By" %}
                {% if object.owner.first_name or object.owner.last_name %}
                    {{ object.owner.first_name }} {{ object.owner.last_name }}
                {% else %}
                    {% trans 'Anonymous' %}
                {% endif %}
                -
                {% trans "Updated" %} <time datetime="object.last_release|date:'Y-m-d H:i'}}">{{ object.last_release|naturaltime }}</time>
            </p>
        </div>
        <div class="mt-4">
          {% if object.is_featured %}
            <a href="/featured" class="inline-flex items-center px-2.5 py-2 rounded-md text-sm font-medium bg-yellow-100 text-yellow-800 mr-2 hover:no-underline hover:bg-yellow-200 hover:text-yellow-800">
              {% trans "Featured" %}
            </a>
          {% endif %}
          {% for category in object.categories.all %}
          <a href="/categories/{{ category|lower }}" class="inline-flex items-center px-2.5 py-2 rounded-md text-sm font-medium bg-gray-100 hover:bg-gray-200 text-gray-800 mr-2 hover:no-underline hover:text-gray-800">
              {{ category }}
            </a>
          {% endfor %}
        </div>

        <div class="text-gray-500 mt-4 app-summary loading"></div>

        <div class="mt-10 grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2">
          {% if object.website %}
          <a href="{{ object.website }}" type="button" class="w-full bg-blue-600 border border-transparent rounded-md py-3 px-8 flex items-center justify-center text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 btn hover:no-underline hover:text-white focus:ring-offset-2 focus:ring-offset-gray-50 focus:ring-blue-500">{% trans 'Homepage' %}</a>
          {% endif %}
            {% if request.user.is_authenticated and not user_has_rated_app and request.user != object.owner %}
              <button type="button" aria-expanded="true" data-toggle="collapse" data-target="#app-ratings" class="w-full bg-blue-50 border border-transparent rounded-md py-3 px-8 flex items-center justify-center text-base font-medium text-blue-700 hover:bg-blue-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-50 focus:ring-blue-500">
                {% if not object.is_integration %}{% trans 'Rate app' %}{% else %}{% trans 'Rate integration' %}{% endif %}
              </button>
            {% endif %}
        </div>

        <div class="border-t border-gray-200 mt-10 pt-10">
          <h3 class="font-medium text-gray-900">{% trans 'Rating' %}</h3>
          <div class="mt-4 prose prose-base text-gray-500">
            <ul role="list">
              <li>{% trans 'Overall:' %} {{ object.rating_overall|app_rating }}</li>
              <li>{% trans 'Recent:' %} {{ object.rating_recent|app_rating }}</li>
            </ul>
          </div>
        </div>
        {% if object.co_maintainers.all %}
        <div class="border-t border-gray-200 mt-10 pt-10">
          <h3 class="font-medium text-gray-900">{% trans 'Co-Maintainers' %}</h3>
          <div class="mt-4 prose prose-sm text-gray-500">
            <ul role="list">
              {% for a in object.co_maintainers.all %}
              <li>{% if a.get_fullname %}
                  {{ a.get_fullname }}
                  {% else %}
                  {{ a.username }}
                  {% endif %}</li>
              {% endfor %}
            </ul>
          </div>
        </div>
        {% endif %}
        {% if object.website or object.user_docs or object.admin_docs or object.developer_docs %}
          <div class="border-t border-gray-200 mt-10 pt-10">
            <h3 class="font-medium text-gray-900">{% trans "Resources" %}</h3>
            <div class="mt-4 prose prose-sm text-gray-500">
              <ul role="list">
                {% if object.website %}
                <li><a href="{{ object.website }}" rel="noopener noreferrer">{% trans "Homepage" %}</a></li>
                {% endif %}
                {% if object.user_docs %}
                <li><a href="{{ object.user_docs }}" rel="noopener noreferrer">{% trans "User documentation" %}</a></li>
                {% endif %}
                {% if object.admin_docs %}
                <li><a href="{{ object.admin_docs }}" rel="noopener noreferrer">{% trans "Admin documentation" %}</a></li>
                {% endif %}
                {% if object.developer_docs %}
                <li><a href="{{ object.developer_docs }}" rel="noopener noreferrer">{% trans "Developer documentation" %}</a></li>
                {% endif %}

                {% if object.issue_tracker %}
                  <li>
                    <a rel="noreferrer noopener" href="{{ object.issue_tracker }}">{% trans 'Report problem' %}</a>
                  </li>
                  <li>
                    <a rel="noreferrer noopener" href="{{ object.issue_tracker }}" >{% trans 'Request feature' %}</a>
                  </li>
                {% endif %}
                <li><a rel="noreferrer noopener" href="{{ object.discussion_url }}" >{% trans 'Ask questions or discuss' %}</a></li>
              </ul>
            </div>
          </div>
        {% endif %}

        <div class="border-t border-gray-200 mt-10 pt-10">
          <h3 class="font-medium text-gray-900">{% trans 'License' %}</h3>
          <p class="mt-4 prose-sm text-gray-500">{% trans 'This application is licensed under the AGPL 3.0 license.' %} <a href="https://www.gnu.org/licenses/agpl-3.0.en.html" class="font-medium text-indigo-600 hover:text-indigo-500">{% trans 'Read full license' %}</a></p>
        </div>

        <div class="border-t border-gray-200 mt-10 pt-10">
          <h3 class="font-medium text-gray-900">Share</h3>
          <ul role="list" class="flex items-center space-x-6 mt-4">
            <li>
              <a href="#" class="flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-500">
                <span class="sr-only">Share on Facebook</span>
                <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
                  <path fill-rule="evenodd" d="M20 10c0-5.523-4.477-10-10-10S0 4.477 0 10c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V10h2.54V7.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V10h2.773l-.443 2.89h-2.33v6.988C16.343 19.128 20 14.991 20 10z" clip-rule="evenodd" />
                </svg>
              </a>
            </li>
            <li>
              <a href="#" class="flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-500">
                <span class="sr-only">Share on Instagram</span>
                <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
                  <path fill-rule="evenodd" d="M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z" clip-rule="evenodd" />
                </svg>
              </a>
            </li>
            <li>
              <a href="#" class="flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-500">
                <span class="sr-only">Share on Twitter</span>
                <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
                  <path d="M6.29 18.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0020 3.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.073 4.073 0 01.8 7.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 010 16.407a11.616 11.616 0 006.29 1.84" />
                </svg>
              </a>
            </li>
          </ul>
        </div>
      </div>

      <div class="w-full max-w-2xl mx-auto mt-16 lg:max-w-none lg:mt-0 lg:col-span-4">
        <div>
          {% if not object.is_integration %}
            <h2 class="text-xl font-semibold text-gray-900">{% trans "Downloads" %}</h2>
            <div class="mt-4 flex flex-col">
              <div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
                <div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
                  <div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
                    <table class="min-w-full divide-y divide-gray-300">
                      <tbody class="divide-y divide-gray-200 bg-white">
                       {% for platform_v, releases in latest_releases_by_platform_v|sort_by_version:'desc' %}
                           {% if releases.stable or releases.unstable %}
                               <tr>
                                   <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Nextcloud {{ platform_v }}</td>
                                   <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{% if releases.stable %}<a href="{{ releases.stable.download }}" rel="noopener noreferrer">{{ releases.stable.version }}</a>{% endif %}</td>
                                   <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{% if releases.unstable %}<a href="{{ releases.unstable.download }}" rel="noopener noreferrer" class="unstable">{{ releases.unstable.version }}{% if releases.unstable.is_nightly %} - {% trans 'nightly' %}{% endif %} ({%  trans 'Unstable' %})</a>{% endif %}</td>
                                   <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500"><a href="{% url 'app-releases' object.id %}?platform={{ platform_v }}#{{ platform_v }}">{% trans "All releases" %}</a></td>
                               </tr>
                           {% endif %}
                       {% endfor %}
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          {% endif %}

          <h2 class="text-xl font-semibold text-gray-900 mt-10">{% trans "Reviews" %}</h2>

          {% if languages %}
              {% get_language_info_list for languages as languages %}
              <label class="block text-sm font-medium text-gray-700" for="comment_language">{% blocktrans %}Display ratings comments in:{% endblocktrans %}</label>
              <select class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md" id="comment_language">
                  {% for language in languages %}
                      <option value="{{ language.code }}"{% if language.code == request.LANGUAGE_CODE %} selected="selected"{% endif %}>
                          {{ language.name_local }}
                      </option>
                  {% endfor %}
              </select>
          {% endif %}

          <div class="app-rating-list loading"></div>

          <template id="rating-template">
            <div class="flex text-sm text-gray-500 space-x-4">
              <div class="py-8">
                <h3 class="font-medium text-gray-900 author"></h3>
                <p><time datetime="2021-07-16" class="date"></time></p>

                <div class="rating rating-good">{% trans 'Good' %}</div>
                <div class="rating rating-ok">{% trans 'OK' %}</div>
                <div class="rating rating-bad">{% trans 'Bad' %}</div>

                <div class="mt-4 prose prose-sm max-w-none text-gray-500">
                  <p class="comment"></p>
                </div>
              </div>
            </div>
          </template>

          <template id="no-ratings-template">
            <div class="w-full">
              <p class="prose-base mt-2">{% blocktrans %}No comments found.{% endblocktrans %}</p>
            </div>
          </template>

          <h2 class="text-xl font-semibold text-gray-900 mt-10">{% trans "More info" %}</h2>

          <div class="app-description prose-base markdown loading"></div>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
    var mySwiper = new Swiper ('.swiper-container', {
        // Optional parameters
        direction: 'horizontal',
        loop: true,

        // If we need pagination
        pagination: {
            el: '.swiper-pagination',
        },

        // Navigation arrows
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },

        // And if we need scrollbar
        scrollbar: {
            el: '.swiper-scrollbar',
        },
    })
</script>
{% endblock %}