[Git][noosfero/noosfero][master] 2 commits: Adds time to article's publish date

Rodrigo Souto gitlab at mg.gitlab.com
Wed May 25 07:55:39 BRT 2016


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
c59ac0a0 by Marcos Ronaldo at 2016-05-24T11:21:04-03:00
Adds time to article's publish date

Signed-off-by: Gabriel Silva <gabriel93.silva at gmail.com>
Signed-off-by: Marcos Ronaldo <marcos.rpj2 at gmail.com>

- - - - -
768d68bf by Rodrigo Souto at 2016-05-25T10:55:29+00:00
Merge branch 'fix_article_date_without_time' into 'master'

Adds time to article's publish date

Adds option to select time for article published date. The default time will be the current time during article creation.

See merge request !943
- - - - -


2 changed files:

- app/views/cms/_text_fields.html.erb
- features/edit_article.feature


Changes:

=====================================
app/views/cms/_text_fields.html.erb
=====================================
--- a/app/views/cms/_text_fields.html.erb
+++ b/app/views/cms/_text_fields.html.erb
@@ -1 +1 @@
-<%= labelled_form_field(_('Publish date'), date_field('article[published_at]', @article.published_at || DateTime.current, {:max_date => '+0d', :date_format => 'yy-mm-dd'}, {:id => "article_published_at"})) %>
+<%= labelled_form_field(_('Publish date'), date_field('article[published_at]', @article.published_at || DateTime.current, {:max_date => '+0d', :time => true}, {:id => "article_published_at"})) %>


=====================================
features/edit_article.feature
=====================================
--- a/features/edit_article.feature
+++ b/features/edit_article.feature
@@ -281,3 +281,16 @@ Feature: edit article
     And I press "Save"
     Then I should not see "Language must be choosen"
     And I should be on /joaosilva/article-in-portuguese
+
+  @selenium
+  Scenario: create an article with time
+    Given I am on joaosilva's control panel
+    And I follow "Manage Content"
+    And I follow "New content"
+    When I follow "Text article with visual editor"
+    And I fill in "Title" with "My time testing Article"
+    And I fill in "Publish date" with "1980-11-15 20:37"
+    And I press "Save"
+    And I go to /joaosilva/my-time-testing-article
+    Then I should see "November 15, 1980 20:37"
+



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/b004dee3630266464caeb714392e980458698762...768d68bffca5743f2e10f691315140d7e1786cd8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160525/cb66b621/attachment-0001.html>


More information about the Noosfero-dev mailing list