You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/07/02 17:09:25 UTC

[10/23] allura git commit: [#7885] Added tooltips to admin form fields

[#7885] Added tooltips to admin form fields


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/0edad6ef
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/0edad6ef
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/0edad6ef

Branch: refs/heads/hs/7894
Commit: 0edad6efbcf2dd66a4066343a2cff90046bab472
Parents: 85eec26
Author: Heith Seewald <hs...@slashdotmedia.com>
Authored: Tue Jun 9 16:23:51 2015 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon Jun 29 18:25:52 2015 +0000

----------------------------------------------------------------------
 Allura/allura/ext/admin/widgets.py | 25 ++++++++++++++++++++-----
 Allura/allura/lib/widgets/forms.py |  4 ++++
 2 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/0edad6ef/Allura/allura/ext/admin/widgets.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/widgets.py b/Allura/allura/ext/admin/widgets.py
index 0d5cae9..0f7d33d 100644
--- a/Allura/allura/ext/admin/widgets.py
+++ b/Allura/allura/ext/admin/widgets.py
@@ -150,7 +150,14 @@ class ScreenshotAdmin(ff.ForgeForm):
         fields = [
             ew.InputField(name='screenshot', field_type='file',
                           label='New Screenshot'),
-            ew.InputField(name='caption', field_type="text", label='Caption')
+            ew.InputField(name='caption',
+                          field_type="text",
+                          label='Caption',
+                          attrs={
+                              'title': "Reuse your project name in screenshot file names and create a caption to briefly describe each screenshot.",
+                              'class': 'tooltip',
+                          }
+                          )
         ]
         return fields
 
@@ -176,18 +183,26 @@ class MetadataAdmin(ff.AdminForm):
                              validator=formencode.All(
                                  fev.UnicodeString(not_empty=True, max=40),
                                  V.MaxBytesValidator(max=40)),
-                             attrs=dict(maxlength=40,
-                                        title="This is the publicly viewable name of the project, and will appear on project listings. It should be what you want to see as the project title in search listing."))
+                             attrs={'maxlength': 40,
+                                    'title': "This is the publicly viewable name of the project, and will appear on project listings. It should be what you want to see as the project title in search listing.",
+                                    'class': 'tooltip',
+                                    })
         summary = ew.InputField(field_type="text", label='Short Summary',
                                 validator=formencode.All(
                                     fev.UnicodeString(max=70),
                                     V.MaxBytesValidator(max=70)),
-                                attrs=dict(maxlength=70))
+                                attrs={'maxlength': 70,
+                                       'title': 'Briefly state what your project is and what it does without repeating the project name. This summary appears in Google search results beneath the project name.',
+                                       'class': 'tooltip',
+                                       })
         short_description = ew.TextArea(label='Full Description',
                                         validator=formencode.All(
                                             fev.UnicodeString(max=1000),
                                             V.MaxBytesValidator(max=1000)),
-                                        attrs=dict(title="Add a few paragraphs describing your project to new users."))
+                                        attrs={
+                                            'title': 'Describe the full functionality of your project using related keywords. The first sentence has the most impact on search. Provide unique content that calls out keywords and describes the merits of your project.',
+                                            'class': 'tooltip'
+                                        })
         # Apparently, child field must be CompoundField with custom template
         # for SortableRepeatedField to work properly, that's why FeaturesField
         # is not just ew.TextField

http://git-wip-us.apache.org/repos/asf/allura/blob/0edad6ef/Allura/allura/lib/widgets/forms.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/forms.py b/Allura/allura/lib/widgets/forms.py
index 714a32b..f523208 100644
--- a/Allura/allura/lib/widgets/forms.py
+++ b/Allura/allura/lib/widgets/forms.py
@@ -947,6 +947,10 @@ class NeighborhoodAddProjectForm(ForgeForm):
                           ),
             ew.InputField(name='project_unixname',
                           label='Short Name', field_type='text',
+                          attrs={
+                              'title': 'Create a URL name that matches your project name as closely as possible to improve search indexing and maximize visibility.',
+                              'class': 'tooltip'
+                          },
                           validator=provider.shortname_validator),
             ew.CheckboxSet(name='tools', options=tools_options),
         ])