Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_ct_event
Commits
67ee3ee9
Commit
67ee3ee9
authored
Sep 20, 2016
by
Eric Bremner
Browse files
RT#543388: Fixing events view.
parent
a6dbd324
Changes
6
Hide whitespace changes
Inline
Side-by-side
templates/node--uw-event.tpl.php
View file @
67ee3ee9
...
...
@@ -78,37 +78,52 @@
* @see template_process()
*/
?>
<?php
global
$base_url
;
$feed_url
=
$base_url
.
"/events/ical/"
.
$node
->
nid
.
"/calendar.ics"
;
$img_variables
=
array
(
//'path' => path_to_theme() . '/images/add-calendar-icon-33x20.png',
'path'
=>
base_path
()
.
drupal_get_path
(
'module'
,
'uw_ct_event'
)
.
'/css/images/add-calendar-icon-33x20.png'
,
'alt'
=>
'Export this event to calendar'
,
'title'
=>
'Export this event to calendar'
,
'width'
=>
'33'
,
'height'
=>
'20'
,
);
?>
<h1>
<?php
print
$title
;
?>
<a
class=
"individual-event-ical"
href=
"
<?php
print
$feed_url
;
?>
"
>
<?php
print
theme
(
'image'
,
$img_variables
);
?>
</a></h1>
<div
class=
"clearfix"
<?php
print
$attributes
;
?>
>
<div
class=
"event-content"
<?php
print
$content_attributes
;
?>
>
<?php
if
(
!
$page
)
:
?>
<?php
print
render
(
$title_prefix
);
?>
<?php
print
render
(
$title_suffix
);
?>
<?php
global
$base_url
;
$feed_url
=
$base_url
.
"/events/ical/"
.
$node
->
nid
.
"/calendar.ics"
;
$img_variables
=
array
(
'path'
=>
base_path
()
.
drupal_get_path
(
'module'
,
'uw_ct_event'
)
.
'/css/images/add-calendar-icon-33x20.png'
,
'alt'
=>
'Export this event to calendar'
,
'title'
=>
'Export this event to calendar'
,
'width'
=>
'33'
,
'height'
=>
'20'
,
);
?>
<?php
if
(
!
$teaser
)
:
?>
<h1>
<?php
print
$title
;
?>
<a
class=
"individual-event-ical"
href=
"
<?php
print
$feed_url
;
?>
"
>
<?php
print
theme
(
'image'
,
$img_variables
);
?>
</a></h1>
<?php
endif
;
?>
<?php
print
render
(
$content
[
'field_event_date'
]);
?>
<?php
print
render
(
$content
[
'body'
]);
?>
<div
class=
"clearfix"
<?php
print
$attributes
;
?>
>
<div
class=
"event-content"
<?php
print
$content_attributes
;
?>
>
<?php
if
(
!
$page
)
:
?>
<?php
print
render
(
$title_prefix
);
?>
<?php
print
render
(
$title_suffix
);
?>
<?php
endif
;
?>
<
div
class=
"details"
>
<
?php
if
(
$teaser
)
:
?
>
<?php
// We hide the comments and links now so that we can render them later.
hide
(
$content
[
'comments'
]);
hide
(
$content
[
'links'
]);
print
render
(
$content
[
'field_event_date'
]);
print
render
(
$content
[
'title_field'
]);
$content
[
'body'
][
0
][
'#markup'
]
=
uw_ct_web_page_filter_summary
(
$content
[
'body'
][
'#items'
][
0
]);
hide
(
$content
[
'title_field'
]);
hide
(
$content
[
'field_blog_date'
]);
print
render
(
$content
);
?>
</div>
?>
<?php
else
:
?>
<?php
print
render
(
$content
[
'field_event_date'
]);
?>
<?php
print
render
(
$content
[
'body'
]);
?>
<div
class=
"details"
>
<?php
// We hide the comments and links now so that we can render them later.
hide
(
$content
[
'comments'
]);
hide
(
$content
[
'links'
]);
print
render
(
$content
);
?>
</div>
<?php
endif
;
?>
</div>
<?php
print
render
(
$content
[
'links'
]);
?>
</div>
uw_ct_event.features.field_base.inc
View file @
67ee3ee9
...
...
@@ -10,7 +10,7 @@
function
uw_ct_event_field_default_field_bases
()
{
$field_bases
=
array
();
// Exported field_base: 'field_event_cost'
// Exported field_base: 'field_event_cost'
.
$field_bases
[
'field_event_cost'
]
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
...
...
@@ -35,7 +35,7 @@ function uw_ct_event_field_default_field_bases() {
'type'
=>
'text'
,
);
// Exported field_base: 'field_event_date'
// Exported field_base: 'field_event_date'
.
$field_bases
[
'field_event_date'
]
=
array
(
'active'
=>
1
,
'cardinality'
=>
-
1
,
...
...
@@ -71,7 +71,7 @@ function uw_ct_event_field_default_field_bases() {
'type'
=>
'date'
,
);
// Exported field_base: 'field_event_host_link'
// Exported field_base: 'field_event_host_link'
.
$field_bases
[
'field_event_host_link'
]
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
...
...
@@ -104,7 +104,7 @@ function uw_ct_event_field_default_field_bases() {
'type'
=>
'link_field'
,
);
// Exported field_base: 'field_event_location'
// Exported field_base: 'field_event_location'
.
$field_bases
[
'field_event_location'
]
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
...
...
@@ -192,7 +192,7 @@ function uw_ct_event_field_default_field_bases() {
'type'
=>
'location'
,
);
// Exported field_base: 'field_event_map_link'
// Exported field_base: 'field_event_map_link'
.
$field_bases
[
'field_event_map_link'
]
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
...
...
@@ -222,7 +222,7 @@ function uw_ct_event_field_default_field_bases() {
'type'
=>
'link_field'
,
);
// Exported field_base: 'field_event_moreinfo_link'
// Exported field_base: 'field_event_moreinfo_link'
.
$field_bases
[
'field_event_moreinfo_link'
]
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
...
...
@@ -252,7 +252,7 @@ function uw_ct_event_field_default_field_bases() {
'type'
=>
'link_field'
,
);
// Exported field_base: 'field_uw_event_tag'
// Exported field_base: 'field_uw_event_tag'
.
$field_bases
[
'field_uw_event_tag'
]
=
array
(
'active'
=>
1
,
'cardinality'
=>
-
1
,
...
...
@@ -283,7 +283,7 @@ function uw_ct_event_field_default_field_bases() {
'type'
=>
'taxonomy_term_reference'
,
);
// Exported field_base: 'field_uw_event_type'
// Exported field_base: 'field_uw_event_type'
.
$field_bases
[
'field_uw_event_type'
]
=
array
(
'active'
=>
1
,
'cardinality'
=>
-
1
,
...
...
uw_ct_event.features.field_instance.inc
View file @
67ee3ee9
...
...
@@ -77,7 +77,7 @@ function uw_ct_event_field_default_field_instances() {
'trim_length'
=>
600
,
),
'type'
=>
'text_summary_or_trimmed'
,
'weight'
=>
0
,
'weight'
=>
3
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -196,7 +196,7 @@ function uw_ct_event_field_default_field_instances() {
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'weight'
=>
12
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -276,7 +276,7 @@ function uw_ct_event_field_default_field_instances() {
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'weight'
=>
1
0
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -385,9 +385,18 @@ function uw_ct_event_field_default_field_instances() {
'weight'
=>
1
,
),
'teaser'
=>
array
(
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'label'
=>
'hidden'
,
'module'
=>
'date'
,
'settings'
=>
array
(
'format_type'
=>
'long'
,
'fromto'
=>
'both'
,
'multiple_from'
=>
''
,
'multiple_number'
=>
''
,
'multiple_to'
=>
''
,
'show_remaining_days'
=>
FALSE
,
'show_repeat_rule'
=>
'show'
,
),
'type'
=>
'date_default'
,
'weight'
=>
0
,
),
),
...
...
@@ -471,7 +480,7 @@ function uw_ct_event_field_default_field_instances() {
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'weight'
=>
11
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -557,10 +566,20 @@ function uw_ct_event_field_default_field_instances() {
'weight'
=>
0
,
),
'teaser'
=>
array
(
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'label'
=>
'hidden'
,
'module'
=>
'colorbox'
,
'settings'
=>
array
(
'colorbox_caption'
=>
'auto'
,
'colorbox_caption_custom'
=>
''
,
'colorbox_gallery'
=>
'post'
,
'colorbox_gallery_custom'
=>
''
,
'colorbox_image_style'
=>
''
,
'colorbox_multivalue_index'
=>
NULL
,
'colorbox_node_style'
=>
''
,
'colorbox_node_style_first'
=>
''
,
),
'type'
=>
'colorbox'
,
'weight'
=>
2
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -704,7 +723,7 @@ function uw_ct_event_field_default_field_instances() {
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'weight'
=>
9
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -781,7 +800,7 @@ function uw_ct_event_field_default_field_instances() {
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'weight'
=>
8
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -877,7 +896,7 @@ https://uwaterloo.ca/<event details web page>).',
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'weight'
=>
5
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -962,7 +981,7 @@ https://uwaterloo.ca/<event details web page>).',
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'weight'
=>
6
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -1081,7 +1100,7 @@ https://uwaterloo.ca/<event details web page>).',
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'weight'
=>
7
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -1202,11 +1221,11 @@ https://uwaterloo.ca/<event details web page>).',
'weight'
=>
0
,
),
'teaser'
=>
array
(
'label'
=>
'
inline
'
,
'label'
=>
'
hidden
'
,
'module'
=>
'taxonomy'
,
'settings'
=>
array
(),
'type'
=>
'taxonomy_term_reference_link'
,
'weight'
=>
1
,
'weight'
=>
4
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -1265,7 +1284,7 @@ https://uwaterloo.ca/<event details web page>).',
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
6
,
'weight'
=>
13
,
),
),
'entity_type'
=>
'node'
,
...
...
@@ -1319,10 +1338,15 @@ https://uwaterloo.ca/<event details web page>).',
'weight'
=>
0
,
),
'teaser'
=>
array
(
'label'
=>
'above'
,
'settings'
=>
array
(),
'type'
=>
'hidden'
,
'weight'
=>
0
,
'label'
=>
'hidden'
,
'module'
=>
'title'
,
'settings'
=>
array
(
'title_class'
=>
''
,
'title_link'
=>
'content'
,
'title_style'
=>
'h2'
,
),
'type'
=>
'title_linked'
,
'weight'
=>
1
,
),
),
'entity_type'
=>
'node'
,
...
...
uw_ct_event.field_group.inc
View file @
67ee3ee9
...
...
@@ -8,7 +8,7 @@
* Implements hook_field_group_info().
*/
function
uw_ct_event_field_group_info
()
{
$
export
=
array
();
$
field_groups
=
array
();
$field_group
=
new
stdClass
();
$field_group
->
disabled
=
FALSE
;
/* Edit this to true to make a default field_group disabled initially */
...
...
@@ -38,7 +38,7 @@ function uw_ct_event_field_group_info() {
'formatter'
=>
'collapsible'
,
),
);
$
export
[
'group_links|node|uw_event|form'
]
=
$field_group
;
$
field_groups
[
'group_links|node|uw_event|form'
]
=
$field_group
;
$field_group
=
new
stdClass
();
$field_group
->
disabled
=
FALSE
;
/* Edit this to true to make a default field_group disabled initially */
...
...
@@ -67,7 +67,7 @@ function uw_ct_event_field_group_info() {
'formatter'
=>
'collapsible'
,
),
);
$
export
[
'group_location|node|uw_event|form'
]
=
$field_group
;
$
field_groups
[
'group_location|node|uw_event|form'
]
=
$field_group
;
$field_group
=
new
stdClass
();
$field_group
->
disabled
=
FALSE
;
/* Edit this to true to make a default field_group disabled initially */
...
...
@@ -95,7 +95,7 @@ function uw_ct_event_field_group_info() {
'formatter'
=>
'collapsed'
,
),
);
$
export
[
'group_upload_file|node|uw_event|form'
]
=
$field_group
;
$
field_groups
[
'group_upload_file|node|uw_event|form'
]
=
$field_group
;
$field_group
=
new
stdClass
();
$field_group
->
disabled
=
FALSE
;
/* Edit this to true to make a default field_group disabled initially */
...
...
@@ -123,7 +123,7 @@ function uw_ct_event_field_group_info() {
'formatter'
=>
'collapsed'
,
),
);
$
export
[
'group_upload|node|uw_event|form'
]
=
$field_group
;
$
field_groups
[
'group_upload|node|uw_event|form'
]
=
$field_group
;
$field_group
=
new
stdClass
();
$field_group
->
disabled
=
FALSE
;
/* Edit this to true to make a default field_group disabled initially */
...
...
@@ -153,7 +153,15 @@ function uw_ct_event_field_group_info() {
'formatter'
=>
'collapsible'
,
),
);
$
export
[
'group_uw_event_tags|node|uw_event|form'
]
=
$field_group
;
$
field_groups
[
'group_uw_event_tags|node|uw_event|form'
]
=
$field_group
;
return
$export
;
// Translatables
// Included for use with string extractors like potx.
t
(
'Additional information'
);
t
(
'Event location'
);
t
(
'Taxonomies'
);
t
(
'Upload a file'
);
t
(
'Upload an image'
);
return
$field_groups
;
}
uw_ct_event.info
View file @
67ee3ee9
...
...
@@ -4,6 +4,7 @@ core = 7.x
package
=
uWaterloo
Content
Types
dependencies
[]
=
better_formats
dependencies
[]
=
calendar
dependencies
[]
=
colorbox
dependencies
[]
=
composite_views_filter
dependencies
[]
=
context
dependencies
[]
=
ctools
...
...
uw_ct_event.views_default.inc
View file @
67ee3ee9
...
...
@@ -1634,8 +1634,8 @@ echo uw_ct_web_page_filter_summary($data->field_body);
$handler
->
display
->
display_options
[
'pager'
][
'type'
]
=
'date_views_pager'
;
$handler
->
display
->
display_options
[
'pager'
][
'options'
][
'link_format'
]
=
'clean'
;
$handler
->
display
->
display_options
[
'style_plugin'
]
=
'default'
;
$handler
->
display
->
display_options
[
'row_plugin'
]
=
'
fields
'
;
$handler
->
display
->
display_options
[
'row_options'
][
'
default_field_element
s'
]
=
FALSE
;
$handler
->
display
->
display_options
[
'row_plugin'
]
=
'
node
'
;
$handler
->
display
->
display_options
[
'row_options'
][
'
link
s'
]
=
FALSE
;
/* Field: Content: Title */
$handler
->
display
->
display_options
[
'fields'
][
'title'
][
'id'
]
=
'title'
;
$handler
->
display
->
display_options
[
'fields'
][
'title'
][
'table'
]
=
'node'
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment