Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
33d70539a6 Show timezone wherever possible 2020-10-26 22:09:31 +01:00
5 changed files with 17 additions and 4 deletions

View file

@ -72,7 +72,9 @@ class PostModal extends React.Component {
<div className="post__header"> <div className="post__header">
<h2 className={titleClassName}>{`${post.title} `}</h2> <h2 className={titleClassName}>{`${post.title} `}</h2>
<div className="post__meta-info"> <div className="post__meta-info">
<span className="post__date">{publicationDate}</span> <span className="post__date">
{publicationDate} {this.props.rule.timezone}
</span>
{post.author && <span className="post__author">{post.author}</span>} {post.author && <span className="post__author">{post.author}</span>}
{this.props.category && ( {this.props.category && (
<span className="badge post__category" title={this.props.category.name}> <span className="badge post__category" title={this.props.category.name}>

View file

@ -41,7 +41,7 @@ class PostItem extends React.Component {
<div className="posts-info"> <div className="posts-info">
<span className="posts-info__date" title={publicationDate}> <span className="posts-info__date" title={publicationDate}>
{publicationDate} {post.author && `By ${post.author}`} {publicationDate} {rule.timezone} {post.author && `By ${post.author}`}
</span> </span>
{this.props.selected.type == CATEGORY_TYPE && ( {this.props.selected.type == CATEGORY_TYPE && (
<span className="badge"> <span className="badge">

View file

@ -12,4 +12,14 @@ class RuleSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = CollectionRule model = CollectionRule
fields = ("id", "type", "name", "url", "favicon", "category", "user", "unread") fields = (
"id",
"type",
"name",
"url",
"favicon",
"category",
"user",
"unread",
"timezone",
)

View file

@ -9,6 +9,6 @@
{% endif %} {% endif %}
{% url "news:collection:rules" as cancel_url %} {% url "news:collection:rules" as cancel_url %}
{% include "components/form/form.html" with form=form title="Update feed" cancel_url=cancel_url confirm_text="Save feed" only %} {% include "components/form/form.html" with form=form title="Update feed" cancel_url=cancel_url confirm_text="Save feed" %}
</main> </main>
{% endblock %} {% endblock %}

View file

@ -30,6 +30,7 @@ class CollectionRuleDetailViewTestCase(TestCase):
self.assertTrue("favicon" in data) self.assertTrue("favicon" in data)
self.assertTrue("category" in data) self.assertTrue("category" in data)
self.assertTrue("type" in data) self.assertTrue("type" in data)
self.assertTrue("timezone" in data)
def test_not_known(self): def test_not_known(self):
response = self.client.get( response = self.client.get(