зеркало из https://github.com/nextcloud/appstore.git
Add a way to link to discourse for discussions
This commit is contained in:
Родитель
c09ea5eedd
Коммит
5de6f4042b
|
@ -92,6 +92,8 @@ A full blown example would look like this (needs to be utf-8 encoded):
|
|||
<category>tools</category>
|
||||
<website>https://github.com/owncloud/news</website>
|
||||
<bugs>https://github.com/owncloud/news/issues</bugs>
|
||||
<repository>https://github.com/owncloud/news</repository>
|
||||
<discussion>https://help.nextcloud.com/t/nextcloud-conference-in-berlin-sept-16-22/1710</discussion>
|
||||
<screenshot>https://example.com/1.png</screenshot>
|
||||
<screenshot>https://example.com/2.jpg</screenshot>
|
||||
<dependencies>
|
||||
|
@ -171,6 +173,14 @@ bugs
|
|||
* optional
|
||||
* must contain an URL to the project's bug tracker
|
||||
* will be rendered on the app detail page
|
||||
repository
|
||||
* optional
|
||||
* must contain an URL to the project's repository
|
||||
* currently not used
|
||||
discussion
|
||||
* optional
|
||||
* must contain an URL to the forum, starting with https://help.nextcloud.com
|
||||
* will be rendered on the app detail page
|
||||
screenshot
|
||||
* optional
|
||||
* must contain an HTTPS URL to an image
|
||||
|
|
|
@ -192,6 +192,7 @@ class AppImporter(Importer):
|
|||
'user_docs': attribute_importer,
|
||||
'admin_docs': attribute_importer,
|
||||
'website': attribute_importer,
|
||||
'discussion': attribute_importer,
|
||||
'developer_docs': attribute_importer,
|
||||
'issue_tracker': attribute_importer,
|
||||
'name': l10n_importer,
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
maxOccurs="1"/>
|
||||
<xs:element name="repository" type="repository" minOccurs="0"
|
||||
maxOccurs="1"/>
|
||||
<xs:element name="discussion" type="discussion-url" minOccurs="0"
|
||||
maxOccurs="1"/>
|
||||
<xs:element name="screenshot" type="secure-url" minOccurs="0"
|
||||
maxOccurs="10"/>
|
||||
<xs:element name="dependencies" type="dependencies"
|
||||
|
@ -221,6 +223,14 @@
|
|||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- for now only allow urls to our forum -->
|
||||
<xs:simpleType name="discussion-url">
|
||||
<xs:restriction base="xs:anyURI">
|
||||
<xs:pattern value="https://help\.nextcloud\.com.*"/>
|
||||
<xs:maxLength value="256"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="email">
|
||||
<xs:restriction base="limited-string">
|
||||
<xs:pattern value="[^@]+@[^\.]+\..+"/>
|
||||
|
|
|
@ -97,6 +97,9 @@
|
|||
<issue-tracker>
|
||||
<xsl:value-of select="bugs"/>
|
||||
</issue-tracker>
|
||||
<discussion>
|
||||
<xsl:value-of select="discussion"/>
|
||||
</discussion>
|
||||
|
||||
<!-- release -->
|
||||
<release>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<xsl:copy-of select="website"/>
|
||||
<xsl:copy-of select="bugs"/>
|
||||
<xsl:copy-of select="repository"/>
|
||||
<xsl:copy-of select="discussion"/>
|
||||
<xsl:copy-of select="screenshot"/>
|
||||
<xsl:apply-templates select="dependencies"/>
|
||||
</info>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.7 on 2016-07-22 16:48
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0005_auto_20160718_2039'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='app',
|
||||
name='discussion',
|
||||
field=models.URLField(blank=True, max_length=256, verbose_name='Discussion'),
|
||||
),
|
||||
]
|
|
@ -62,6 +62,8 @@ class App(TranslatableModel):
|
|||
issue_tracker = URLField(max_length=256, blank=True,
|
||||
verbose_name=_('Issue tracker url'))
|
||||
website = URLField(max_length=256, blank=True, verbose_name=_('Homepage'))
|
||||
discussion = URLField(max_length=256, blank=True,
|
||||
verbose_name=_('Discussion'))
|
||||
created = DateTimeField(auto_now_add=True, editable=False,
|
||||
verbose_name=_('Created at'))
|
||||
last_modified = DateTimeField(auto_now=True, editable=False, db_index=True,
|
||||
|
|
|
@ -80,6 +80,9 @@
|
|||
{% if object.developer_docs %}
|
||||
<li><a href="{{ object.developer_docs }}" rel="noopener noreferrer">{% trans "Developer documentation" %}</a></li>
|
||||
{% endif %}
|
||||
{% if object.discussion %}
|
||||
<li><a href="{{ object.discussion }}" rel="noopener noreferrer">{% trans "Discussion" %}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="#downloads">{% trans "Downloads" %}</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
|
Загрузка…
Ссылка в новой задаче