File tree Expand file tree Collapse file tree 3 files changed +72
-1
lines changed Expand file tree Collapse file tree 3 files changed +72
-1
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * Implementation of hook_context_default_contexts().
5
+ */
6
+ function oa_sheetnode_context_default_contexts () {
7
+ $ export = array ();
8
+ $ context = new stdClass ;
9
+ $ context ->disabled = FALSE ; /* Edit this to true to make a default context disabled initially */
10
+ $ context ->api_version = 3 ;
11
+ $ context ->name = 'sheetnode_on_book_listing ' ;
12
+ $ context ->description = 'Adding the "Add Sheetnode" button to the Notebook ' ;
13
+ $ context ->tag = 'Book, Sheetnode ' ;
14
+ $ context ->conditions = array (
15
+ 'bookroot ' => array (
16
+ 'values ' => array (
17
+ 'book ' => 'book ' ,
18
+ ),
19
+ 'options ' => array (
20
+ 'node_form ' => '1 ' ,
21
+ ),
22
+ ),
23
+ 'node ' => array (
24
+ 'values ' => array (
25
+ 'sheetnode ' => 'sheetnode ' ,
26
+ ),
27
+ 'options ' => array (
28
+ 'node_form ' => '1 ' ,
29
+ ),
30
+ ),
31
+ 'views ' => array (
32
+ 'values ' => array (
33
+ 'book_listing ' => 'book_listing ' ,
34
+ ),
35
+ ),
36
+ );
37
+ $ context ->reactions = array (
38
+ 'block ' => array (
39
+ 'blocks ' => array (
40
+ 'diff-inline ' => array (
41
+ 'module ' => 'diff ' ,
42
+ 'delta ' => 'inline ' ,
43
+ 'region ' => 'right ' ,
44
+ 'weight ' => 0 ,
45
+ ),
46
+ 'atrium_book-book_all ' => array (
47
+ 'module ' => 'atrium_book ' ,
48
+ 'delta ' => 'book_all ' ,
49
+ 'region ' => 'right ' ,
50
+ 'weight ' => 1 ,
51
+ ),
52
+ ),
53
+ ),
54
+ 'menu ' => 'notebook ' ,
55
+ );
56
+ $ context ->condition_mode = 0 ;
57
+
58
+ // Translatables
59
+ // Included for use with string extractors like potx.
60
+ t ('Adding the "Add Sheetnode" button to the Notebook ' );
61
+ t ('Book, Sheetnode ' );
62
+
63
+ $ export ['sheetnode_on_book_listing ' ] = $ context ;
64
+ return $ export ;
65
+ }
Original file line number Diff line number Diff line change 5
5
*/
6
6
function oa_sheetnode_ctools_plugin_api () {
7
7
list ($ module , $ api ) = func_get_args ();
8
- if ($ module == "strongarm " && $ api == "strongarm " ) {
8
+ if ($ module == "context " && $ api == "context " ) {
9
+ return array ("version " => 3 );
10
+ }
11
+ elseif ($ module == "strongarm " && $ api == "strongarm " ) {
9
12
return array ("version " => 1 );
10
13
}
11
14
}
Original file line number Diff line number Diff line change 1
1
core = "6.x"
2
2
dependencies[] = "atrium"
3
+ dependencies[] = "atrium_book"
3
4
dependencies[] = "features"
4
5
dependencies[] = "sheetnode"
5
6
dependencies[] = "strongarm"
6
7
description = "Sheetnode integration for Open Atrium"
8
+ features[context][] = "sheetnode_on_book_listing"
9
+ features[ctools][] = "context:context:3"
7
10
features[ctools][] = "strongarm:strongarm:1"
8
11
features[user_permission][] = "create sheet template"
9
12
features[user_permission][] = "create sheetnode"
You can’t perform that action at this time.
0 commit comments