forked from warmshowers/Warmshowers.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add views templates for dual feedback view
Discussed with randy a transition to one page with both feedback received and given for a user. These templates provide clarity using the member's name and link down the page with an anchor to also help with usability. I've exported the view and loaded it into the live site for testing as it will not be live immediately, but will require some link changes
- Loading branch information
1 parent
69501ae
commit 4997893
Showing
2 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
...ll/themes/dev/warmshowers_zen/templates/views-view--member-feedback--attachment-1.tpl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
/** | ||
* @file views-view.tpl.php | ||
* Main view template | ||
* | ||
* Variables available: | ||
* - $classes_array: An array of classes determined in | ||
* template_preprocess_views_view(). Default classes are: | ||
* .view | ||
* .view-[css_name] | ||
* .view-id-[view_name] | ||
* .view-display-id-[display_name] | ||
* .view-dom-id-[dom_id] | ||
* - $classes: A string version of $classes_array for use in the class attribute | ||
* - $css_name: A css-safe version of the view name. | ||
* - $css_class: The user-specified classes names, if any | ||
* - $header: The view header | ||
* - $footer: The view footer | ||
* - $rows: The results of the view query, if any | ||
* - $empty: The empty text to display if the view is empty | ||
* - $pager: The pager next/prev links to display, if any | ||
* - $exposed: Exposed widget form/info to display | ||
* - $feed_icon: Feed icon to display, if any | ||
* - $more: A link to view more, if any | ||
* - $admin_links: A rendered list of administrative links | ||
* - $admin_links_raw: A list of administrative links suitable for theme('links') | ||
* | ||
* @ingroup views_templates | ||
*/ | ||
?> | ||
<div class="<?php print $classes; ?>"> | ||
<?php if ($admin_links): ?> | ||
<div class="views-admin-links views-hide"> | ||
<?php print $admin_links; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php | ||
$account = user_load($view->args[0]); | ||
?> | ||
|
||
<h1 id="feedback_given">Feedback given by <?php echo $account->fullname; ?></h1> | ||
<?php if ($exposed): ?> | ||
<div class="view-filters"> | ||
<?php print $exposed; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($attachment_before): ?> | ||
<div class="attachment attachment-before"> | ||
<?php print $attachment_before; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($rows): ?> | ||
<div class="view-content"> | ||
<?php print $rows; ?> | ||
</div> | ||
<?php elseif ($empty): ?> | ||
<div class="view-empty"> | ||
<?php print $empty; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($pager): ?> | ||
<?php print $pager; ?> | ||
<?php endif; ?> | ||
|
||
<?php if ($attachment_after): ?> | ||
<div class="attachment attachment-after"> | ||
<?php print $attachment_after; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($more): ?> | ||
<?php print $more; ?> | ||
<?php endif; ?> | ||
|
||
<?php if ($footer): ?> | ||
<div class="view-footer"> | ||
<?php print $footer; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($feed_icon): ?> | ||
<div class="feed-icon"> | ||
<?php print $feed_icon; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
</div> <?php /* class view */ ?> |
96 changes: 96 additions & 0 deletions
96
sites/all/themes/dev/warmshowers_zen/templates/views-view--member-feedback--page-1.tpl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?php | ||
/** | ||
* @file views-view.tpl.php | ||
* Main view template | ||
* | ||
* Variables available: | ||
* - $classes_array: An array of classes determined in | ||
* template_preprocess_views_view(). Default classes are: | ||
* .view | ||
* .view-[css_name] | ||
* .view-id-[view_name] | ||
* .view-display-id-[display_name] | ||
* .view-dom-id-[dom_id] | ||
* - $classes: A string version of $classes_array for use in the class attribute | ||
* - $css_name: A css-safe version of the view name. | ||
* - $css_class: The user-specified classes names, if any | ||
* - $header: The view header | ||
* - $footer: The view footer | ||
* - $rows: The results of the view query, if any | ||
* - $empty: The empty text to display if the view is empty | ||
* - $pager: The pager next/prev links to display, if any | ||
* - $exposed: Exposed widget form/info to display | ||
* - $feed_icon: Feed icon to display, if any | ||
* - $more: A link to view more, if any | ||
* - $admin_links: A rendered list of administrative links | ||
* - $admin_links_raw: A list of administrative links suitable for theme('links') | ||
* | ||
* @ingroup views_templates | ||
*/ | ||
?> | ||
<div class="<?php print $classes; ?>"> | ||
<?php if ($admin_links): ?> | ||
<div class="views-admin-links views-hide"> | ||
<?php print $admin_links; ?> | ||
</div> | ||
<?php endif; ?> | ||
<?php if ($header): ?> | ||
<?php | ||
$account = user_load($view->args[0]); | ||
?> | ||
<div class="view-header"> | ||
<?php print $header; ?> | ||
<a href="#feedback_given">View feedback</a> <?php echo $account->fullname; ?> has given. | ||
</div> | ||
<?php endif; ?> | ||
|
||
<h1>Feedback received by <?php echo $account->fullname; ?></h1> | ||
<?php if ($exposed): ?> | ||
<div class="view-filters"> | ||
<?php print $exposed; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($attachment_before): ?> | ||
<div class="attachment attachment-before"> | ||
<?php print $attachment_before; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($rows): ?> | ||
<div class="view-content"> | ||
<?php print $rows; ?> | ||
</div> | ||
<?php elseif ($empty): ?> | ||
<div class="view-empty"> | ||
<?php print $empty; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($pager): ?> | ||
<?php print $pager; ?> | ||
<?php endif; ?> | ||
|
||
<?php if ($attachment_after): ?> | ||
<div class="attachment attachment-after"> | ||
<?php print $attachment_after; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($more): ?> | ||
<?php print $more; ?> | ||
<?php endif; ?> | ||
|
||
<?php if ($footer): ?> | ||
<div class="view-footer"> | ||
<?php print $footer; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($feed_icon): ?> | ||
<div class="feed-icon"> | ||
<?php print $feed_icon; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
</div> <?php /* class view */ ?> |