Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYour Name <you@example.com>2013-07-28 01:03:41 (GMT)
committer Your Name <you@example.com>2013-07-28 01:03:41 (GMT)
commit6a9181f269714eeb0b20ec583ac682b0980c5e9a (patch)
treeb1344c2144e303659267aabb95018623471a6669
parentfbf1e134ffe9cf9e01b4116fca86e7a882d0cfd4 (diff)
parent8023867fade947f7a8eac06d0354c5ceff9f7c2d (diff)
Merge branch 'master' of git://git.sugarlabs.org/network/webui
-rw-r--r--TODO4
-rw-r--r--messages.pot99
-rw-r--r--po/en.po627
-rw-r--r--red-azucar.nja26
-rw-r--r--sugar_network_webui/app.py10
-rw-r--r--sugar_network_webui/cursors.py1
-rw-r--r--sugar_network_webui/objects.py2
-rw-r--r--sugar_network_webui/static/css/browser.css4
-rw-r--r--sugar_network_webui/templates/_context-artifact-list.html2
-rw-r--r--sugar_network_webui/templates/_context-resource-list.html2
-rw-r--r--sugar_network_webui/templates/_context-review-list.html4
-rw-r--r--sugar_network_webui/templates/context-view.html14
-rw-r--r--sugar_network_webui/templates/upload-form.html10
-rw-r--r--sugar_network_webui/tests/__init__.py0
-rw-r--r--sugar_network_webui/tests/create_comment.html61
-rw-r--r--sugar_network_webui/tests/create_project.html56
-rw-r--r--sugar_network_webui/tests/create_question.html56
-rw-r--r--sugar_network_webui/tests/create_review.html47
-rw-r--r--sugar_network_webui/tests/edit_project.html62
-rw-r--r--sugar_network_webui/tests/test_create_project.py57
-rw-r--r--sugar_network_webui/tests/test_create_question.py58
-rw-r--r--sugar_network_webui/tests/test_edit_project.py59
-rw-r--r--sugar_network_webui/tests/upload_artifact.html47
-rw-r--r--sugar_network_webui/tests/webui-tests.html19
-rw-r--r--sugar_network_webui/translations/es/LC_MESSAGES/messages.mobin9797 -> 9409 bytes
-rw-r--r--sugar_network_webui/translations/es/LC_MESSAGES/messages.po126
-rwxr-xr-xtest1
27 files changed, 1094 insertions, 360 deletions
diff --git a/TODO b/TODO
deleted file mode 100644
index 3c99520..0000000
--- a/TODO
+++ /dev/null
@@ -1,4 +0,0 @@
-* Need to adopt API
-* Need to implement Use Case 1
-* Need to document on Wiki
-* Need to upload initial data
diff --git a/messages.pot b/messages.pot
index fc42032..a655d24 100644
--- a/messages.pot
+++ b/messages.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2013-05-22 01:40-0500\n"
+"POT-Creation-Date: 2013-05-29 01:01-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -46,7 +46,7 @@ msgstr ""
msgid ""
"Success!\n"
"\n"
-"File %s has been copied to your Documents folder.\n"
+"File %(filename)s has been copied to your Documents folder.\n"
"You can access it from the Journal."
msgstr ""
@@ -59,7 +59,7 @@ msgstr ""
msgid "page %(page)s of %(total)s"
msgstr ""
-#: sugar_network_webui/app.py:439 sugar_network_webui/app.py:741
+#: sugar_network_webui/app.py:439 sugar_network_webui/app.py:746
#: sugar_network_webui/templates/_browser-grid.html:5
#: sugar_network_webui/templates/context-view.html:5
#: sugar_network_webui/templates/context-view.html:25
@@ -67,7 +67,7 @@ msgstr ""
msgid "questions"
msgstr ""
-#: sugar_network_webui/app.py:442 sugar_network_webui/app.py:744
+#: sugar_network_webui/app.py:442 sugar_network_webui/app.py:749
#: sugar_network_webui/templates/_browser-grid.html:11
#: sugar_network_webui/templates/context-view.html:11
#: sugar_network_webui/templates/context-view.html:31
@@ -75,7 +75,7 @@ msgstr ""
msgid "problems"
msgstr ""
-#: sugar_network_webui/app.py:445 sugar_network_webui/app.py:747
+#: sugar_network_webui/app.py:445 sugar_network_webui/app.py:752
#: sugar_network_webui/templates/_browser-grid.html:8
#: sugar_network_webui/templates/context-view.html:8
#: sugar_network_webui/templates/context-view.html:28
@@ -83,7 +83,7 @@ msgstr ""
msgid "ideas"
msgstr ""
-#: sugar_network_webui/app.py:448 sugar_network_webui/app.py:675
+#: sugar_network_webui/app.py:448 sugar_network_webui/app.py:680
#: sugar_network_webui/templates/_browser-grid.html:14
#: sugar_network_webui/templates/_review-list.html:16
#: sugar_network_webui/templates/context-view.html:14
@@ -92,15 +92,15 @@ msgstr ""
msgid "reviews"
msgstr ""
-#: sugar_network_webui/app.py:451 sugar_network_webui/app.py:751
+#: sugar_network_webui/app.py:451 sugar_network_webui/app.py:756
msgid "artifacts"
msgstr ""
-#: sugar_network_webui/app.py:454 sugar_network_webui/app.py:754
+#: sugar_network_webui/app.py:454 sugar_network_webui/app.py:759
msgid "resources"
msgstr ""
-#: sugar_network_webui/app.py:468 sugar_network_webui/app.py:763
+#: sugar_network_webui/app.py:468 sugar_network_webui/app.py:768
#, python-format
msgid "browsing %(total)s %(resource_label)s"
msgstr ""
@@ -222,25 +222,30 @@ msgstr ""
msgid "favorite"
msgstr ""
-#: sugar_network_webui/templates/_context-artifact-list.html:52
+#: sugar_network_webui/templates/_context-artifact-list.html:45
+#: sugar_network_webui/templates/_context-comment-list.html:17
+msgid "delete"
+msgstr ""
+
+#: sugar_network_webui/templates/_context-artifact-list.html:58
#: sugar_network_webui/templates/_context-resource-list.html:52
#: sugar_network_webui/templates/_review-list.html:53
msgid "followers"
msgstr ""
-#: sugar_network_webui/templates/_context-artifact-list.html:55
+#: sugar_network_webui/templates/_context-artifact-list.html:61
#: sugar_network_webui/templates/_context-resource-list.html:55
#: sugar_network_webui/templates/_review-list.html:56
msgid "comments"
msgstr ""
-#: sugar_network_webui/templates/_context-artifact-list.html:58
+#: sugar_network_webui/templates/_context-artifact-list.html:64
#: sugar_network_webui/templates/_context-resource-list.html:58
#: sugar_network_webui/templates/_review-list.html:59
msgid "solutions"
msgstr ""
-#: sugar_network_webui/templates/_context-artifact-list.html:66
+#: sugar_network_webui/templates/_context-artifact-list.html:72
#: sugar_network_webui/templates/_context-resource-list.html:66
#, python-format
msgid ""
@@ -248,10 +253,6 @@ msgid ""
"first to contribute with the community!"
msgstr ""
-#: sugar_network_webui/templates/_context-comment-list.html:17
-msgid "delete"
-msgstr ""
-
#: sugar_network_webui/templates/_context-comment-list.html:35
#: sugar_network_webui/templates/_context-comment-list.html:38
#: sugar_network_webui/templates/_context-review-list.html:55
@@ -330,29 +331,29 @@ msgstr ""
#: sugar_network_webui/templates/base.html:74
#: sugar_network_webui/templates/dialog_resource.html:18
-#: sugar_network_webui/templates/upload-form.html:13
+#: sugar_network_webui/templates/upload-form.html:12
msgid "Sugar Network"
msgstr ""
#: sugar_network_webui/templates/base.html:85
#: sugar_network_webui/templates/base.html:139
#: sugar_network_webui/templates/base.html:199
-#: sugar_network_webui/templates/dialog_project.html:24
+#: sugar_network_webui/templates/dialog_project.html:21
#: sugar_network_webui/templates/dialog_resource.html:23
#: sugar_network_webui/templates/resource-form.html:21
msgid "Title"
msgstr ""
#: sugar_network_webui/templates/base.html:93
-#: sugar_network_webui/templates/context-view.html:83
-#: sugar_network_webui/templates/dialog_project.html:32
+#: sugar_network_webui/templates/context-view.html:87
+#: sugar_network_webui/templates/dialog_project.html:29
msgid "Summary"
msgstr ""
#: sugar_network_webui/templates/base.html:97
#: sugar_network_webui/templates/base.html:140
#: sugar_network_webui/templates/base.html:200
-#: sugar_network_webui/templates/dialog_project.html:36
+#: sugar_network_webui/templates/dialog_project.html:33
#: sugar_network_webui/templates/dialog_resource.html:33
#: sugar_network_webui/templates/resource-form.html:25
msgid "Details"
@@ -381,7 +382,6 @@ msgid "Edit resource"
msgstr ""
#: sugar_network_webui/templates/base.html:387
-#: sugar_network_webui/templates/dialog_project.html:44
#: sugar_network_webui/templates/synchronize.html:34
msgid "You are in offline mode"
msgstr ""
@@ -392,7 +392,7 @@ msgstr ""
#: sugar_network_webui/templates/browser-view.html:72
#: sugar_network_webui/templates/browser-view.html:80
-#: sugar_network_webui/templates/context-view.html:243
+#: sugar_network_webui/templates/context-view.html:258
#: sugar_network_webui/templates/resource-list.html:111
msgid "page '+new_page+' of"
msgstr ""
@@ -401,11 +401,11 @@ msgstr ""
msgid "Author(s)"
msgstr ""
-#: sugar_network_webui/templates/context-view.html:86
+#: sugar_network_webui/templates/context-view.html:90
msgid "License"
msgstr ""
-#: sugar_network_webui/templates/context-view.html:87
+#: sugar_network_webui/templates/context-view.html:91
msgid "Work in progress."
msgstr ""
@@ -439,37 +439,26 @@ msgstr ""
msgid "Editing project"
msgstr ""
-#: sugar_network_webui/templates/dialog_project.html:46
-msgid ""
-"You need to be connected to the Internet or to a Sugar Network Node in "
-"order to upload a project."
-msgstr ""
-
-#: sugar_network_webui/templates/dialog_project.html:48
-#: sugar_network_webui/templates/synchronize.html:39
-msgid "Try to connect"
-msgstr ""
-
-#: sugar_network_webui/templates/dialog_project.html:54
+#: sugar_network_webui/templates/dialog_project.html:38
msgid "Must fill all fields."
msgstr ""
-#: sugar_network_webui/templates/dialog_project.html:57
+#: sugar_network_webui/templates/dialog_project.html:41
#: sugar_network_webui/templates/dialog_resource.html:48
#: sugar_network_webui/templates/synchronize.html:24
msgid "cc-by-sa-full.png"
msgstr ""
-#: sugar_network_webui/templates/dialog_project.html:58
+#: sugar_network_webui/templates/dialog_project.html:42
#: sugar_network_webui/templates/dialog_resource.html:49
#: sugar_network_webui/templates/synchronize.html:25
msgid "<b>Creative Commons Attribution Share-Alike License</b>"
msgstr ""
-#: sugar_network_webui/templates/dialog_project.html:59
+#: sugar_network_webui/templates/dialog_project.html:43
#: sugar_network_webui/templates/dialog_resource.html:50
#: sugar_network_webui/templates/synchronize.html:26
-#: sugar_network_webui/templates/upload-form.html:27
+#: sugar_network_webui/templates/upload-form.html:26
msgid ""
"Please note that all contributions to Sugar Labs are considered to be "
"released under the Attribution 3.0 Unported. If you do not want your "
@@ -477,7 +466,7 @@ msgid ""
"here."
msgstr ""
-#: sugar_network_webui/templates/dialog_project.html:61
+#: sugar_network_webui/templates/dialog_project.html:45
#: sugar_network_webui/templates/dialog_resource.html:52
#: sugar_network_webui/templates/synchronize.html:28
msgid ""
@@ -495,7 +484,7 @@ msgstr ""
#: sugar_network_webui/templates/dialog_resource.html:18
#: sugar_network_webui/templates/resource-form.html:13
-#: sugar_network_webui/templates/upload-form.html:13
+#: sugar_network_webui/templates/upload-form.html:12
msgid "Context"
msgstr ""
@@ -550,7 +539,7 @@ msgid "Reviews"
msgstr ""
#: sugar_network_webui/templates/synchronize.html:21
-#: sugar_network_webui/templates/upload-form.html:24
+#: sugar_network_webui/templates/upload-form.html:23
msgid "Upload and share"
msgstr ""
@@ -560,6 +549,10 @@ msgid ""
"order to sync."
msgstr ""
+#: sugar_network_webui/templates/synchronize.html:39
+msgid "Try to connect"
+msgstr ""
+
#: sugar_network_webui/templates/toolbar.html:8
#: sugar_network_webui/templates/toolbar.html:43
msgid "Activities"
@@ -636,28 +629,18 @@ msgstr ""
msgid "Upload an artifact: Share your work!"
msgstr ""
-#: sugar_network_webui/templates/upload-form.html:17
+#: sugar_network_webui/templates/upload-form.html:16
msgid "Please add a short description."
msgstr ""
-#: sugar_network_webui/templates/upload-form.html:29
+#: sugar_network_webui/templates/upload-form.html:28
msgid "cc-by-sa.png"
msgstr ""
-#: sugar_network_webui/templates/upload-form.html:31
+#: sugar_network_webui/templates/upload-form.html:30
msgid ""
"You are also promising us that you wrote this yourself, or copied it from"
" a public domain or similar free resource. <b>Do not submit copyrighted "
"work without permission!</b>"
msgstr ""
-#: sugar_network_webui/templates/upload-form.html:40
-msgid "Alpha Version"
-msgstr ""
-
-#: sugar_network_webui/templates/upload-form.html:42
-msgid ""
-"For the time being you need to be connected to the Internet in order to "
-"contribute!"
-msgstr ""
-
diff --git a/po/en.po b/po/en.po
index b185268..093cae4 100644
--- a/po/en.po
+++ b/po/en.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2012-10-19 00:33-0400\n"
-"PO-Revision-Date: 2012-10-13 08:38+0200\n"
+"POT-Creation-Date: 2013-06-23 00:33-0400\n"
+"PO-Revision-Date: 2013-06-24 02:33+0200\n"
"Last-Translator: Chris <cjl@laptop.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en\n"
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Pootle 2.0.5\n"
"Generated-By: Babel 0.9.4\n"
-#: red-azucar.py:31 red-azucar.py:35 app/env.py:30
+#: red-azucar.py:31 red-azucar.py:35 sugar_network_webui/env.py:30
msgid "address to listen for Web clients"
msgstr "address to listen for Web clients"
@@ -34,184 +34,228 @@ msgstr "Flask server to serve Sugar Network users"
msgid "See http://wiki.sugarlabs.org/go/Platform_Team/Sugar_Network/Browser."
msgstr "See http://wiki.sugarlabs.org/go/Platform_Team/Sugar_Network/Browser."
-#: app/app.py:82
+#: sugar_network_webui/app.py:97
msgid "MMMM d, yyyy"
msgstr "MMMM d, yyyy"
-#: app/app.py:352
+#: sugar_network_webui/app.py:338
msgid "Artifact has been downloaded."
msgstr "Artifact has been downloaded."
-#: app/app.py:353
+#: sugar_network_webui/app.py:339
#, python-format
+#, python-format,
msgid ""
"Success!\n"
"\n"
-"File %s has been copied to your Documents folder.\n"
+"File %(filename)s has been copied to your Documents folder.\n"
"You can access it from the Journal."
msgstr ""
"Success!\n"
"\n"
-"File %s has been copied to your Documents folder.\n"
+"File %(filename)s has been copied to your Documents folder.\n"
"You can access it from the Journal."
-#: app/app.py:495
+#: sugar_network_webui/app.py:398
msgid "zero results"
msgstr "zero results"
-#: app/app.py:497
+#: sugar_network_webui/app.py:400
#, python-format
msgid "page %(page)s of %(total)s"
msgstr "page %(page)s of %(total)s"
-#: app/app.py:536 app/app.py:825 app/templates/_browser-grid.html:5
-#: app/templates/context-view.html:5 app/templates/context-view.html:25
-#: app/templates/resource-list.html:6
+#: sugar_network_webui/app.py:439 sugar_network_webui/app.py:746
+#: sugar_network_webui/templates/_browser-grid.html:5
+#: sugar_network_webui/templates/context-view.html:5
+#: sugar_network_webui/templates/context-view.html:25
+#: sugar_network_webui/templates/resource-list.html:6
msgid "questions"
msgstr "questions"
-#: app/app.py:539 app/app.py:828 app/templates/_browser-grid.html:11
-#: app/templates/context-view.html:11 app/templates/context-view.html:31
-#: app/templates/resource-list.html:12
+#: sugar_network_webui/app.py:442 sugar_network_webui/app.py:749
+#: sugar_network_webui/templates/_browser-grid.html:11
+#: sugar_network_webui/templates/context-view.html:11
+#: sugar_network_webui/templates/context-view.html:31
+#: sugar_network_webui/templates/resource-list.html:12
msgid "problems"
msgstr "problems"
-#: app/app.py:542 app/app.py:831 app/templates/_browser-grid.html:8
-#: app/templates/context-view.html:8 app/templates/context-view.html:28
-#: app/templates/resource-list.html:9
+#: sugar_network_webui/app.py:445 sugar_network_webui/app.py:752
+#: sugar_network_webui/templates/_browser-grid.html:8
+#: sugar_network_webui/templates/context-view.html:8
+#: sugar_network_webui/templates/context-view.html:28
+#: sugar_network_webui/templates/resource-list.html:9
msgid "ideas"
msgstr "ideas"
-#: app/app.py:545 app/app.py:763 app/templates/_browser-grid.html:14
-#: app/templates/context-view.html:14 app/templates/context-view.html:34
-#: app/templates/resource-list.html:15
+#: sugar_network_webui/app.py:448 sugar_network_webui/app.py:680
+#: sugar_network_webui/templates/_browser-grid.html:14
+#: sugar_network_webui/templates/_review-list.html:16
+#: sugar_network_webui/templates/context-view.html:14
+#: sugar_network_webui/templates/context-view.html:34
+#: sugar_network_webui/templates/resource-list.html:15
msgid "reviews"
msgstr "reviews"
-#: app/app.py:548 app/app.py:835
+#: sugar_network_webui/app.py:451 sugar_network_webui/app.py:756
msgid "artifacts"
msgstr "artifacts"
-#: app/app.py:551 app/app.py:838
+#: sugar_network_webui/app.py:454 sugar_network_webui/app.py:759
msgid "resources"
msgstr "resources"
-#: app/app.py:565 app/app.py:847
+#: sugar_network_webui/app.py:468 sugar_network_webui/app.py:768
#, python-format
msgid "browsing %(total)s %(resource_label)s"
msgstr "browsing %(total)s %(resource_label)s"
-#: app/app.py:590 app/app.py:599
-msgid "Error"
-msgstr "Error"
-
-#: app/app.py:593
+#: sugar_network_webui/app.py:496
msgid "Object not found."
msgstr "Object not found."
-#: app/app.py:602
+#: sugar_network_webui/app.py:497
+msgid ""
+"The resource you are looking for is not available at the moment.\n"
+"\n"
+"If you are offline try connecting."
+msgstr ""
+"The resource you are looking for is not available at the moment.\n"
+"\n"
+"If you are offline try connecting."
+
+#: sugar_network_webui/app.py:506
+msgid "Error"
+msgstr "Error"
+
+#: sugar_network_webui/app.py:509
msgid "Server error."
msgstr "Server error."
-#: app/app.py:635
+#: sugar_network_webui/app.py:543
msgid "activities"
msgstr "activities"
-#: app/app.py:638
+#: sugar_network_webui/app.py:546
msgid "projects"
msgstr "projects"
-#: app/app.py:642
+#: sugar_network_webui/app.py:550
msgid "contexts"
msgstr "contexts"
-#: app/app.py:657
+#: sugar_network_webui/app.py:565
#, python-format
msgid "browsing %(total)s %(label)s"
msgstr "browsing %(total)s %(label)s"
-#: app/env.py:22
+#: sugar_network_webui/env.py:22
msgid "start web application to serve Sugar Network content"
msgstr "start web application to serve Sugar Network content"
-#: app/env.py:26
+#: sugar_network_webui/env.py:26
msgid "hostname to bind"
msgstr "hostname to bind"
-#: app/templates/_artifact-list.html:6 app/templates/_resource-list.html:6
+#: sugar_network_webui/templates/_artifact-list.html:6
+#: sugar_network_webui/templates/_resource-list.html:7
+#: sugar_network_webui/templates/_review-list.html:6
msgid "context resources"
msgstr "context resources"
-#: app/templates/_artifact-list.html:16
+#: sugar_network_webui/templates/_artifact-list.html:16
msgid "download artifact"
msgstr "download artifact"
-#: app/templates/_artifact-list.html:22 app/templates/_artifact-list.html:27
-#: app/templates/_resource-list.html:22 app/templates/_resource-list.html:27
+#: sugar_network_webui/templates/_artifact-list.html:22
+#: sugar_network_webui/templates/_artifact-list.html:27
+#: sugar_network_webui/templates/_resource-list.html:23
+#: sugar_network_webui/templates/_resource-list.html:28
+#: sugar_network_webui/templates/_review-list.html:22
+#: sugar_network_webui/templates/_review-list.html:27
msgid "see more"
msgstr "see more"
-#: app/templates/_artifact-list.html:31
-#: app/templates/_context-artifact-list.html:39
-#: app/templates/_context-comment-list.html:9
-#: app/templates/_context-resource-list.html:39
-#: app/templates/_context-review-list.html:27
-#: app/templates/_context-solution-list.html:14
-#: app/templates/_context-solution-list.html:54
-#: app/templates/_resource-list.html:31
+#: sugar_network_webui/templates/_artifact-list.html:31
+#: sugar_network_webui/templates/_context-artifact-list.html:40
+#: sugar_network_webui/templates/_context-artifact-list.html:42
+#: sugar_network_webui/templates/_context-comment-list.html:11
+#: sugar_network_webui/templates/_context-comment-list.html:13
+#: sugar_network_webui/templates/_context-resource-list.html:40
+#: sugar_network_webui/templates/_context-resource-list.html:42
+#: sugar_network_webui/templates/_context-review-list.html:33
+#: sugar_network_webui/templates/_context-review-list.html:35
+#: sugar_network_webui/templates/_context-solution-list.html:16
+#: sugar_network_webui/templates/_context-solution-list.html:18
+#: sugar_network_webui/templates/_context-solution-list.html:70
+#: sugar_network_webui/templates/_context-solution-list.html:72
+#: sugar_network_webui/templates/_resource-list.html:33
+#: sugar_network_webui/templates/_resource-list.html:35
+#: sugar_network_webui/templates/_review-list.html:32
+#: sugar_network_webui/templates/_review-list.html:34
#, python-format
msgid "by %(author)s on %(date)s"
msgstr "by %(author)s on %(date)s"
-#: app/templates/_artifact-list.html:49
-#: app/templates/_context-artifact-list.html:48
-#: app/templates/_context-resource-list.html:48
-#: app/templates/_resource-list.html:49
-msgid "followers"
-msgstr "followers"
-
-#: app/templates/_artifact-list.html:52
-#: app/templates/_context-artifact-list.html:51
-#: app/templates/_context-resource-list.html:51
-#: app/templates/_resource-list.html:52
-msgid "comments"
-msgstr "comments"
-
-#: app/templates/_artifact-list.html:55
-#: app/templates/_context-artifact-list.html:54
-#: app/templates/_context-resource-list.html:54
-#: app/templates/_resource-list.html:55
-msgid "solutions"
-msgstr "solutions"
-
-#: app/templates/_browser-grid.html:17 app/templates/context-view.html:17
-#: app/templates/context-view.html:40 app/templates/resource-list.html:18
+#: sugar_network_webui/templates/_browser-grid.html:17
+#: sugar_network_webui/templates/context-view.html:17
+#: sugar_network_webui/templates/context-view.html:40
+#: sugar_network_webui/templates/resource-list.html:18
msgid "all resources"
msgstr "all resources"
-#: app/templates/_browser-grid.html:20 app/templates/context-view.html:20
-#: app/templates/context-view.html:37 app/templates/resource-list.html:21
+#: sugar_network_webui/templates/_browser-grid.html:20
+#: sugar_network_webui/templates/context-view.html:20
+#: sugar_network_webui/templates/context-view.html:37
+#: sugar_network_webui/templates/resource-list.html:21
msgid "artifact gallery"
msgstr "artifact gallery"
-#: app/templates/_browser-grid.html:24 app/templates/context-view.html:42
+#: sugar_network_webui/templates/_browser-grid.html:24
+#: sugar_network_webui/templates/context-view.html:42
msgid "launch"
msgstr "launch"
-#: app/templates/_browser-grid.html:27
+#: sugar_network_webui/templates/_browser-grid.html:27
msgid "see"
msgstr "see"
-#: app/templates/_browser-grid.html:35 app/templates/context-view.html:54
+#: sugar_network_webui/templates/_browser-grid.html:35
+#: sugar_network_webui/templates/context-view.html:54
msgid "available offline"
msgstr "available offline"
-#: app/templates/_browser-grid.html:42 app/templates/context-view.html:61
+#: sugar_network_webui/templates/_browser-grid.html:42
+#: sugar_network_webui/templates/context-view.html:61
msgid "favorite"
msgstr "favorite"
-#: app/templates/_context-artifact-list.html:62
-#: app/templates/_context-resource-list.html:62
+#: sugar_network_webui/templates/_context-artifact-list.html:45
+#: sugar_network_webui/templates/_context-comment-list.html:17
+msgid "delete"
+msgstr "delete"
+
+#: sugar_network_webui/templates/_context-artifact-list.html:58
+#: sugar_network_webui/templates/_context-resource-list.html:52
+#: sugar_network_webui/templates/_review-list.html:53
+msgid "followers"
+msgstr "followers"
+
+#: sugar_network_webui/templates/_context-artifact-list.html:61
+#: sugar_network_webui/templates/_context-resource-list.html:55
+#: sugar_network_webui/templates/_review-list.html:56
+msgid "comments"
+msgstr "comments"
+
+#: sugar_network_webui/templates/_context-artifact-list.html:64
+#: sugar_network_webui/templates/_context-resource-list.html:58
+#: sugar_network_webui/templates/_review-list.html:59
+msgid "solutions"
+msgstr "solutions"
+
+#: sugar_network_webui/templates/_context-artifact-list.html:72
+#: sugar_network_webui/templates/_context-resource-list.html:66
#, python-format
msgid ""
"No %(resource)s have been shared yet for this context.<br><br>Be the "
@@ -220,37 +264,49 @@ msgstr ""
"No %(resource)s have been shared yet for this context.<br><br>Be the first "
"to contribute with the community!"
-#: app/templates/_context-comment-list.html:11
-msgid "delete"
-msgstr "delete"
-
-#: app/templates/_context-comment-list.html:29
-#: app/templates/_context-comment-list.html:32
-#: app/templates/_context-review-list.html:46
-#: app/templates/_context-solution-list.html:31
-#: app/templates/_context-solution-list.html:73
+#: sugar_network_webui/templates/_context-comment-list.html:35
+#: sugar_network_webui/templates/_context-comment-list.html:38
+#: sugar_network_webui/templates/_context-review-list.html:55
+#: sugar_network_webui/templates/_context-solution-list.html:45
+#: sugar_network_webui/templates/_context-solution-list.html:92
msgid "comment"
msgstr "comment"
-#: app/templates/_context-comment-list.html:32
+#: sugar_network_webui/templates/_context-comment-list.html:38
msgid "can't comment in offline mode yet"
msgstr "can't comment in offline mode yet"
-#: app/templates/_context-comment-list.html:36
+#: sugar_network_webui/templates/_context-comment-list.html:42
msgid "collapse"
msgstr "collapse"
-#: app/templates/_context-review-list.html:6
+#: sugar_network_webui/templates/_context-resource-list.html:83
+#: sugar_network_webui/templates/_context-review-list.html:16
+#: sugar_network_webui/templates/_context-solution-list.html:123
+msgid "New question, idea or problem"
+msgstr "New question, idea or problem"
+
+#: sugar_network_webui/templates/_context-review-list.html:5
+#: sugar_network_webui/templates/dialog_resource.html:37
+msgid "submit question"
+msgstr "submit question"
+
+#: sugar_network_webui/templates/_context-review-list.html:7
+#: sugar_network_webui/templates/dialog_resource.html:39
+msgid "submit idea"
+msgstr "submit idea"
+
+#: sugar_network_webui/templates/_context-review-list.html:9
+#: sugar_network_webui/templates/dialog_resource.html:41
+msgid "submit problem"
+msgstr "submit problem"
+
+#: sugar_network_webui/templates/_context-review-list.html:12
msgid "contribute a review"
msgstr "contribute a review"
-#: app/templates/_context-review-list.html:10
-#: app/templates/_context-solution-list.html:98
-msgid "can't contribute in offline mode yet"
-msgstr "can't contribute in offline mode yet"
-
-#: app/templates/_context-review-list.html:16
-#: app/templates/_context-solution-list.html:43
+#: sugar_network_webui/templates/_context-review-list.html:21
+#: sugar_network_webui/templates/_context-solution-list.html:58
#, python-format
msgid ""
"No %(resource)s have been shared yet for this context.<br><br>Be the "
@@ -259,198 +315,417 @@ msgstr ""
"No %(resource)s have been shared yet for this context.<br><br>Be the first "
"to share with the community!"
-#: app/templates/_context-review-list.html:36
-#: app/templates/_context-solution-list.html:63
+#: sugar_network_webui/templates/_context-review-list.html:45
+#: sugar_network_webui/templates/_context-solution-list.html:82
msgid "edit"
msgstr "edit"
-#: app/templates/_context-solution-list.html:94
+#: sugar_network_webui/templates/_context-solution-list.html:114
msgid "contribute a solution"
msgstr "contribute a solution"
-#: app/templates/_resource-list.html:16
+#: sugar_network_webui/templates/_context-solution-list.html:118
+msgid "contribute a solution in offline mode"
+msgstr "contribute a solution in offline mode"
+
+#: sugar_network_webui/templates/_resource-list.html:17
+#: sugar_network_webui/templates/_review-list.html:16
#, python-format
msgid "context %(resource)s"
msgstr "context %(resource)s"
-#: app/templates/base.html:4
+#: sugar_network_webui/templates/base.html:4
msgid "Welcome to Sugar Network"
msgstr "Welcome to Sugar Network"
-#: app/templates/base.html:70 app/templates/base.html:307
+#: sugar_network_webui/templates/base.html:74
msgid "New resource"
msgstr "New resource"
-#: app/templates/base.html:70 app/templates/base.html:307
-#: app/templates/upload-form.html:13
+#: sugar_network_webui/templates/base.html:74
+#: sugar_network_webui/templates/dialog_resource.html:18
+#: sugar_network_webui/templates/upload-form.html:12
msgid "Sugar Network"
msgstr "Sugar Network"
-#: app/templates/base.html:81 app/templates/base.html:151
-#: app/templates/base.html:212 app/templates/resource-form.html:21
+#: sugar_network_webui/templates/base.html:85
+#: sugar_network_webui/templates/base.html:139
+#: sugar_network_webui/templates/base.html:199
+#: sugar_network_webui/templates/dialog_project.html:21
+#: sugar_network_webui/templates/dialog_resource.html:23
+#: sugar_network_webui/templates/resource-form.html:21
msgid "Title"
msgstr "Title"
-#: app/templates/base.html:89 app/templates/context-view.html:83
+#: sugar_network_webui/templates/base.html:93
+#: sugar_network_webui/templates/context-view.html:73
+#: sugar_network_webui/templates/dialog_project.html:29
msgid "Summary"
msgstr "Summary"
-#: app/templates/base.html:93 app/templates/base.html:152
-#: app/templates/base.html:213 app/templates/resource-form.html:25
+#: sugar_network_webui/templates/base.html:97
+#: sugar_network_webui/templates/base.html:140
+#: sugar_network_webui/templates/base.html:200
+#: sugar_network_webui/templates/dialog_project.html:33
+#: sugar_network_webui/templates/dialog_resource.html:33
+#: sugar_network_webui/templates/resource-form.html:25
msgid "Details"
msgstr "Details"
-#: app/templates/base.html:108 app/templates/report-form.html:27
-#: app/templates/upload-form.html:34
-msgid "Alpha Version"
-msgstr "Alpha Version"
-
-#: app/templates/base.html:110 app/templates/report-form.html:29
-#: app/templates/upload-form.html:36
-msgid ""
-"For the time being you need to be connected to the Internet in order to "
-"contribute!"
-msgstr ""
-"For the time being you need to be connected to the Internet in order to "
-"contribute!"
-
-#: app/templates/base.html:140
+#: sugar_network_webui/templates/base.html:128
msgid "Edit project"
msgstr "Edit project"
-#: app/templates/base.html:141 app/templates/base.html:202
+#: sugar_network_webui/templates/base.html:129
+#: sugar_network_webui/templates/base.html:189
msgid "Name"
msgstr "Name"
-#: app/templates/base.html:142 app/templates/base.html:203
+#: sugar_network_webui/templates/base.html:130
+#: sugar_network_webui/templates/base.html:190
msgid "Article"
msgstr "Article"
-#: app/templates/base.html:201
+#: sugar_network_webui/templates/base.html:188
msgid "Create new project"
msgstr "Create new project"
-#: app/templates/base.html:257
+#: sugar_network_webui/templates/base.html:243
msgid "Edit resource"
msgstr "Edit resource"
-#: app/templates/browser-view.html:72 app/templates/browser-view.html:80
-#: app/templates/context-view.html:237 app/templates/resource-list.html:111
+#: sugar_network_webui/templates/base.html:387
+#: sugar_network_webui/templates/synchronize.html:34
+msgid "You are in offline mode"
+msgstr "You are in offline mode"
+
+#: sugar_network_webui/templates/base.html:393
+msgid "You are in online mode"
+msgstr "You are in online mode"
+
+#: sugar_network_webui/templates/browser-view.html:72
+#: sugar_network_webui/templates/browser-view.html:80
+#: sugar_network_webui/templates/context-view.html:258
+#: sugar_network_webui/templates/resource-list.html:111
msgid "page '+new_page+' of"
msgstr "page '+new_page+' of"
-#: app/templates/context-view.html:73
+#: sugar_network_webui/templates/context-view.html:76
msgid "Author(s)"
msgstr "Author(s)"
-#: app/templates/context-view.html:86
+#: sugar_network_webui/templates/context-view.html:90
msgid "License"
msgstr "License"
-#: app/templates/context-view.html:87
+#: sugar_network_webui/templates/context-view.html:91
msgid "Work in progress."
msgstr "Work in progress."
-#: app/templates/report-form.html:5
+#: sugar_network_webui/templates/dialog_about.html:5
+msgid "Terms of Use"
+msgstr "Terms of Use"
+
+#: sugar_network_webui/templates/dialog_about.html:11
+msgid "terms_of_use.html"
+msgstr "terms_of_use.html"
+
+#: sugar_network_webui/templates/dialog_about.html:16
+msgid ""
+"Except where otherwise noted, content on this service is licensed under "
+"the\n"
+"<b>Creative Commons Attribution Share-Alike License v3.0 or any later "
+"version</b>."
+msgstr ""
+"Except where otherwise noted, content on this service is licensed under the\n"
+"<b>Creative Commons Attribution Share-Alike License v3.0 or any later "
+"version</b>."
+
+#: sugar_network_webui/templates/dialog_about.html:19
+msgid ""
+"Likewise, Sugar Network software modules are licensed under the\n"
+"<b>General Public License v3.0 or any later version</b>."
+msgstr ""
+"Likewise, Sugar Network software modules are licensed under the\n"
+"<b>General Public License v3.0 or any later version</b>."
+
+#: sugar_network_webui/templates/dialog_project.html:6
+msgid "Creating new project"
+msgstr "Creating new project"
+
+#: sugar_network_webui/templates/dialog_project.html:8
+msgid "Editing project"
+msgstr "Editing project"
+
+#: sugar_network_webui/templates/dialog_project.html:38
+msgid "Must fill all fields."
+msgstr "Must fill all fields."
+
+#: sugar_network_webui/templates/dialog_project.html:41
+#: sugar_network_webui/templates/dialog_resource.html:48
+#: sugar_network_webui/templates/synchronize.html:24
+msgid "cc-by-sa-full.png"
+msgstr "cc-by-sa-full.png"
+
+#: sugar_network_webui/templates/dialog_project.html:42
+#: sugar_network_webui/templates/dialog_resource.html:49
+#: sugar_network_webui/templates/synchronize.html:25
+msgid "<b>Creative Commons Attribution Share-Alike License</b>"
+msgstr "<b>Creative Commons Attribution Share-Alike License</b>"
+
+#: sugar_network_webui/templates/dialog_project.html:43
+#: sugar_network_webui/templates/dialog_resource.html:50
+#: sugar_network_webui/templates/synchronize.html:26
+#: sugar_network_webui/templates/upload-form.html:26
+msgid ""
+"Please note that all contributions to Sugar Labs are considered to be "
+"released under the Attribution 3.0 Unported. If you do not want your "
+"writing to be edited and redistributed at will, then do not submit it "
+"here."
+msgstr ""
+"Please note that all contributions to Sugar Labs are considered to be "
+"released under the Attribution 3.0 Unported. If you do not want your writing "
+"to be edited and redistributed at will, then do not submit it here."
+
+#: sugar_network_webui/templates/dialog_project.html:45
+#: sugar_network_webui/templates/dialog_resource.html:52
+#: sugar_network_webui/templates/synchronize.html:28
+msgid ""
+"You are also promising us that you wrote this yourself, or copied it from"
+" a public domain or similar free resource."
+msgstr ""
+"You are also promising us that you wrote this yourself, or copied it from a "
+"public domain or similar free resource."
+
+#: sugar_network_webui/templates/dialog_resource.html:6
+msgid "Creating new resource: Question, Idea or Problem"
+msgstr "Creating new resource: Question, Idea or Problem"
+
+#: sugar_network_webui/templates/dialog_resource.html:8
+msgid "Editing "
+msgstr "Editing "
+
+#: sugar_network_webui/templates/dialog_resource.html:18
+#: sugar_network_webui/templates/resource-form.html:13
+#: sugar_network_webui/templates/upload-form.html:12
+msgid "Context"
+msgstr "Context"
+
+#: sugar_network_webui/templates/please_wait.html:5
+msgid "Please wait"
+msgstr "Please wait"
+
+#: sugar_network_webui/templates/report-form.html:5
msgid "Report to developers: Activity failed to start!"
msgstr "Report to developers: Activity failed to start!"
-#: app/templates/report-form.html:13
+#: sugar_network_webui/templates/report-form.html:12
msgid "You may also add a comment regarding failure conditions."
msgstr "You may also add a comment regarding failure conditions."
-#: app/templates/report-form.html:20
+#: sugar_network_webui/templates/report-form.html:19
msgid "Report"
msgstr "Report"
-#: app/templates/resource-form.html:5
+#: sugar_network_webui/templates/report-form.html:25
+msgid "Sugar Network is in offline mode"
+msgstr "Sugar Network is in offline mode"
+
+#: sugar_network_webui/templates/report-form.html:27
+msgid "Your report will be queued for upload."
+msgstr "Your report will be queued for upload."
+
+#: sugar_network_webui/templates/resource-form.html:5
msgid "Improve the system"
msgstr "Improve the system"
-#: app/templates/resource-form.html:13 app/templates/upload-form.html:13
-msgid "Context"
-msgstr "Context"
+#: sugar_network_webui/templates/synchronize.html:5
+msgid "Sugar Network Synchronization"
+msgstr "Sugar Network Synchronization"
+
+#: sugar_network_webui/templates/synchronize.html:11
+msgid "The following resources are queued for sharing."
+msgstr "The following resources are queued for sharing."
-#: app/templates/toolbar.html:8 app/templates/toolbar.html:46
+#: sugar_network_webui/templates/synchronize.html:13
+msgid "Feedback"
+msgstr "Feedback"
+
+#: sugar_network_webui/templates/synchronize.html:15
+msgid "Solutions"
+msgstr "Solutions"
+
+#: sugar_network_webui/templates/synchronize.html:17
+#: sugar_network_webui/templates/toolbar.html:57
+#: sugar_network_webui/templates/toolbar.html:70
+msgid "Reviews"
+msgstr "Reviews"
+
+#: sugar_network_webui/templates/synchronize.html:21
+#: sugar_network_webui/templates/upload-form.html:23
+msgid "Upload and share"
+msgstr "Upload and share"
+
+#: sugar_network_webui/templates/synchronize.html:36
+msgid ""
+"You need to be connected to the Internet or to a Sugar Network Node in "
+"order to sync."
+msgstr ""
+"You need to be connected to the Internet or to a Sugar Network Node in order "
+"to sync."
+
+#: sugar_network_webui/templates/synchronize.html:39
+msgid "Try to connect"
+msgstr "Try to connect"
+
+#: sugar_network_webui/templates/toolbar.html:8
+#: sugar_network_webui/templates/toolbar.html:43
msgid "Activities"
msgstr "Activities"
-#: app/templates/toolbar.html:9 app/templates/toolbar.html:47
+#: sugar_network_webui/templates/toolbar.html:9
+#: sugar_network_webui/templates/toolbar.html:44
msgid "Projects"
msgstr "Projects"
-#: app/templates/toolbar.html:10 app/templates/toolbar.html:49
-#: app/templates/toolbar.html:62 app/templates/toolbar.html:75
+#: sugar_network_webui/templates/toolbar.html:10
+#: sugar_network_webui/templates/toolbar.html:46
+#: sugar_network_webui/templates/toolbar.html:59
+#: sugar_network_webui/templates/toolbar.html:72
msgid "All"
msgstr "All"
-#: app/templates/toolbar.html:18
-msgid "connect with"
-msgstr "connect with"
+#: sugar_network_webui/templates/toolbar.html:18
+msgid "toggle connected"
+msgstr "toggle connected"
-#: app/templates/toolbar.html:41
+#: sugar_network_webui/templates/toolbar.html:38
msgid "context grid"
msgstr "context grid"
-#: app/templates/toolbar.html:53
+#: sugar_network_webui/templates/toolbar.html:50
msgid "resources list"
msgstr "resources list"
-#: app/templates/toolbar.html:57 app/templates/toolbar.html:70
+#: sugar_network_webui/templates/toolbar.html:54
+#: sugar_network_webui/templates/toolbar.html:67
msgid "Questions"
msgstr "Questions"
-#: app/templates/toolbar.html:58 app/templates/toolbar.html:71
+#: sugar_network_webui/templates/toolbar.html:55
+#: sugar_network_webui/templates/toolbar.html:68
msgid "Ideas"
msgstr "Ideas"
-#: app/templates/toolbar.html:59 app/templates/toolbar.html:72
+#: sugar_network_webui/templates/toolbar.html:56
+#: sugar_network_webui/templates/toolbar.html:69
msgid "Problems"
msgstr "Problems"
-#: app/templates/toolbar.html:60 app/templates/toolbar.html:73
-msgid "Reviews"
-msgstr "Reviews"
-
-#: app/templates/toolbar.html:66
+#: sugar_network_webui/templates/toolbar.html:63
msgid "artifacts list"
msgstr "artifacts list"
-#: app/templates/toolbar.html:81
+#: sugar_network_webui/templates/toolbar.html:76
+msgid "synchronize"
+msgstr "synchronize"
+
+#: sugar_network_webui/templates/toolbar.html:83
msgid "type to search contexts"
msgstr "type to search contexts"
-#: app/templates/toolbar.html:86
+#: sugar_network_webui/templates/toolbar.html:88
msgid "create new resource"
msgstr "create new resource"
-#: app/templates/toolbar.html:91
+#: sugar_network_webui/templates/toolbar.html:94
+msgid "reload"
+msgstr "reload"
+
+#: sugar_network_webui/templates/toolbar.html:99
msgid "create new context"
msgstr "create new context"
-#: app/templates/toolbar.html:96
-msgid "reload"
-msgstr "reload"
+#: sugar_network_webui/templates/toolbar.html:104
+msgid "about"
+msgstr "about"
-#: app/templates/upload-form.html:5
+#: sugar_network_webui/templates/upload-form.html:5
msgid "Upload an artifact: Share your work!"
msgstr "Upload an artifact: Share your work!"
-#: app/templates/upload-form.html:16
+#: sugar_network_webui/templates/upload-form.html:16
msgid "Please add a short description."
msgstr "Please add a short description."
-#: app/templates/upload-form.html:24
-msgid "Upload and share"
-msgstr "Upload and share"
+#: sugar_network_webui/templates/upload-form.html:28
+msgid "cc-by-sa.png"
+msgstr "cc-by-sa.png"
-#: app/templates/upload-form.html:27
+#: sugar_network_webui/templates/upload-form.html:30
msgid ""
-"You must use free licenses on everything you publish (conforming to Sugar"
-" Labs Licensing Policy)."
+"You are also promising us that you wrote this yourself, or copied it from"
+" a public domain or similar free resource. <b>Do not submit copyrighted "
+"work without permission!</b>"
msgstr ""
-"You must use free licenses on everything you publish (conforming to Sugar "
-"Labs Licensing Policy)."
+"You are also promising us that you wrote this yourself, or copied it from a "
+"public domain or similar free resource. <b>Do not submit copyrighted work "
+"without permission!</b>"
+
+#~ msgid "Offline contribution will be saved until synchronized."
+#~ msgstr "Offline contribution will be saved until synchronized."
+
+#~ msgid "contribute a review offline"
+#~ msgstr "contribute a review offline"
+
+#~ msgid ""
+#~ "You need to be connected to the Internet or to a Sugar Network Node in "
+#~ "order to upload a project."
+#~ msgstr ""
+#~ "You need to be connected to the Internet or to a Sugar Network Node in order "
+#~ "to upload a project."
+
+#~ msgid "Alpha Version"
+#~ msgstr "Alpha Version"
+
+#~ msgid ""
+#~ "For the time being you need to be connected to the Internet in order to "
+#~ "contribute!"
+#~ msgstr ""
+#~ "For the time being you need to be connected to the Internet in order to "
+#~ "contribute!"
+
+#~ msgid "Success"
+#~ msgstr "Success"
+
+#~ msgid ""
+#~ "\n"
+#~ "You've uploaded all resources shared in offline mode."
+#~ msgstr ""
+#~ "\n"
+#~ "You've uploaded all resources shared in offline mode."
+
+#~ msgid "Synchronization in progress..."
+#~ msgstr "Synchronization in progress..."
+
+#~ msgid "connect with"
+#~ msgstr "connect with"
+
+#~ msgid "About"
+#~ msgstr "About"
+
+#~ msgid "Failure reports"
+#~ msgstr "Failure reports"
+
+#~ msgid "can't contribute in offline mode yet"
+#~ msgstr "can't contribute in offline mode yet"
+
+#~ msgid ""
+#~ "You must use free licenses on everything you publish (conforming to Sugar"
+#~ " Labs Licensing Policy)."
+#~ msgstr ""
+#~ "You must use free licenses on everything you publish (conforming to Sugar "
+#~ "Labs Licensing Policy)."
#~ msgid "Article (optional)"
#~ msgstr "Article (optional)"
diff --git a/red-azucar.nja b/red-azucar.nja
deleted file mode 100644
index 99377da..0000000
--- a/red-azucar.nja
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "mainFile": "interactive.py",
- "venv": "",
- "relatedProjects": [],
- "name": "Red Az\u00facar",
- "license": "GNU General Public License v3",
- "url": "http://localhost:5000/",
- "pythonPath": "python",
- "preExecScript": "/usr/bin/sugar-network-service debug",
- "programParams": "",
- "PYTHONPATH": "",
- "supported-extensions": [
- ".py",
- ".html",
- ".jpg",
- ".png",
- ".ui",
- ".css",
- ".json",
- ".js",
- ".ini"
- ],
- "project-type": "Import from sources",
- "postExecScript": "",
- "description": ""
-} \ No newline at end of file
diff --git a/sugar_network_webui/app.py b/sugar_network_webui/app.py
index 1b07af6..93e6d6d 100644
--- a/sugar_network_webui/app.py
+++ b/sugar_network_webui/app.py
@@ -70,7 +70,7 @@ def event_stream():
@babel.localeselector
def get_locale():
global WWW
- if 'localhost' in request.host:
+ if ('localhost' in request.host) or ('127.0.0.1' in request.host):
# we're probably embedded, get locale from env
lang = locale.getdefaultlocale()[0].split('_')[0]
logging.debug('Locale from env: %s' % lang)
@@ -337,8 +337,8 @@ def artifact_copy(guid):
f.write(blob.read())
title = _('Artifact has been downloaded.')
body = _('Success!\n\n'
- 'File %s has been copied to your Documents folder.\n'
- 'You can access it from the Journal.' % filename)
+ 'File %(filename)s has been copied to your Documents folder.\n'
+ 'You can access it from the Journal.' , filename=filename)
return render_template('dialog.html', title=title, body=body)
@@ -593,7 +593,7 @@ def del_comment(resource_guid):
return "true"
@app.route('/_artifacts/<resource_guid>', methods=['DELETE'])
-def del_comment(resource_guid):
+def del_artifact(resource_guid):
g.client.Artifact.delete(resource_guid)
return "true"
@@ -833,7 +833,7 @@ def edit_resource():
@app.route('/submit_resource', methods=['POST'])
-def new_resource():
+def submit_resource():
for r_type in ('question', 'idea', 'problem'):
if request.form.get(r_type, None):
diff --git a/sugar_network_webui/cursors.py b/sugar_network_webui/cursors.py
index 7bd092b..52462b8 100644
--- a/sugar_network_webui/cursors.py
+++ b/sugar_network_webui/cursors.py
@@ -48,7 +48,6 @@ class Mount:
reply=['guid', 'title'],
order_by='-mtime')
self.Projects = self.client.Context.cursor(type='project',
- clone=clone,
reply=['guid', 'type', 'title', 'author', 'summary',
'description', 'favorite', 'clone', 'mtime'],
order_by='-mtime')
diff --git a/sugar_network_webui/objects.py b/sugar_network_webui/objects.py
index ec4befe..1ebd4f9 100644
--- a/sugar_network_webui/objects.py
+++ b/sugar_network_webui/objects.py
@@ -46,7 +46,7 @@ class Object(object):
@property
def is_author(self):
- return _uid in [i.get('guid') for i in self['author']]
+ return _uid in [(i.get('guid') or i.get('name')) for i in self['author']]
def get(self, prop):
if prop == 'guid':
diff --git a/sugar_network_webui/static/css/browser.css b/sugar_network_webui/static/css/browser.css
index b0c6cc7..2845dd7 100644
--- a/sugar_network_webui/static/css/browser.css
+++ b/sugar_network_webui/static/css/browser.css
@@ -468,8 +468,8 @@ img.action-button:hover {
background-color: #808080;
cursor:pointer;
}
-span.delete-artifact-button {
- float:right;
+span.delete-artifact-button img{
+ margin-top: 10px;
}
div.meta-column {
diff --git a/sugar_network_webui/templates/_context-artifact-list.html b/sugar_network_webui/templates/_context-artifact-list.html
index 65b89e9..ca79cf1 100644
--- a/sugar_network_webui/templates/_context-artifact-list.html
+++ b/sugar_network_webui/templates/_context-artifact-list.html
@@ -42,7 +42,7 @@
{{_('by %(author)s on %(date)s', author=sugar_nick, date=item['mtime']|timedelta)}}
{% endif %}
{%- if item.is_author -%}
- <span class="delete-artifact-button has_tooltip" title="{{_('delete')}}" data-guid="{{item['guid']}}">
+ <span class="delete-artifact-button has_tooltip_left" title="{{_('delete')}}" data-guid="{{item['guid']}}">
<img class="action-button" src="/static/icons/edit-delete.png"
onclick="delete_artifact('{{item['guid']}}')" ></img>
</span>
diff --git a/sugar_network_webui/templates/_context-resource-list.html b/sugar_network_webui/templates/_context-resource-list.html
index 527c8b2..b693408 100644
--- a/sugar_network_webui/templates/_context-resource-list.html
+++ b/sugar_network_webui/templates/_context-resource-list.html
@@ -80,7 +80,7 @@
</div>
<div id="mejorar-sistema">
<!--img onclick="location='/new/resource?cursor_offset={{context_offset}}'" class="toolbar-icon white-button" src="/static/icons/list-add.png" /-->
- <img onclick="location='/feedback/new?context={{context['guid']}}'" class="toolbar-icon white-button has_tooltip_left" title="{{_('New question, idea or problem')}}" src="/static/icons/list-add.png" />
+ <img id="mejorar-sistema-img" onclick="location='/feedback/new?context={{context['guid']}}'" class="toolbar-icon white-button has_tooltip_left" title="{{_('New question, idea or problem')}}" src="/static/icons/list-add.png" />
</div>
{%- if result %}
<div id='vpaginator'>
diff --git a/sugar_network_webui/templates/_context-review-list.html b/sugar_network_webui/templates/_context-review-list.html
index 5cae03d..fec033a 100644
--- a/sugar_network_webui/templates/_context-review-list.html
+++ b/sugar_network_webui/templates/_context-review-list.html
@@ -41,7 +41,7 @@
{%- endfor %}
</div>
{%- if item.is_author -%}
- <span class="comments-button has_tooltip"
+ <!--span class="comments-button has_tooltip"
title="{{_('edit')}}"
onclick='edit_resource("review",
"{{item["guid"]}}",
@@ -49,7 +49,7 @@
false)'>
<img src="/static/icons/toolbar-edit.png">
</img>
- </span>
+ </span-->
{%- endif -%}
<span class="comments-button has_tooltip"
title="{{_('comment')}}"
diff --git a/sugar_network_webui/templates/context-view.html b/sugar_network_webui/templates/context-view.html
index e02a525..2986572 100644
--- a/sugar_network_webui/templates/context-view.html
+++ b/sugar_network_webui/templates/context-view.html
@@ -70,19 +70,23 @@
</div>
</div>
<div id="accordion">
+ <h2>{{_('Summary')}}</h2>
+ <div class="pane" style="display:block">{{context['summary']}}</div>
+
<h2>{{_('Author(s)')}}</h2>
- <div class="pane" style="display:block">
+ <div class="pane">
{%- for author in context['author'] -%}
<div id="sugar-man">
<img class="grid-icon-regular" src="/static/icons/sugar-xo.png" />
- {{author['name']}}
+ {% if (session['connected'] or False) %}
+ {{author['name']}}
+ {% else %}
+ {{sugar_nick}}
+ {% endif %}
</div>
{%- endfor -%}
</div>
- <h2>{{_('Summary')}}</h2>
- <div class="pane">{{context['summary']}}</div>
-
<h2>{{_('License')}}</h2>
<div class="pane">{{_('Work in progress.')}}</div>
</div>
diff --git a/sugar_network_webui/templates/upload-form.html b/sugar_network_webui/templates/upload-form.html
index 635523a..3284692 100644
--- a/sugar_network_webui/templates/upload-form.html
+++ b/sugar_network_webui/templates/upload-form.html
@@ -7,7 +7,6 @@
<img id="cancel-button" class="button window-button" src="/static/icons/dialog-cancel.png" />
</div>
</div>
- {%- if (session['connected'] or False) -%}
<form id="resource-form1" method="POST" action="/artifacts/upload" enctype="multipart/form-data">
<div class="resource-form-field">
{{_('Context')}} : <img class="inline_images" src="/context/icon/{{context}}" /> {{session.get('last_context_title') or _('Sugar Network')}}
@@ -33,15 +32,6 @@
<br/>
</div>
</form>
- {%- else -%}
- <div class="resource-form-field">
- <br/>
- <br/>
- <b>{{_('Alpha Version')}}</b>
- <br/>
- {{_('For the time being you need to be connected to the Internet in order to contribute!')}}
- </div>
- {%- endif -%}
</div>
<script type="text/javascript">
$(function() {
diff --git a/sugar_network_webui/tests/__init__.py b/sugar_network_webui/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sugar_network_webui/tests/__init__.py
diff --git a/sugar_network_webui/tests/create_comment.html b/sugar_network_webui/tests/create_comment.html
new file mode 100644
index 0000000..3d358ef
--- /dev/null
+++ b/sugar_network_webui/tests/create_comment.html
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:10000/" />
+<title>comment_review</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">comment_review</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/resource/reviews?page=1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[4]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.comments-button + .comments-button&gt; img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>storeEval</td>
+ <td>new Date();</td>
+ <td>date</td>
+</tr>
+<tr>
+ <td>waitForEditable</td>
+ <td>id=textarea-comment</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=textarea-comment</td>
+ <td>comment ${date}</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.comment-button</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>comment ${date}</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>comment ${date}</td>
+ <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/sugar_network_webui/tests/create_project.html b/sugar_network_webui/tests/create_project.html
new file mode 100644
index 0000000..b6f6a5e
--- /dev/null
+++ b/sugar_network_webui/tests/create_project.html
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:10000/" />
+<title>create_project</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">create_project</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/context?page=1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>storeEval</td>
+ <td>new Date();</td>
+ <td>date</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='toolbar']/ul/li[7]/div/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=title</td>
+ <td>Autotest ${date}</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=summary</td>
+ <td>Automatic Test #1 Pass</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=edit-content</td>
+ <td>Create new project</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>id=accept-button</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Autotest ${date} </td>
+ <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/sugar_network_webui/tests/create_question.html b/sugar_network_webui/tests/create_question.html
new file mode 100644
index 0000000..2473e2b
--- /dev/null
+++ b/sugar_network_webui/tests/create_question.html
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:10000/" />
+<title>create_question</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">create_question</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/context/search/autotest?page=1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>css=img.question-icon.has_tooltip </td>
+ <td></td>
+</tr>
+<tr>
+ <td>storeEval</td>
+ <td>new Date();</td>
+ <td>date</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>css=#mejorar-sistema &gt; img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=title</td>
+ <td>Autotest ${date}</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=edit-content</td>
+ <td>Automatic Test #3 Create Question</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>name=question</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Autotest ${date}</td>
+ <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/sugar_network_webui/tests/create_review.html b/sugar_network_webui/tests/create_review.html
new file mode 100644
index 0000000..8557abc
--- /dev/null
+++ b/sugar_network_webui/tests/create_review.html
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:10000/" />
+<title>create_review</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">create_review</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/context/search/autotest?page=1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='resource-page-1']/div/a[4]/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>storeEval</td>
+ <td>new Date();</td>
+ <td>date</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=textarea-solution</td>
+ <td>Test #5 Create Review ${date}</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>id=contribute-button</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Test #5 Create Review ${date}</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/sugar_network_webui/tests/edit_project.html b/sugar_network_webui/tests/edit_project.html
new file mode 100644
index 0000000..ae4810a
--- /dev/null
+++ b/sugar_network_webui/tests/edit_project.html
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:10000/" />
+<title>edit_project</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">edit_project</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/context/search/autotest?page=1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>css=img.grid-icon</td>
+ <td></td>
+</tr>
+<tr>
+ <td>storeEval</td>
+ <td>new Date();</td>
+ <td>date</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>css=span.edit-context &gt; img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=title</td>
+ <td>Autotest ${date}</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=summary</td>
+ <td>Automatic Test #2 Pass</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=edit-content</td>
+ <td>Edit project OK</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>id=accept-button</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Autotest ${date} </td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/sugar_network_webui/tests/test_create_project.py b/sugar_network_webui/tests/test_create_project.py
new file mode 100644
index 0000000..4a53dc2
--- /dev/null
+++ b/sugar_network_webui/tests/test_create_project.py
@@ -0,0 +1,57 @@
+from selenium import webdriver
+from selenium.webdriver.common.by import By
+from selenium.webdriver.support.ui import Select
+from selenium.common.exceptions import NoSuchElementException
+import unittest, time, re
+import datetime
+
+class CreateProject(unittest.TestCase):
+ def setUp(self):
+ self.driver = webdriver.Firefox()
+ self.driver.implicitly_wait(30)
+ self.base_url = "http://network-devel.sugarlabs.org/"
+ self.verificationErrors = []
+ self.accept_next_alert = True
+
+ def test_create_project(self):
+ driver = self.driver
+ driver.get(self.base_url + "/context?page=1")
+ date = str(datetime.date.today())
+ driver.find_element_by_xpath("//div[@id='toolbar']/ul/li[7]/div/img").click()
+ driver.find_element_by_id("title").clear()
+ driver.find_element_by_id("title").send_keys("Autotest " + date)
+ driver.find_element_by_id("summary").clear()
+ driver.find_element_by_id("summary").send_keys("Automatic Test #1 Pass")
+ driver.find_element_by_id("edit-content").clear()
+ driver.find_element_by_id("edit-content").send_keys("Create new project")
+ driver.find_element_by_id("accept-button").click()
+ try: self.assertRegexpMatches(driver.find_element_by_css_selector("BODY").text, r"^[\s\S]*Autotest "+date+"[\s\S]*$")
+ except AssertionError as e: self.verificationErrors.append(str(e))
+
+ def is_element_present(self, how, what):
+ try: self.driver.find_element(by=how, value=what)
+ except NoSuchElementException, e: return False
+ return True
+
+ def is_alert_present(self):
+ try: self.driver.switch_to_alert()
+ except NoAlertPresentException, e: return False
+ return True
+
+ def close_alert_and_get_its_text(self):
+ try:
+ alert = self.driver.switch_to_alert()
+ alert_text = alert.text
+ if self.accept_next_alert:
+ alert.accept()
+ else:
+ alert.dismiss()
+ return alert_text
+ finally: self.accept_next_alert = True
+
+ def tearDown(self):
+ self.driver.quit()
+ self.assertEqual([], self.verificationErrors)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sugar_network_webui/tests/test_create_question.py b/sugar_network_webui/tests/test_create_question.py
new file mode 100644
index 0000000..4442132
--- /dev/null
+++ b/sugar_network_webui/tests/test_create_question.py
@@ -0,0 +1,58 @@
+from selenium import webdriver
+from selenium.webdriver.common.by import By
+from selenium.webdriver.support.ui import Select
+from selenium.common.exceptions import NoSuchElementException
+import unittest, time, re
+import datetime
+
+class CreateQuestion(unittest.TestCase):
+ def setUp(self):
+ self.driver = webdriver.Firefox()
+ self.driver.implicitly_wait(30)
+ self.base_url = "http://network-devel.sugarlabs.org/"
+ self.verificationErrors = []
+ self.accept_next_alert = True
+
+ def test_create_question(self):
+ driver = self.driver
+ driver.get(self.base_url + "/context/search/autotest?page=1")
+ actions = webdriver.ActionChains(driver)
+ actions.move_to_element(driver.find_element_by_css_selector(".grid-icon")).perform()
+ driver.find_element_by_css_selector("img.question-icon.has_tooltip").click()
+ date = str(datetime.date.today())
+ driver.find_element_by_css_selector("#mejorar-sistema > img").click()
+ driver.find_element_by_id("title").clear()
+ driver.find_element_by_id("title").send_keys("Autotest " + date)
+ driver.find_element_by_id("edit-content").clear()
+ driver.find_element_by_id("edit-content").send_keys("Automatic Test #3 Create Question")
+ driver.find_element_by_name("question").click()
+ try: self.assertRegexpMatches(driver.find_element_by_css_selector("BODY").text, r"^[\s\S]*Autotest "+date+"[\s\S]*$")
+ except AssertionError as e: self.verificationErrors.append(str(e))
+
+ def is_element_present(self, how, what):
+ try: self.driver.find_element(by=how, value=what)
+ except NoSuchElementException, e: return False
+ return True
+
+ def is_alert_present(self):
+ try: self.driver.switch_to_alert()
+ except NoAlertPresentException, e: return False
+ return True
+
+ def close_alert_and_get_its_text(self):
+ try:
+ alert = self.driver.switch_to_alert()
+ alert_text = alert.text
+ if self.accept_next_alert:
+ alert.accept()
+ else:
+ alert.dismiss()
+ return alert_text
+ finally: self.accept_next_alert = True
+
+ def tearDown(self):
+ self.driver.quit()
+ self.assertEqual([], self.verificationErrors)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sugar_network_webui/tests/test_edit_project.py b/sugar_network_webui/tests/test_edit_project.py
new file mode 100644
index 0000000..24ca534
--- /dev/null
+++ b/sugar_network_webui/tests/test_edit_project.py
@@ -0,0 +1,59 @@
+from selenium import webdriver
+from selenium.webdriver.common.by import By
+from selenium.webdriver.support.ui import Select
+from selenium.common.exceptions import NoSuchElementException
+import unittest, time, re
+import datetime
+
+class EditProject(unittest.TestCase):
+ def setUp(self):
+ self.driver = webdriver.Firefox()
+ self.driver.implicitly_wait(30)
+ self.base_url = "http://network-devel.sugarlabs.org/"
+ self.verificationErrors = []
+ self.accept_next_alert = True
+
+ def test_edit_project(self):
+ driver = self.driver
+ driver.get(self.base_url + "/context/search/autotest?page=1")
+ driver.find_element_by_css_selector("img.grid-icon").click()
+ date = str(datetime.date.today())
+ driver.find_element_by_css_selector("span.edit-context > img").click()
+ driver.find_element_by_id("title").clear()
+ driver.find_element_by_id("title").send_keys("Autotest " + date)
+ driver.find_element_by_id("summary").clear()
+ driver.find_element_by_id("summary").send_keys("Automatic Test #2 Pass")
+ driver.find_element_by_id("edit-content").clear()
+ driver.find_element_by_id("edit-content").send_keys("Edit project OK")
+ driver.find_element_by_id("accept-button").click()
+ # Warning: verifyTextPresent may require manual changes
+ try: self.assertRegexpMatches(driver.find_element_by_css_selector("BODY").text, r"^[\s\S]*Autotest "+date+"[\s\S]*$")
+ except AssertionError as e: self.verificationErrors.append(str(e))
+
+ def is_element_present(self, how, what):
+ try: self.driver.find_element(by=how, value=what)
+ except NoSuchElementException, e: return False
+ return True
+
+ def is_alert_present(self):
+ try: self.driver.switch_to_alert()
+ except NoAlertPresentException, e: return False
+ return True
+
+ def close_alert_and_get_its_text(self):
+ try:
+ alert = self.driver.switch_to_alert()
+ alert_text = alert.text
+ if self.accept_next_alert:
+ alert.accept()
+ else:
+ alert.dismiss()
+ return alert_text
+ finally: self.accept_next_alert = True
+
+ def tearDown(self):
+ self.driver.quit()
+ self.assertEqual([], self.verificationErrors)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sugar_network_webui/tests/upload_artifact.html b/sugar_network_webui/tests/upload_artifact.html
new file mode 100644
index 0000000..a294363
--- /dev/null
+++ b/sugar_network_webui/tests/upload_artifact.html
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:10000/" />
+<title>upload_artifact</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">upload_artifact</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/context/search/autotest?page=1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='resource-page-1']/div/a[6]/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>css=img.toolbar-icon.white-button</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name=artifact_file</td>
+ <td>/etc/motd</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name=content</td>
+ <td>test</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>id=submit</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/sugar_network_webui/tests/webui-tests.html b/sugar_network_webui/tests/webui-tests.html
new file mode 100644
index 0000000..7fed584
--- /dev/null
+++ b/sugar_network_webui/tests/webui-tests.html
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+ <title>Test Suite</title>
+</head>
+<body>
+<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
+<tr><td><b>Test Suite</b></td></tr>
+<tr><td><a href="create_project.html">create_project</a></td></tr>
+<tr><td><a href="edit_project.html">edit_project</a></td></tr>
+<tr><td><a href="create_question.html">create_question</a></td></tr>
+<tr><td><a href="upload_artifact.html">upload_artifact</a></td></tr>
+<tr><td><a href="create_review.html">create_review</a></td></tr>
+<tr><td><a href="create_comment.html">comment_review</a></td></tr>
+</tbody></table>
+</body>
+</html>
diff --git a/sugar_network_webui/translations/es/LC_MESSAGES/messages.mo b/sugar_network_webui/translations/es/LC_MESSAGES/messages.mo
index e163cff..f363514 100644
--- a/sugar_network_webui/translations/es/LC_MESSAGES/messages.mo
+++ b/sugar_network_webui/translations/es/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/sugar_network_webui/translations/es/LC_MESSAGES/messages.po b/sugar_network_webui/translations/es/LC_MESSAGES/messages.po
index 7dcc4b9..cd31434 100644
--- a/sugar_network_webui/translations/es/LC_MESSAGES/messages.po
+++ b/sugar_network_webui/translations/es/LC_MESSAGES/messages.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2013-05-22 01:40-0500\n"
+"POT-Creation-Date: 2013-05-29 01:01-0500\n"
"PO-Revision-Date: 2013-05-20 18:33-0500\n"
"Last-Translator: lv <laura@somosazucar.org>\n"
"Language-Team: es <LL@li.org>\n"
@@ -42,16 +42,15 @@ msgid "Artifact has been downloaded."
msgstr "Se ha descargado un archivo."
#: sugar_network_webui/app.py:339
-#, python-format
msgid ""
"Success!\n"
"\n"
-"File %s has been copied to your Documents folder.\n"
+"File %(filename)s has been copied to your Documents folder.\n"
"You can access it from the Journal."
msgstr ""
"¡Éxito!\n"
"\n"
-"El archivo %s ha sido copiado a tu carpeta de Documentos.\n"
+"El archivo %(filename)s ha sido copiado a tu carpeta de Documentos.\n"
"Puedes acceder a él desde el Diario."
#: sugar_network_webui/app.py:398
@@ -63,7 +62,7 @@ msgstr "cero resultados"
msgid "page %(page)s of %(total)s"
msgstr "página %(page)s de %(total)s"
-#: sugar_network_webui/app.py:439 sugar_network_webui/app.py:741
+#: sugar_network_webui/app.py:439 sugar_network_webui/app.py:746
#: sugar_network_webui/templates/_browser-grid.html:5
#: sugar_network_webui/templates/context-view.html:5
#: sugar_network_webui/templates/context-view.html:25
@@ -71,7 +70,7 @@ msgstr "página %(page)s de %(total)s"
msgid "questions"
msgstr "preguntas"
-#: sugar_network_webui/app.py:442 sugar_network_webui/app.py:744
+#: sugar_network_webui/app.py:442 sugar_network_webui/app.py:749
#: sugar_network_webui/templates/_browser-grid.html:11
#: sugar_network_webui/templates/context-view.html:11
#: sugar_network_webui/templates/context-view.html:31
@@ -79,7 +78,7 @@ msgstr "preguntas"
msgid "problems"
msgstr "problemas"
-#: sugar_network_webui/app.py:445 sugar_network_webui/app.py:747
+#: sugar_network_webui/app.py:445 sugar_network_webui/app.py:752
#: sugar_network_webui/templates/_browser-grid.html:8
#: sugar_network_webui/templates/context-view.html:8
#: sugar_network_webui/templates/context-view.html:28
@@ -87,7 +86,7 @@ msgstr "problemas"
msgid "ideas"
msgstr "ideas"
-#: sugar_network_webui/app.py:448 sugar_network_webui/app.py:675
+#: sugar_network_webui/app.py:448 sugar_network_webui/app.py:680
#: sugar_network_webui/templates/_browser-grid.html:14
#: sugar_network_webui/templates/_review-list.html:16
#: sugar_network_webui/templates/context-view.html:14
@@ -96,15 +95,15 @@ msgstr "ideas"
msgid "reviews"
msgstr "comentarios"
-#: sugar_network_webui/app.py:451 sugar_network_webui/app.py:751
+#: sugar_network_webui/app.py:451 sugar_network_webui/app.py:756
msgid "artifacts"
msgstr "archivos"
-#: sugar_network_webui/app.py:454 sugar_network_webui/app.py:754
+#: sugar_network_webui/app.py:454 sugar_network_webui/app.py:759
msgid "resources"
msgstr "recursos"
-#: sugar_network_webui/app.py:468 sugar_network_webui/app.py:763
+#: sugar_network_webui/app.py:468 sugar_network_webui/app.py:768
#, python-format
msgid "browsing %(total)s %(resource_label)s"
msgstr "navegando por %(total)s %(resource_label)s"
@@ -229,25 +228,30 @@ msgstr "disponible sin conexión"
msgid "favorite"
msgstr "favorito"
-#: sugar_network_webui/templates/_context-artifact-list.html:52
+#: sugar_network_webui/templates/_context-artifact-list.html:45
+#: sugar_network_webui/templates/_context-comment-list.html:17
+msgid "delete"
+msgstr "borrar"
+
+#: sugar_network_webui/templates/_context-artifact-list.html:58
#: sugar_network_webui/templates/_context-resource-list.html:52
#: sugar_network_webui/templates/_review-list.html:53
msgid "followers"
msgstr "seguidores"
-#: sugar_network_webui/templates/_context-artifact-list.html:55
+#: sugar_network_webui/templates/_context-artifact-list.html:61
#: sugar_network_webui/templates/_context-resource-list.html:55
#: sugar_network_webui/templates/_review-list.html:56
msgid "comments"
msgstr "comentarios"
-#: sugar_network_webui/templates/_context-artifact-list.html:58
+#: sugar_network_webui/templates/_context-artifact-list.html:64
#: sugar_network_webui/templates/_context-resource-list.html:58
#: sugar_network_webui/templates/_review-list.html:59
msgid "solutions"
msgstr "soluciones"
-#: sugar_network_webui/templates/_context-artifact-list.html:66
+#: sugar_network_webui/templates/_context-artifact-list.html:72
#: sugar_network_webui/templates/_context-resource-list.html:66
#, python-format
msgid ""
@@ -257,10 +261,6 @@ msgstr ""
"Aún no se han compartido %(resource)s en este contexto.<br><br>¡Se el "
"primero en aportar a la comunidad!"
-#: sugar_network_webui/templates/_context-comment-list.html:17
-msgid "delete"
-msgstr "borrar"
-
#: sugar_network_webui/templates/_context-comment-list.html:35
#: sugar_network_webui/templates/_context-comment-list.html:38
#: sugar_network_webui/templates/_context-review-list.html:55
@@ -341,29 +341,29 @@ msgstr "Nuevo recurso"
#: sugar_network_webui/templates/base.html:74
#: sugar_network_webui/templates/dialog_resource.html:18
-#: sugar_network_webui/templates/upload-form.html:13
+#: sugar_network_webui/templates/upload-form.html:12
msgid "Sugar Network"
msgstr "Red Azúcar"
#: sugar_network_webui/templates/base.html:85
#: sugar_network_webui/templates/base.html:139
#: sugar_network_webui/templates/base.html:199
-#: sugar_network_webui/templates/dialog_project.html:24
+#: sugar_network_webui/templates/dialog_project.html:21
#: sugar_network_webui/templates/dialog_resource.html:23
#: sugar_network_webui/templates/resource-form.html:21
msgid "Title"
msgstr "Título"
#: sugar_network_webui/templates/base.html:93
-#: sugar_network_webui/templates/context-view.html:83
-#: sugar_network_webui/templates/dialog_project.html:32
+#: sugar_network_webui/templates/context-view.html:87
+#: sugar_network_webui/templates/dialog_project.html:29
msgid "Summary"
msgstr "Resumen"
#: sugar_network_webui/templates/base.html:97
#: sugar_network_webui/templates/base.html:140
#: sugar_network_webui/templates/base.html:200
-#: sugar_network_webui/templates/dialog_project.html:36
+#: sugar_network_webui/templates/dialog_project.html:33
#: sugar_network_webui/templates/dialog_resource.html:33
#: sugar_network_webui/templates/resource-form.html:25
msgid "Details"
@@ -392,7 +392,6 @@ msgid "Edit resource"
msgstr "Editar recurso"
#: sugar_network_webui/templates/base.html:387
-#: sugar_network_webui/templates/dialog_project.html:44
#: sugar_network_webui/templates/synchronize.html:34
msgid "You are in offline mode"
msgstr "Estas en modo \"offline\""
@@ -403,7 +402,7 @@ msgstr "Estas en modo \"online\""
#: sugar_network_webui/templates/browser-view.html:72
#: sugar_network_webui/templates/browser-view.html:80
-#: sugar_network_webui/templates/context-view.html:243
+#: sugar_network_webui/templates/context-view.html:258
#: sugar_network_webui/templates/resource-list.html:111
msgid "page '+new_page+' of"
msgstr "página '+new_page+' de"
@@ -412,11 +411,11 @@ msgstr "página '+new_page+' de"
msgid "Author(s)"
msgstr "Autor(es)"
-#: sugar_network_webui/templates/context-view.html:86
+#: sugar_network_webui/templates/context-view.html:90
msgid "License"
msgstr "Licencia"
-#: sugar_network_webui/templates/context-view.html:87
+#: sugar_network_webui/templates/context-view.html:91
msgid "Work in progress."
msgstr "En construcción."
@@ -457,39 +456,26 @@ msgstr "Creando nuevo proyecto"
msgid "Editing project"
msgstr "Editando proyecto"
-#: sugar_network_webui/templates/dialog_project.html:46
-msgid ""
-"You need to be connected to the Internet or to a Sugar Network Node in "
-"order to upload a project."
-msgstr ""
-"Necesitas tener conección a Internet o a un nodo de la red Azúcar para "
-"crear un proyecto."
-
-#: sugar_network_webui/templates/dialog_project.html:48
-#: sugar_network_webui/templates/synchronize.html:39
-msgid "Try to connect"
-msgstr "Intentar conectar"
-
-#: sugar_network_webui/templates/dialog_project.html:54
+#: sugar_network_webui/templates/dialog_project.html:38
msgid "Must fill all fields."
msgstr "Es necesario llenar todos los campos."
-#: sugar_network_webui/templates/dialog_project.html:57
+#: sugar_network_webui/templates/dialog_project.html:41
#: sugar_network_webui/templates/dialog_resource.html:48
#: sugar_network_webui/templates/synchronize.html:24
msgid "cc-by-sa-full.png"
msgstr "cc-by-sa-full.png"
-#: sugar_network_webui/templates/dialog_project.html:58
+#: sugar_network_webui/templates/dialog_project.html:42
#: sugar_network_webui/templates/dialog_resource.html:49
#: sugar_network_webui/templates/synchronize.html:25
msgid "<b>Creative Commons Attribution Share-Alike License</b>"
msgstr "<b>Licencia Creative Commons Reconocimiento Compartir Igual</b>"
-#: sugar_network_webui/templates/dialog_project.html:59
+#: sugar_network_webui/templates/dialog_project.html:43
#: sugar_network_webui/templates/dialog_resource.html:50
#: sugar_network_webui/templates/synchronize.html:26
-#: sugar_network_webui/templates/upload-form.html:27
+#: sugar_network_webui/templates/upload-form.html:26
msgid ""
"Please note that all contributions to Sugar Labs are considered to be "
"released under the Attribution 3.0 Unported. If you do not want your "
@@ -502,7 +488,7 @@ msgstr ""
" ser modificada y distribuida libremente, por favor no las publiques "
"aquí. "
-#: sugar_network_webui/templates/dialog_project.html:61
+#: sugar_network_webui/templates/dialog_project.html:45
#: sugar_network_webui/templates/dialog_resource.html:52
#: sugar_network_webui/templates/synchronize.html:28
msgid ""
@@ -522,7 +508,7 @@ msgstr "Editando"
#: sugar_network_webui/templates/dialog_resource.html:18
#: sugar_network_webui/templates/resource-form.html:13
-#: sugar_network_webui/templates/upload-form.html:13
+#: sugar_network_webui/templates/upload-form.html:12
msgid "Context"
msgstr "Contexto"
@@ -577,7 +563,7 @@ msgid "Reviews"
msgstr "Comentarios"
#: sugar_network_webui/templates/synchronize.html:21
-#: sugar_network_webui/templates/upload-form.html:24
+#: sugar_network_webui/templates/upload-form.html:23
msgid "Upload and share"
msgstr "Cargar y compartir"
@@ -589,6 +575,10 @@ msgstr ""
"Necesitas estar conectado a Internet o a un nodo de la Red Azúcar para "
"poder sincronizar."
+#: sugar_network_webui/templates/synchronize.html:39
+msgid "Try to connect"
+msgstr "Intentar conectar"
+
#: sugar_network_webui/templates/toolbar.html:8
#: sugar_network_webui/templates/toolbar.html:43
msgid "Activities"
@@ -665,15 +655,15 @@ msgstr "Acerca de"
msgid "Upload an artifact: Share your work!"
msgstr "Carga un archivo: ¡Comparte tu trabajo!"
-#: sugar_network_webui/templates/upload-form.html:17
+#: sugar_network_webui/templates/upload-form.html:16
msgid "Please add a short description."
msgstr "Porfavor incluye una breve descripción."
-#: sugar_network_webui/templates/upload-form.html:29
+#: sugar_network_webui/templates/upload-form.html:28
msgid "cc-by-sa.png"
msgstr "cc-by-sa.png"
-#: sugar_network_webui/templates/upload-form.html:31
+#: sugar_network_webui/templates/upload-form.html:30
msgid ""
"You are also promising us that you wrote this yourself, or copied it from"
" a public domain or similar free resource. <b>Do not submit copyrighted "
@@ -683,21 +673,21 @@ msgstr ""
"público u otro recurso similar libre.<b> Por favor no envies material con"
" licencias no libres!</b>"
-#: sugar_network_webui/templates/upload-form.html:40
-msgid "Alpha Version"
-msgstr "Versión Alfa"
-
-#: sugar_network_webui/templates/upload-form.html:42
-msgid ""
-"For the time being you need to be connected to the Internet in order to "
-"contribute!"
-msgstr "¡Por ahora es necesario tener conexión para contribuir!"
-
-#~ msgid "Offline contribution will be saved until synchronized."
+#~ msgid ""
+#~ "You need to be connected to the"
+#~ " Internet or to a Sugar Network "
+#~ "Node in order to upload a project."
#~ msgstr ""
-#~ "Contribuciones \"offline\" serán guardadas "
-#~ "hasta próxima sincronización."
-
-#~ msgid "contribute a review offline"
-#~ msgstr "aportar un comentario \"offline\""
+#~ "Necesitas tener conección a Internet o"
+#~ " a un nodo de la red Azúcar "
+#~ "para crear un proyecto."
+
+#~ msgid "Alpha Version"
+#~ msgstr "Versión Alfa"
+
+#~ msgid ""
+#~ "For the time being you need to "
+#~ "be connected to the Internet in "
+#~ "order to contribute!"
+#~ msgstr "¡Por ahora es necesario tener conexión para contribuir!"
diff --git a/test b/test
new file mode 100755
index 0000000..1c8a2dd
--- /dev/null
+++ b/test
@@ -0,0 +1 @@
+curl http://tests.somosazucar.org/git/notifyCommit?url=git://git.sugarlabs.org/network/webui.git