Task description:
Background
The Style Guide module for Drupal provides a visual testing page for Drupal themes. Quickly compare the display of common elements across installed Drupal themes, and verify that selected themes addresses all common style elements.
Be sure to use the latest version of HEAD, which incorporates the changes in #949070: Create plugins for Style Guide module [Task 1].
Preparation
-- Download and install Drupal 7.
-- Visit the 'Appearance' page in the administration interface to find the Style Guide links.
New plugins
Using the API (styleguide.api.php, in the module download), create a patch to styleguide.styleguide.inc or a custom module include that adds preview elements only when optional core modules are enabled:
[Task 4: 8 hrs]
-- Search (4 hrs)
--- theme_search_block_form()
--- theme_search_result()
--- theme_search_results()
-- theme_breadcrumb() (1 hr)
-- theme_confim_form() (1 hr)
-- theme_filter_tips() (2 hrs)
Deliverables:
-- Patch(es) to include the desired features to the Style Guide module.
Resources:
Style Guide module: Style guide module
Primary contact:
Estimated time: 8 hours
Comment | File | Size | Author |
---|---|---|---|
#7 | 989072-update2.patch | 4.11 KB | chalet16 |
#5 | 989072-update.patch | 4.1 KB | chalet16 |
#4 | Picture 1.png | 17.89 KB | agentrickard |
#3 | 989072-filter.patch | 4.05 KB | agentrickard |
#2 | 989072.patch | 3.51 KB | chalet16 |
Comments
Comment #1
agentrickardTagging.
Comment #2
chalet16 CreditAttribution: chalet16 commentedtheme_search_result is a child of theme_search_results so I haven't create a style guide for theme_search_result. But then I create a guide for search results with and without results instead.
Comment #3
agentrickardThis is very close. More great stuff here.
I moved the filter functions into filter.inc, mainly for consistency. I'd also like to see a display for this element of the Filter tips (see attached), which is shown below text input fields.
I put in a comment that we could just add that to the existing form textarea, or have it stand-alone. I think stand-alone might be better. Not really certain.
The search stuff is great. Very creative solution.
Comment #4
agentrickardForgot the file.
Comment #5
chalet16 CreditAttribution: chalet16 commentedUpdated
Comment #6
agentrickardNotice: Undefined index: #value in theme_textarea() (line 3703 of /Applications/MAMP/htdocs/drupal-cvs/includes/form.inc).
Looks like it's complaining because the textarea has no value passed to it.
Comment #7
chalet16 CreditAttribution: chalet16 commentedSorry, I hadn't seen that message. Updated!
Comment #8
agentrickardIt's probably a PHP 5.3 or strict error.
Sweet. The form snippet even works to swap the descriptions if you change the select value.
Committed and approved.