@@ -75,8 +75,8 @@ |
||
75 | 75 | } |
76 | 76 | $search_set .= elgg_view_entity_list(array_slice($result_set, $offset, $entities_per_page), array( |
77 | 77 | 'count' => $count, |
78 | - 'list_class' => 'clearfix row mrgn-bttm-md candidate-holder', |
|
79 | - 'item_class' => 'col-md-3 col-sm-6 candidate-panel ', |
|
78 | + 'list_class' => 'clearfix row mrgn-bttm-md candidate-holder', |
|
79 | + 'item_class' => 'col-md-3 col-sm-6 candidate-panel ', |
|
80 | 80 | 'offset' => $offset, |
81 | 81 | 'limit' => $entities_per_page, |
82 | 82 | 'pagination' => true, |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | if ((count($_SESSION['candidate_search_set']) < ($offset + $entities_per_page)) && (count($_SESSION['candidate_search_set']) < $_SESSION['candidate_count'])) { |
25 | 25 | $old_results = $_SESSION['candidate_search_set']; |
26 | 26 | $fetch_limit = ($offset + $entities_per_page) - count($_SESSION['candidate_search_set']); |
27 | - $fetch_offset = count($_SESSION['candidate_search_set']); |
|
27 | + $fetch_offset = count($_SESSION['candidate_search_set']); |
|
28 | 28 | |
29 | 29 | mm_simple_search_database_for_candidates( |
30 | 30 | $_SESSION['candidate_search_query_array'], $fetch_limit, $fetch_offset |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | ); |
36 | 36 | } |
37 | 37 | |
38 | -if(time() > ($_SESSION['candidate_search_set_timestamp'] + elgg_get_plugin_setting('mission_session_variable_timeout', 'missions')) |
|
38 | +if (time() > ($_SESSION['candidate_search_set_timestamp'] + elgg_get_plugin_setting('mission_session_variable_timeout', 'missions')) |
|
39 | 39 | && $_SESSION['candidate_search_set_timestamp'] != '') { |
40 | 40 | system_message(elgg_echo('missions:last_results_have_expired')); |
41 | 41 | unset($_SESSION['candidate_search_set']); |
@@ -65,12 +65,12 @@ discard block |
||
65 | 65 | 'field_bordered' => true |
66 | 66 | )); |
67 | 67 | |
68 | -if($result_set) { |
|
68 | +if ($result_set) { |
|
69 | 69 | $search_set = '<h2>' . elgg_echo('missions:search_results') . '</h2>'; |
70 | 70 | $count = $_SESSION['candidate_count']; |
71 | 71 | |
72 | 72 | $max_reached = ''; |
73 | - if(($offset + $entities_per_page) >= elgg_get_plugin_setting('search_limit', 'missions') && $count >= elgg_get_plugin_setting('search_limit', 'missions')) { |
|
73 | + if (($offset + $entities_per_page) >= elgg_get_plugin_setting('search_limit', 'missions') && $count >= elgg_get_plugin_setting('search_limit', 'missions')) { |
|
74 | 74 | $max_reached = '<div class="col-sm-12" style="font-style:italic;">' . elgg_echo('missions:reached_maximum_entities') . '</div>'; |
75 | 75 | } |
76 | 76 | $search_set .= elgg_view_entity_list(array_slice($result_set, $offset, $entities_per_page), array( |
@@ -40,8 +40,7 @@ |
||
40 | 40 | system_message(elgg_echo('missions:last_results_have_expired')); |
41 | 41 | unset($_SESSION['candidate_search_set']); |
42 | 42 | unset($_SESSION['candidate_search_set_timestamp']); |
43 | -} |
|
44 | -else { |
|
43 | +} else { |
|
45 | 44 | $result_set = $_SESSION['candidate_search_set']; |
46 | 45 | } |
47 | 46 |
@@ -14,10 +14,10 @@ discard block |
||
14 | 14 | $mission = ''; |
15 | 15 | $full_view = ''; |
16 | 16 | if (isset($vars['entity'])) { |
17 | - $mission = $vars['entity']; |
|
17 | + $mission = $vars['entity']; |
|
18 | 18 | } |
19 | 19 | if (isset($vars['full_view'])) { |
20 | - $full_view = $vars['full_view']; |
|
20 | + $full_view = $vars['full_view']; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | $department_string = $mission->department; |
@@ -38,13 +38,13 @@ discard block |
||
38 | 38 | $clean_openess = elgg_echo('missions:no'); |
39 | 39 | $clean_completion_date = elgg_echo('missions:unknown'); |
40 | 40 | if(!empty($mission->phone)) { |
41 | - $clean_phone = $mission->phone; |
|
41 | + $clean_phone = $mission->phone; |
|
42 | 42 | } |
43 | 43 | if(!empty($mission->security)) { |
44 | - $clean_security = elgg_echo($mission->security); |
|
44 | + $clean_security = elgg_echo($mission->security); |
|
45 | 45 | } |
46 | 46 | if(!empty($mission->key_skills)) { |
47 | - $clean_skills = $mission->key_skills; |
|
47 | + $clean_skills = $mission->key_skills; |
|
48 | 48 | } |
49 | 49 | if(!empty($mission->timezone)) { |
50 | 50 | $clean_timezone = elgg_echo($mission->timezone); |
@@ -80,76 +80,76 @@ discard block |
||
80 | 80 | // Sets up the display for language metadata. |
81 | 81 | $unpacked_language = ''; |
82 | 82 | if (! empty($unpacked_array['lwc_english']) || ! empty($unpacked_array['lwc_french'])) { |
83 | - $unpacked_language .= '<h5>' . elgg_echo('missions:written_comprehension') . ': </h5>'; |
|
84 | - if (! empty($unpacked_array['lwc_english'])) { |
|
85 | - $unpacked_language .= '<span name="mission-lwc-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lwc_english'])) . '</span> '; |
|
86 | - } |
|
87 | - if (! empty($unpacked_array['lwc_french'])) { |
|
88 | - $unpacked_language .= '<span name="mission-lwc-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lwc_french'])) . '</span>'; |
|
89 | - } |
|
90 | - $unpacked_language .= '<br>'; |
|
83 | + $unpacked_language .= '<h5>' . elgg_echo('missions:written_comprehension') . ': </h5>'; |
|
84 | + if (! empty($unpacked_array['lwc_english'])) { |
|
85 | + $unpacked_language .= '<span name="mission-lwc-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lwc_english'])) . '</span> '; |
|
86 | + } |
|
87 | + if (! empty($unpacked_array['lwc_french'])) { |
|
88 | + $unpacked_language .= '<span name="mission-lwc-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lwc_french'])) . '</span>'; |
|
89 | + } |
|
90 | + $unpacked_language .= '<br>'; |
|
91 | 91 | } |
92 | 92 | if (! empty($unpacked_array['lwe_english']) || ! empty($unpacked_array['lwe_french'])) { |
93 | - $unpacked_language .= '<h5>' . elgg_echo('missions:written_expression') . ': </h5>'; |
|
94 | - if (! empty($unpacked_array['lwe_english'])) { |
|
95 | - $unpacked_language .= '<span name="mission-lwe-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lwe_english'])) . '</span> '; |
|
96 | - } |
|
97 | - if (! empty($unpacked_array['lwe_french'])) { |
|
98 | - $unpacked_language .= '<span name="mission-lwe-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lwe_french'])) . '</span>'; |
|
99 | - } |
|
100 | - $unpacked_language .= '<br>'; |
|
93 | + $unpacked_language .= '<h5>' . elgg_echo('missions:written_expression') . ': </h5>'; |
|
94 | + if (! empty($unpacked_array['lwe_english'])) { |
|
95 | + $unpacked_language .= '<span name="mission-lwe-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lwe_english'])) . '</span> '; |
|
96 | + } |
|
97 | + if (! empty($unpacked_array['lwe_french'])) { |
|
98 | + $unpacked_language .= '<span name="mission-lwe-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lwe_french'])) . '</span>'; |
|
99 | + } |
|
100 | + $unpacked_language .= '<br>'; |
|
101 | 101 | } |
102 | 102 | if (! empty($unpacked_array['lop_english']) || ! empty($unpacked_array['lop_french'])) { |
103 | - $unpacked_language .= '<h5>' . elgg_echo('missions:oral_proficiency') . ': </h5>'; |
|
104 | - if (! empty($unpacked_array['lop_english'])) { |
|
105 | - $unpacked_language .= '<span name="mission-lop-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lop_english'])) . '</span> '; |
|
106 | - } |
|
107 | - if (! empty($unpacked_array['lop_french'])) { |
|
108 | - $unpacked_language .= '<span name="mission-lop-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lop_french'])) . '</span>'; |
|
109 | - } |
|
110 | - $unpacked_language .= '<br>'; |
|
103 | + $unpacked_language .= '<h5>' . elgg_echo('missions:oral_proficiency') . ': </h5>'; |
|
104 | + if (! empty($unpacked_array['lop_english'])) { |
|
105 | + $unpacked_language .= '<span name="mission-lop-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lop_english'])) . '</span> '; |
|
106 | + } |
|
107 | + if (! empty($unpacked_array['lop_french'])) { |
|
108 | + $unpacked_language .= '<span name="mission-lop-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lop_french'])) . '</span>'; |
|
109 | + } |
|
110 | + $unpacked_language .= '<br>'; |
|
111 | 111 | } |
112 | 112 | if (empty($unpacked_language)) { |
113 | - $unpacked_language = '<span name="no-languages">' . elgg_echo('missions:none_required') . '</span>'; |
|
113 | + $unpacked_language = '<span name="no-languages">' . elgg_echo('missions:none_required') . '</span>'; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | // Sets up the display for time metadata. |
117 | 117 | $unpacked_time = ''; |
118 | 118 | if ($mission->mon_start) { |
119 | - $unpacked_time .= '<h5>' . elgg_echo('missions:mon') . ': </h5>'; |
|
120 | - $unpacked_time .= '<span name="mission-mon-start">' . $mission->mon_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-mon-duration">' . $mission->mon_duration . '</span><br>'; |
|
119 | + $unpacked_time .= '<h5>' . elgg_echo('missions:mon') . ': </h5>'; |
|
120 | + $unpacked_time .= '<span name="mission-mon-start">' . $mission->mon_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-mon-duration">' . $mission->mon_duration . '</span><br>'; |
|
121 | 121 | } |
122 | 122 | if ($mission->tue_start) { |
123 | - $unpacked_time .= '<h5>' . elgg_echo('missions:tue') . ': </h5>'; |
|
123 | + $unpacked_time .= '<h5>' . elgg_echo('missions:tue') . ': </h5>'; |
|
124 | 124 | $unpacked_time .= '<span name="mission-tue-start">' . $mission->tue_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-tue-duration">' . $mission->tue_duration . '</span><br>'; |
125 | 125 | } |
126 | 126 | if ($mission->wed_start) { |
127 | - $unpacked_time .= '<h5>' . elgg_echo('missions:wed') . ': </h5>'; |
|
128 | - $unpacked_time .= '<span name="mission-wed-start">' . $mission->wed_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-wed-duration">' . $mission->wed_duration . '</span><br>'; |
|
127 | + $unpacked_time .= '<h5>' . elgg_echo('missions:wed') . ': </h5>'; |
|
128 | + $unpacked_time .= '<span name="mission-wed-start">' . $mission->wed_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-wed-duration">' . $mission->wed_duration . '</span><br>'; |
|
129 | 129 | } |
130 | 130 | if ($mission->thu_start) { |
131 | - $unpacked_time .= '<h5>' . elgg_echo('missions:thu') . ': </h5>'; |
|
132 | - $unpacked_time .= '<span name="mission-thu-start">' . $mission->thu_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-thu-duration">' . $mission->thu_duration . '</span><br>'; |
|
131 | + $unpacked_time .= '<h5>' . elgg_echo('missions:thu') . ': </h5>'; |
|
132 | + $unpacked_time .= '<span name="mission-thu-start">' . $mission->thu_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-thu-duration">' . $mission->thu_duration . '</span><br>'; |
|
133 | 133 | } |
134 | 134 | if ($mission->fri_start) { |
135 | - $unpacked_time .= '<h5>' . elgg_echo('missions:fri') . ': </h5>'; |
|
136 | - $unpacked_time .= '<span name="mission-fri-start">' . $mission->fri_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-fri-duration">' . $mission->fri_duration . '</span><br>'; |
|
135 | + $unpacked_time .= '<h5>' . elgg_echo('missions:fri') . ': </h5>'; |
|
136 | + $unpacked_time .= '<span name="mission-fri-start">' . $mission->fri_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-fri-duration">' . $mission->fri_duration . '</span><br>'; |
|
137 | 137 | } |
138 | 138 | if ($mission->sat_start) { |
139 | - $unpacked_time .= '<h5>' . elgg_echo('missions:sat') . ': </h5>'; |
|
140 | - $unpacked_time .= '<span name="mission-sat-start">' . $mission->sat_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-sat-duration">' . $mission->sat_duration . '</span><br>'; |
|
139 | + $unpacked_time .= '<h5>' . elgg_echo('missions:sat') . ': </h5>'; |
|
140 | + $unpacked_time .= '<span name="mission-sat-start">' . $mission->sat_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-sat-duration">' . $mission->sat_duration . '</span><br>'; |
|
141 | 141 | } |
142 | 142 | if ($mission->sun_start) { |
143 | - $unpacked_time .= '<h5>' . elgg_echo('missions:sun') . ': </h5>'; |
|
144 | - $unpacked_time .= '<span name="mission-sun-start">' . $mission->sun_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-sun-duration">' . $mission->sun_duration . '</span><br>'; |
|
143 | + $unpacked_time .= '<h5>' . elgg_echo('missions:sun') . ': </h5>'; |
|
144 | + $unpacked_time .= '<span name="mission-sun-start">' . $mission->sun_start . '</span>' . elgg_echo('missions:to') . '<span name="mission-sun-duration">' . $mission->sun_duration . '</span><br>'; |
|
145 | 145 | } |
146 | 146 | if (empty($unpacked_time)) { |
147 | - $unpacked_time = '<span name="no-times">' . elgg_echo('missions:none_required') . '</span>'; |
|
147 | + $unpacked_time = '<span name="no-times">' . elgg_echo('missions:none_required') . '</span>'; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | // Creates a set of buttons for the bottom of the view. |
151 | 151 | if(!$vars['override_buttons']) { |
152 | - $button_set = mm_create_button_set_full($mission); |
|
152 | + $button_set = mm_create_button_set_full($mission); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | $mission_state = ''; |
@@ -188,10 +188,10 @@ discard block |
||
188 | 188 | </div> |
189 | 189 | <div name="mission-description"> |
190 | 190 | <?php |
191 | - //echo elgg_get_excerpt($mission->descriptor, 2000); |
|
192 | - //Nick - Changed from exceprt to echo the metadata so it does not strip the tags made by ck editor |
|
193 | - echo $mission->descriptor; |
|
194 | - ?> |
|
191 | + //echo elgg_get_excerpt($mission->descriptor, 2000); |
|
192 | + //Nick - Changed from exceprt to echo the metadata so it does not strip the tags made by ck editor |
|
193 | + echo $mission->descriptor; |
|
194 | + ?> |
|
195 | 195 | </div> |
196 | 196 | |
197 | 197 | <div> |
@@ -275,9 +275,9 @@ discard block |
||
275 | 275 | <div> |
276 | 276 | <?php |
277 | 277 | foreach ($button_set as $value) { |
278 | - echo $value; |
|
278 | + echo $value; |
|
279 | 279 | } |
280 | - ?> |
|
280 | + ?> |
|
281 | 281 | </div> |
282 | 282 | </div> |
283 | 283 | |
@@ -300,12 +300,12 @@ discard block |
||
300 | 300 | --> |
301 | 301 | |
302 | 302 | <?php |
303 | - echo elgg_view('page/elements/mission-manager-info', array( |
|
304 | - 'mission' => $mission, |
|
305 | - 'container_class' => 'mission-user-card-info', |
|
306 | - 'grid_number' => '2' |
|
307 | - )); |
|
308 | - ?> |
|
303 | + echo elgg_view('page/elements/mission-manager-info', array( |
|
304 | + 'mission' => $mission, |
|
305 | + 'container_class' => 'mission-user-card-info', |
|
306 | + 'grid_number' => '2' |
|
307 | + )); |
|
308 | + ?> |
|
309 | 309 | |
310 | 310 | </div> |
311 | 311 | <div class=""> |
@@ -322,12 +322,12 @@ discard block |
||
322 | 322 | </h5> |
323 | 323 | <span name="mission-email"> |
324 | 324 | <?php |
325 | - //Nick - Changed to a mailto link based on email feeback |
|
326 | - echo elgg_view('output/url', array( |
|
327 | - 'text'=>$mission->email, |
|
328 | - 'href'=>'mailto:'. $mission->email, |
|
329 | - )); |
|
330 | - ?> |
|
325 | + //Nick - Changed to a mailto link based on email feeback |
|
326 | + echo elgg_view('output/url', array( |
|
327 | + 'text'=>$mission->email, |
|
328 | + 'href'=>'mailto:'. $mission->email, |
|
329 | + )); |
|
330 | + ?> |
|
331 | 331 | </span> |
332 | 332 | </div> |
333 | 333 | <div class=""> |
@@ -343,10 +343,10 @@ discard block |
||
343 | 343 | <div> |
344 | 344 | |
345 | 345 | <?php |
346 | - echo elgg_view('page/elements/related-candidates', array( |
|
347 | - 'entity' => $mission, |
|
348 | - )); |
|
349 | - ?> |
|
346 | + echo elgg_view('page/elements/related-candidates', array( |
|
347 | + 'entity' => $mission, |
|
348 | + )); |
|
349 | + ?> |
|
350 | 350 | |
351 | 351 | </div> |
352 | 352 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $progenitor = get_entity($ancestor_array[0]); |
26 | 26 | |
27 | 27 | $department_abbr = $progenitor->abbr; |
28 | -if(get_current_language() == 'fr') { |
|
28 | +if (get_current_language() == 'fr') { |
|
29 | 29 | $department_abbr = $progenitor->abbr_french; |
30 | 30 | } |
31 | 31 | |
@@ -37,74 +37,74 @@ discard block |
||
37 | 37 | $clean_remotely = elgg_echo('missions:no'); |
38 | 38 | $clean_openess = elgg_echo('missions:no'); |
39 | 39 | $clean_completion_date = elgg_echo('missions:unknown'); |
40 | -if(!empty($mission->phone)) { |
|
40 | +if (!empty($mission->phone)) { |
|
41 | 41 | $clean_phone = $mission->phone; |
42 | 42 | } |
43 | -if(!empty($mission->security)) { |
|
43 | +if (!empty($mission->security)) { |
|
44 | 44 | $clean_security = elgg_echo($mission->security); |
45 | 45 | } |
46 | -if(!empty($mission->key_skills)) { |
|
46 | +if (!empty($mission->key_skills)) { |
|
47 | 47 | $clean_skills = $mission->key_skills; |
48 | 48 | } |
49 | -if(!empty($mission->timezone)) { |
|
50 | - $clean_timezone = elgg_echo($mission->timezone); |
|
49 | +if (!empty($mission->timezone)) { |
|
50 | + $clean_timezone = elgg_echo($mission->timezone); |
|
51 | 51 | } |
52 | -if(!empty($mission->remotely)) { |
|
52 | +if (!empty($mission->remotely)) { |
|
53 | 53 | $clean_remotely = elgg_echo('missions:yes'); |
54 | 54 | } |
55 | -if(!empty($mission->openess)) { |
|
55 | +if (!empty($mission->openess)) { |
|
56 | 56 | $clean_openess = elgg_echo('missions:yes'); |
57 | 57 | } |
58 | -if(!empty($mission->completion_date)) { |
|
58 | +if (!empty($mission->completion_date)) { |
|
59 | 59 | $clean_completion_date = $mission->completion_date; |
60 | 60 | } |
61 | 61 | |
62 | 62 | $department_path = $mission->department_path_english; |
63 | -if(get_current_language() == 'fr') { |
|
63 | +if (get_current_language() == 'fr') { |
|
64 | 64 | $department_path = $mission->department_path_french; |
65 | 65 | } |
66 | 66 | |
67 | -if(trim($department_path) == '') { |
|
68 | - if(strpos($mission->department, 'MOrg:') === false) { |
|
67 | +if (trim($department_path) == '') { |
|
68 | + if (strpos($mission->department, 'MOrg:') === false) { |
|
69 | 69 | $department_path = $mission->department; |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | 73 | //Nick - Adding group and level to the mission view |
74 | -if(!empty($mission->gl_group)){ |
|
75 | - $print_groupandlevel = '<h5>'.elgg_echo('missions:groupandlevel').': </h5><span>'.$mission->gl_group.'-'.$mission->gl_level.'</span>'; |
|
74 | +if (!empty($mission->gl_group)) { |
|
75 | + $print_groupandlevel = '<h5>' . elgg_echo('missions:groupandlevel') . ': </h5><span>' . $mission->gl_group . '-' . $mission->gl_level . '</span>'; |
|
76 | 76 | } |
77 | 77 | // Unpacks all language and time metadata attached to the mission. |
78 | 78 | $unpacked_array = mm_unpack_mission($mission); |
79 | 79 | |
80 | 80 | // Sets up the display for language metadata. |
81 | 81 | $unpacked_language = ''; |
82 | -if (! empty($unpacked_array['lwc_english']) || ! empty($unpacked_array['lwc_french'])) { |
|
82 | +if (!empty($unpacked_array['lwc_english']) || !empty($unpacked_array['lwc_french'])) { |
|
83 | 83 | $unpacked_language .= '<h5>' . elgg_echo('missions:written_comprehension') . ': </h5>'; |
84 | - if (! empty($unpacked_array['lwc_english'])) { |
|
84 | + if (!empty($unpacked_array['lwc_english'])) { |
|
85 | 85 | $unpacked_language .= '<span name="mission-lwc-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lwc_english'])) . '</span> '; |
86 | 86 | } |
87 | - if (! empty($unpacked_array['lwc_french'])) { |
|
87 | + if (!empty($unpacked_array['lwc_french'])) { |
|
88 | 88 | $unpacked_language .= '<span name="mission-lwc-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lwc_french'])) . '</span>'; |
89 | 89 | } |
90 | 90 | $unpacked_language .= '<br>'; |
91 | 91 | } |
92 | -if (! empty($unpacked_array['lwe_english']) || ! empty($unpacked_array['lwe_french'])) { |
|
92 | +if (!empty($unpacked_array['lwe_english']) || !empty($unpacked_array['lwe_french'])) { |
|
93 | 93 | $unpacked_language .= '<h5>' . elgg_echo('missions:written_expression') . ': </h5>'; |
94 | - if (! empty($unpacked_array['lwe_english'])) { |
|
94 | + if (!empty($unpacked_array['lwe_english'])) { |
|
95 | 95 | $unpacked_language .= '<span name="mission-lwe-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lwe_english'])) . '</span> '; |
96 | 96 | } |
97 | - if (! empty($unpacked_array['lwe_french'])) { |
|
97 | + if (!empty($unpacked_array['lwe_french'])) { |
|
98 | 98 | $unpacked_language .= '<span name="mission-lwe-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lwe_french'])) . '</span>'; |
99 | 99 | } |
100 | 100 | $unpacked_language .= '<br>'; |
101 | 101 | } |
102 | -if (! empty($unpacked_array['lop_english']) || ! empty($unpacked_array['lop_french'])) { |
|
102 | +if (!empty($unpacked_array['lop_english']) || !empty($unpacked_array['lop_french'])) { |
|
103 | 103 | $unpacked_language .= '<h5>' . elgg_echo('missions:oral_proficiency') . ': </h5>'; |
104 | - if (! empty($unpacked_array['lop_english'])) { |
|
104 | + if (!empty($unpacked_array['lop_english'])) { |
|
105 | 105 | $unpacked_language .= '<span name="mission-lop-english">' . elgg_echo('missions:formatted:english', array($unpacked_array['lop_english'])) . '</span> '; |
106 | 106 | } |
107 | - if (! empty($unpacked_array['lop_french'])) { |
|
107 | + if (!empty($unpacked_array['lop_french'])) { |
|
108 | 108 | $unpacked_language .= '<span name="mission-lop-french">' . elgg_echo('missions:formatted:french', array($unpacked_array['lop_french'])) . '</span>'; |
109 | 109 | } |
110 | 110 | $unpacked_language .= '<br>'; |
@@ -148,22 +148,22 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | // Creates a set of buttons for the bottom of the view. |
151 | -if(!$vars['override_buttons']) { |
|
151 | +if (!$vars['override_buttons']) { |
|
152 | 152 | $button_set = mm_create_button_set_full($mission); |
153 | 153 | } |
154 | 154 | |
155 | 155 | $mission_state = ''; |
156 | -if($mission->state == 'completed') { |
|
156 | +if ($mission->state == 'completed') { |
|
157 | 157 | $mission_state = '(' . strtolower(elgg_echo('missions:completed')) . ')'; |
158 | 158 | } |
159 | -if($mission->state == 'cancelled') { |
|
159 | +if ($mission->state == 'cancelled') { |
|
160 | 160 | $mission_state = '(' . strtolower(elgg_echo('missions:cancelled')) . ')'; |
161 | 161 | } |
162 | 162 | |
163 | 163 | $creator = get_user($mission->owner_guid); |
164 | 164 | |
165 | 165 | $accept_and_decline_top_buttons = ''; |
166 | -if(strpos($button_set['button_three'], 'accept-button') !== false) { |
|
166 | +if (strpos($button_set['button_three'], 'accept-button') !== false) { |
|
167 | 167 | $accept_and_decline_top_buttons = $button_set['button_three'] . $button_set['button_four']; |
168 | 168 | } |
169 | 169 | ?> |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | <div class="col-sm-8 print-mission-more-holder"> |
173 | 173 | <div> |
174 | 174 | <h2 name="mission-job-title"> |
175 | - <?php echo elgg_get_excerpt($mission->job_title, 200);?> |
|
175 | + <?php echo elgg_get_excerpt($mission->job_title, 200); ?> |
|
176 | 176 | <span style="font-style:italic;font-size:small;" name="mission-state"> |
177 | 177 | <?php echo $mission_state; ?> |
178 | 178 | </span> |
@@ -199,61 +199,61 @@ discard block |
||
199 | 199 | <h3 class='h4' style="margin:0; padding:8px 2px 0 0;"><?php echo elgg_echo('mission:opportunity_details') . ':'; ?></h3> |
200 | 200 | </div> |
201 | 201 | <div class="clearfix"> |
202 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:program_area') . ':';?></h4> |
|
203 | - <span name="mission-program-area"><?php echo elgg_echo($mission->program_area);?></span> |
|
202 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:program_area') . ':'; ?></h4> |
|
203 | + <span name="mission-program-area"><?php echo elgg_echo($mission->program_area); ?></span> |
|
204 | 204 | </div> |
205 | 205 | <div class="clearfix"> |
206 | 206 | <?php echo $print_groupandlevel; ?> |
207 | 207 | </div> |
208 | 208 | <div class="clearfix"> |
209 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:opportunity_number') . ':';?></h4> |
|
210 | - <span name="mission-number"><?php echo $mission->number;?></span> |
|
209 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:opportunity_number') . ':'; ?></h4> |
|
210 | + <span name="mission-number"><?php echo $mission->number; ?></span> |
|
211 | 211 | </div> |
212 | 212 | <div class="clearfix"> |
213 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:ideal_start_date') . ':';?></h4> |
|
214 | - <span name="mission-start-date"><?php echo $mission->start_date;?></span> |
|
213 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:ideal_start_date') . ':'; ?></h4> |
|
214 | + <span name="mission-start-date"><?php echo $mission->start_date; ?></span> |
|
215 | 215 | </div> |
216 | 216 | <div class="clearfix"> |
217 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:ideal_completion_date') . ':';?></h4> |
|
218 | - <span name="mission-completion-date"><?php echo $clean_completion_date;?></span> |
|
217 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:ideal_completion_date') . ':'; ?></h4> |
|
218 | + <span name="mission-completion-date"><?php echo $clean_completion_date; ?></span> |
|
219 | 219 | </div> |
220 | 220 | <div class="clearfix"> |
221 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:deadline') . ':';?></h4> |
|
222 | - <span name="mission-deadline"><?php echo $mission->deadline;?></span> |
|
221 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:deadline') . ':'; ?></h4> |
|
222 | + <span name="mission-deadline"><?php echo $mission->deadline; ?></span> |
|
223 | 223 | </div> |
224 | 224 | <div class="clearfix"> |
225 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:work_remotely') . ':';?></h4> |
|
226 | - <span name="mission-remotely"><?php echo $clean_remotely;?></span> |
|
225 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:work_remotely') . ':'; ?></h4> |
|
226 | + <span name="mission-remotely"><?php echo $clean_remotely; ?></span> |
|
227 | 227 | </div> |
228 | 228 | <div class="clearfix"> |
229 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:openess_sentence', array(strtoupper($department_abbr)));?></h4> |
|
230 | - <span name="mission-openess"><?php echo $clean_openess;?></span> |
|
229 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:openess_sentence', array(strtoupper($department_abbr))); ?></h4> |
|
230 | + <span name="mission-openess"><?php echo $clean_openess; ?></span> |
|
231 | 231 | </div> |
232 | 232 | <div class="clearfix"> |
233 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:opportunity_location') . ':';?></h4> |
|
234 | - <span name="mission-location"><?php echo elgg_echo($mission->location);?></span> |
|
233 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:opportunity_location') . ':'; ?></h4> |
|
234 | + <span name="mission-location"><?php echo elgg_echo($mission->location); ?></span> |
|
235 | 235 | </div> |
236 | 236 | <div class="clearfix"> |
237 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:security_level') . ':';?></h4> |
|
238 | - <span name="mission-security"><?php echo $clean_security;?></span> |
|
237 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:security_level') . ':'; ?></h4> |
|
238 | + <span name="mission-security"><?php echo $clean_security; ?></span> |
|
239 | 239 | </div> |
240 | 240 | <div class="clearfix"> |
241 | - <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:key_skills_opportunity') . ':';?></h4> |
|
242 | - <span name="mission-skills"><?php echo elgg_get_excerpt($clean_skills, 500);?></span> |
|
241 | + <h4 class='h5' style="margin:8px 0 0 0; display:inline-block;"><?php echo elgg_echo('missions:key_skills_opportunity') . ':'; ?></h4> |
|
242 | + <span name="mission-skills"><?php echo elgg_get_excerpt($clean_skills, 500); ?></span> |
|
243 | 243 | </div> |
244 | 244 | </div> |
245 | 245 | </br> |
246 | 246 | <div class="mission-details"> |
247 | - <h5 class="mrgn-tp-md"><?php echo elgg_echo('missions:language_requirements') . ':</br>';?></h5> |
|
247 | + <h5 class="mrgn-tp-md"><?php echo elgg_echo('missions:language_requirements') . ':</br>'; ?></h5> |
|
248 | 248 | <div class="col-sm-offset-1"> |
249 | - <?php echo $unpacked_language;?> |
|
249 | + <?php echo $unpacked_language; ?> |
|
250 | 250 | </div> |
251 | 251 | </div> |
252 | 252 | </br> |
253 | 253 | <div class="mission-details"> |
254 | - <h5 class="mrgn-tp-md"><?php echo elgg_echo('missions:scheduling_requirements') . ':</br>';?></h5> |
|
254 | + <h5 class="mrgn-tp-md"><?php echo elgg_echo('missions:scheduling_requirements') . ':</br>'; ?></h5> |
|
255 | 255 | <div class="col-sm-offset-1"> |
256 | - <h5><?php echo elgg_echo('missions:time_commitment') . ':';?></h5> |
|
256 | + <h5><?php echo elgg_echo('missions:time_commitment') . ':'; ?></h5> |
|
257 | 257 | <span name="mission-time-commitment"> |
258 | 258 | <?php echo $mission->time_commitment; ?> |
259 | 259 | </span> |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | </span> |
266 | 266 | </div> |
267 | 267 | <div class="col-sm-offset-1"> |
268 | - <h5><?php echo elgg_echo('missions:timezone') . ':';?></h5> |
|
269 | - <span name="mission-time-zone"><?php echo $clean_timezone;?></span> |
|
268 | + <h5><?php echo elgg_echo('missions:timezone') . ':'; ?></h5> |
|
269 | + <span name="mission-time-zone"><?php echo $clean_timezone; ?></span> |
|
270 | 270 | </div> |
271 | 271 | <div class="col-sm-offset-1"> |
272 | 272 | <?php echo $unpacked_time; ?> |
@@ -291,10 +291,10 @@ discard block |
||
291 | 291 | <div class="mrgn-bttm-md clearfix"> |
292 | 292 | <!-- |
293 | 293 | <h5> |
294 | - <?php echo elgg_echo('missions:name') . ':';?> |
|
294 | + <?php echo elgg_echo('missions:name') . ':'; ?> |
|
295 | 295 | </h5> |
296 | 296 | <span name="mission-name"> |
297 | - <?php echo elgg_get_excerpt($mission->name, 100);?> |
|
297 | + <?php echo elgg_get_excerpt($mission->name, 100); ?> |
|
298 | 298 | </span> |
299 | 299 | |
300 | 300 | --> |
@@ -310,32 +310,32 @@ discard block |
||
310 | 310 | </div> |
311 | 311 | <div class=""> |
312 | 312 | <h5> |
313 | - <?php echo elgg_echo('missions:department') . ':';?> |
|
313 | + <?php echo elgg_echo('missions:department') . ':'; ?> |
|
314 | 314 | </h5> |
315 | 315 | <span name="mission-department-path"> |
316 | - <?php echo elgg_get_excerpt($department_path, 500);?> |
|
316 | + <?php echo elgg_get_excerpt($department_path, 500); ?> |
|
317 | 317 | </span> |
318 | 318 | </div> |
319 | 319 | <div class=""> |
320 | 320 | <h5> |
321 | - <?php echo elgg_echo('missions:email') . ':';?> |
|
321 | + <?php echo elgg_echo('missions:email') . ':'; ?> |
|
322 | 322 | </h5> |
323 | 323 | <span name="mission-email"> |
324 | 324 | <?php |
325 | 325 | //Nick - Changed to a mailto link based on email feeback |
326 | 326 | echo elgg_view('output/url', array( |
327 | 327 | 'text'=>$mission->email, |
328 | - 'href'=>'mailto:'. $mission->email, |
|
328 | + 'href'=>'mailto:' . $mission->email, |
|
329 | 329 | )); |
330 | 330 | ?> |
331 | 331 | </span> |
332 | 332 | </div> |
333 | 333 | <div class=""> |
334 | 334 | <h5> |
335 | - <?php echo elgg_echo('missions:your_phone') . ':';?> |
|
335 | + <?php echo elgg_echo('missions:your_phone') . ':'; ?> |
|
336 | 336 | </h5> |
337 | 337 | <span name="mission-phone"> |
338 | - <?php echo $clean_phone;?> |
|
338 | + <?php echo $clean_phone; ?> |
|
339 | 339 | </span> |
340 | 340 | </div> |
341 | 341 | </div> |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | $is_dummy = $vars['dummy_graph']; |
15 | 15 | |
16 | 16 | // For when the graph has no data passed to it. |
17 | -if($is_dummy) { |
|
17 | +if ($is_dummy) { |
|
18 | 18 | $dummy_array = array(); |
19 | - for($j=0;$j<count($state_array);$j++) { |
|
20 | - $department_names[$j+1] = $state_array[$j]; |
|
21 | - for($i=0;$i<count($department_results[0]);$i++) { |
|
19 | + for ($j = 0; $j < count($state_array); $j++) { |
|
20 | + $department_names[$j + 1] = $state_array[$j]; |
|
21 | + for ($i = 0; $i < count($department_results[0]); $i++) { |
|
22 | 22 | $dummy_array[$i][$j] = 0; |
23 | 23 | } |
24 | 24 | } |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | |
28 | 28 | // Converts the search results into a data table that can be read by the pie chart. |
29 | 29 | $data_table = array(array('States', 'Number of Missions')); |
30 | -for($j=0;$j<count($state_array);$j++) { |
|
31 | - $temp_array = array($department_names[$j+1], 0); |
|
32 | - for($i=0;$i<count($department_results[0]);$i++) { |
|
30 | +for ($j = 0; $j < count($state_array); $j++) { |
|
31 | + $temp_array = array($department_names[$j + 1], 0); |
|
32 | + for ($i = 0; $i < count($department_results[0]); $i++) { |
|
33 | 33 | $temp_array[1] += $department_results[1][$i][$j]; |
34 | 34 | } |
35 | - $data_table[$j+1] = $temp_array; |
|
35 | + $data_table[$j + 1] = $temp_array; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | $abbr = explode(' ', $department_names[1])[0]; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | else { |
47 | 47 | $title = $abbr . ' ' . elgg_echo('missions:for_dates') . ' ' . $date_range; |
48 | 48 | }*/ |
49 | -if($is_dummy) { |
|
49 | +if ($is_dummy) { |
|
50 | 50 | $title = elgg_echo('missions:empty'); |
51 | 51 | } |
52 | 52 | else { |
@@ -48,8 +48,7 @@ |
||
48 | 48 | }*/ |
49 | 49 | if($is_dummy) { |
50 | 50 | $title = elgg_echo('missions:empty'); |
51 | -} |
|
52 | -else { |
|
51 | +} else { |
|
53 | 52 | $title = $abbr; |
54 | 53 | } |
55 | 54 |
@@ -20,8 +20,8 @@ |
||
20 | 20 | $duration = $vars['duration']; |
21 | 21 | |
22 | 22 | if (elgg_is_sticky_form('tddropfill')) { |
23 | - extract(elgg_get_sticky_values('tddropfill')); |
|
24 | - // elgg_clear_sticky_form('thirdfill'); |
|
23 | + extract(elgg_get_sticky_values('tddropfill')); |
|
24 | + // elgg_clear_sticky_form('thirdfill'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | $input_start = elgg_view('input/text', array( |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | $mission = ''; |
21 | 21 | if (isset($vars['entity'])) { |
22 | - $mission = $vars['entity']; |
|
22 | + $mission = $vars['entity']; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | $description_string = elgg_get_excerpt($mission->description, 200); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | // Sets the buttons to the bottom of whichever view is used. |
30 | 30 | if(!$vars['override_buttons']) { |
31 | - $button_set = mm_create_button_set_base($mission, false); |
|
31 | + $button_set = mm_create_button_set_base($mission, false); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | $mission_state = ''; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | )); |
55 | 55 | |
56 | 56 | if($mission->owner_guid == elgg_get_logged_in_user_guid() || $mission->account == elgg_get_logged_in_user_guid()) { |
57 | - $badge_color = 'mission-applicant-badge-owner'; |
|
57 | + $badge_color = 'mission-applicant-badge-owner'; |
|
58 | 58 | |
59 | 59 | } |
60 | 60 | $relationship_count = elgg_get_entities_from_relationship(array( |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | )); |
71 | 71 | |
72 | 72 | if($relationship_count == 1){ |
73 | - $applicant_lang = elgg_echo("missions:applicant"); |
|
73 | + $applicant_lang = elgg_echo("missions:applicant"); |
|
74 | 74 | }else{ |
75 | - $applicant_lang = elgg_echo("missions:applicants"); |
|
75 | + $applicant_lang = elgg_echo("missions:applicants"); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | if($relationship_count > 0 && $mission->state == 'posted') { |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | |
88 | 88 | //Nick - making the headers clickable as well |
89 | 89 | $click_header = elgg_view('output/url', array( |
90 | - 'href'=>$mission->getURL(), |
|
91 | - 'text'=>elgg_get_excerpt($mission->job_title, elgg_get_plugin_setting('mission_job_title_card_cutoff', 'missions')), |
|
92 | - 'class'=>'mission-title-header', |
|
93 | - )); |
|
90 | + 'href'=>$mission->getURL(), |
|
91 | + 'text'=>elgg_get_excerpt($mission->job_title, elgg_get_plugin_setting('mission_job_title_card_cutoff', 'missions')), |
|
92 | + 'class'=>'mission-title-header', |
|
93 | + )); |
|
94 | 94 | ?> |
95 | 95 | |
96 | 96 | <div class="mission-printer mission-less panel panel-default hght-inhrt clearfix" style="height:<?php //echo $card_height;?>px;" name="mission-object"> |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | <h3 class='h2'> |
101 | 101 | <div style="display:inline; font-weight:normal;" name="mission-job-title"> |
102 | 102 | <?php //echo elgg_get_excerpt($mission->job_title, elgg_get_plugin_setting('mission_job_title_card_cutoff', 'missions')); |
103 | - echo $click_header; |
|
104 | - ?> |
|
103 | + echo $click_header; |
|
104 | + ?> |
|
105 | 105 | </div> |
106 | 106 | <div style="font-style:italic;font-size:small;display:inline;" name="mission-state"> |
107 | 107 | <?php echo $mission_state; ?> |
@@ -177,11 +177,11 @@ discard block |
||
177 | 177 | <div class="mission-button-set clearfix col-sm-12"> |
178 | 178 | <?php |
179 | 179 | if (! $full_view) { |
180 | - foreach ($button_set as $value) { |
|
181 | - echo $value; |
|
182 | - } |
|
180 | + foreach ($button_set as $value) { |
|
181 | + echo $value; |
|
182 | + } |
|
183 | 183 | } |
184 | - ?> |
|
184 | + ?> |
|
185 | 185 | </div> |
186 | 186 | <div hidden name="mission-card-guid" id="mission-card-guid-<?php echo $mission->guid; ?>"> |
187 | 187 | <?php echo $mission->guid; ?> |
@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | $card_width = elgg_get_plugin_setting('mission_card_width', 'missions'); |
28 | 28 | |
29 | 29 | // Sets the buttons to the bottom of whichever view is used. |
30 | -if(!$vars['override_buttons']) { |
|
30 | +if (!$vars['override_buttons']) { |
|
31 | 31 | $button_set = mm_create_button_set_base($mission, false); |
32 | 32 | } |
33 | 33 | |
34 | 34 | $mission_state = ''; |
35 | -if($mission->state == 'completed') { |
|
35 | +if ($mission->state == 'completed') { |
|
36 | 36 | $mission_state = '(' . strtolower(elgg_echo('missions:completed')) . ')'; |
37 | 37 | } |
38 | -if($mission->state == 'cancelled') { |
|
38 | +if ($mission->state == 'cancelled') { |
|
39 | 39 | $mission_state = '(' . strtolower(elgg_echo('missions:cancelled')) . ')'; |
40 | 40 | } |
41 | 41 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'grid_number' => '2' |
54 | 54 | )); |
55 | 55 | |
56 | -if($mission->owner_guid == elgg_get_logged_in_user_guid() || $mission->account == elgg_get_logged_in_user_guid()) { |
|
56 | +if ($mission->owner_guid == elgg_get_logged_in_user_guid() || $mission->account == elgg_get_logged_in_user_guid()) { |
|
57 | 57 | $badge_color = 'mission-applicant-badge-owner'; |
58 | 58 | |
59 | 59 | } |
@@ -69,19 +69,19 @@ discard block |
||
69 | 69 | 'count' => true |
70 | 70 | )); |
71 | 71 | |
72 | - if($relationship_count == 1){ |
|
72 | + if ($relationship_count == 1) { |
|
73 | 73 | $applicant_lang = elgg_echo("missions:applicant"); |
74 | - }else{ |
|
74 | + } else { |
|
75 | 75 | $applicant_lang = elgg_echo("missions:applicants"); |
76 | 76 | } |
77 | 77 | |
78 | - if($relationship_count > 0 && $mission->state == 'posted') { |
|
79 | - $relationship_alert = '<div name="mission-applicant-number" class="mission-applicant-badge '.$badge_color.'" id="mission-' . $mission->guid . '-applicant-number" style="">' . $relationship_count . ' '.$applicant_lang. '</div>'; |
|
78 | + if ($relationship_count > 0 && $mission->state == 'posted') { |
|
79 | + $relationship_alert = '<div name="mission-applicant-number" class="mission-applicant-badge ' . $badge_color . '" id="mission-' . $mission->guid . '-applicant-number" style="">' . $relationship_count . ' ' . $applicant_lang . '</div>'; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | |
83 | 83 | $completion_date_fixed = $mission->completion_date; |
84 | -if(trim($completion_date_fixed) == '') { |
|
84 | +if (trim($completion_date_fixed) == '') { |
|
85 | 85 | $completion_date_fixed = elgg_echo('missions:unknown'); |
86 | 86 | } |
87 | 87 | |
@@ -115,13 +115,13 @@ discard block |
||
115 | 115 | </div> |
116 | 116 | |
117 | 117 | <div class="mrgn-bttm-sm" style="max-height:115px;width:100%;overflow:hidden;" name="mission-description"> |
118 | - <?php echo $description_string;?> |
|
118 | + <?php echo $description_string; ?> |
|
119 | 119 | </div> |
120 | 120 | |
121 | 121 | <div> |
122 | 122 | <div style="display:inline-block;vertical-align:top;"> |
123 | 123 | <h4 class='h5' style="margin:0; display:inline;"> |
124 | - <?php echo elgg_echo('missions:date') . ':';?> |
|
124 | + <?php echo elgg_echo('missions:date') . ':'; ?> |
|
125 | 125 | </h4> |
126 | 126 | </div> |
127 | 127 | <div style="display:inline-block;"> |
@@ -152,21 +152,21 @@ discard block |
||
152 | 152 | <div> |
153 | 153 | <div style="display:inline-block;"> |
154 | 154 | <h4 class='h5' style="margin:0; display:inline;"> |
155 | - <?php echo elgg_echo("missions:posted"). ':';?> |
|
155 | + <?php echo elgg_echo("missions:posted") . ':'; ?> |
|
156 | 156 | </h4> |
157 | 157 | </div> |
158 | 158 | <div style="display:inline-block;"> |
159 | - <?php echo elgg_get_friendly_time($mission->time_created);?> |
|
159 | + <?php echo elgg_get_friendly_time($mission->time_created); ?> |
|
160 | 160 | </div> |
161 | 161 | </div> |
162 | 162 | <div> |
163 | 163 | <div style="display:inline-block;"> |
164 | 164 | <h4 class='h5' style="margin:0; display:inline;"> |
165 | - <?php echo elgg_echo('missions:apply_by') . ':';?> |
|
165 | + <?php echo elgg_echo('missions:apply_by') . ':'; ?> |
|
166 | 166 | </h4> |
167 | 167 | </div> |
168 | 168 | <div style="display:inline-block;" name="mission-deadline"> |
169 | - <?php echo $mission->deadline;?> |
|
169 | + <?php echo $mission->deadline; ?> |
|
170 | 170 | </div> |
171 | 171 | </div> |
172 | 172 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | <?php echo $manager_info; ?> |
177 | 177 | <div class="mission-button-set clearfix col-sm-12"> |
178 | 178 | <?php |
179 | - if (! $full_view) { |
|
179 | + if (!$full_view) { |
|
180 | 180 | foreach ($button_set as $value) { |
181 | 181 | echo $value; |
182 | 182 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | if($relationship_count == 1){ |
73 | 73 | $applicant_lang = elgg_echo("missions:applicant"); |
74 | - }else{ |
|
74 | + } else{ |
|
75 | 75 | $applicant_lang = elgg_echo("missions:applicants"); |
76 | 76 | } |
77 | 77 |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | $entity_list = mm_sort_mission_decider($_SESSION['missions_sort_field_value'], $_SESSION['missions_order_field_value'], $entity_list, $_SESSION['missions_type_field_value'], $_SESSION['missions_role_field_value']); |
45 | 45 | $count = count($entity_list); // count the filtered list |
46 | 46 | if ( $offset >= $count ) // reset offset if it no longer makes sense after filtering |
47 | - $offset = 0; |
|
47 | + $offset = 0; |
|
48 | 48 | |
49 | 49 | $max_reached = ''; |
50 | 50 | if(($offset + $max) >= elgg_get_plugin_setting('search_limit', 'missions') && $count >= elgg_get_plugin_setting('search_limit', 'missions')) { |
51 | - $max_reached = '<div class="col-sm-12" style="font-style:italic;">' . elgg_echo('missions:reached_maximum_entities') . '</div>'; |
|
51 | + $max_reached = '<div class="col-sm-12" style="font-style:italic;">' . elgg_echo('missions:reached_maximum_entities') . '</div>'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $archive_list = elgg_view_entity_list(array_slice($entity_list, $offset, $max), array( |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | 'limit' => $max, |
58 | 58 | 'pagination' => true, |
59 | 59 | 'list_type' => 'gallery', |
60 | - 'gallery_class'=>'wb-eqht clearfix', |
|
61 | - 'item_class'=>'col-sm-6 col-md-4 ', |
|
60 | + 'gallery_class'=>'wb-eqht clearfix', |
|
61 | + 'item_class'=>'col-sm-6 col-md-4 ', |
|
62 | 62 | // 'gallery_class' => 'mission-gallery', |
63 | 63 | 'mission_full_view' => false |
64 | 64 | ), $offset, $max); |
@@ -81,13 +81,13 @@ discard block |
||
81 | 81 | $role_type_field = $_SESSION['missions_role_field_value']; |
82 | 82 | |
83 | 83 | if ($opp_type_field || $role_type_field) { |
84 | - $clear_link = elgg_view('output/url', array( |
|
85 | - 'text' => elgg_echo('missions:clear_filter'), |
|
86 | - 'href' => 'action/missions/sort-missions-form?opp_filter=&role_filter=', |
|
87 | - 'class' => 'mrgn-lft-sm', |
|
88 | - 'is_action' => true, |
|
89 | - 'is_trusted' => true, |
|
90 | - )); |
|
84 | + $clear_link = elgg_view('output/url', array( |
|
85 | + 'text' => elgg_echo('missions:clear_filter'), |
|
86 | + 'href' => 'action/missions/sort-missions-form?opp_filter=&role_filter=', |
|
87 | + 'class' => 'mrgn-lft-sm', |
|
88 | + 'is_action' => true, |
|
89 | + 'is_trusted' => true, |
|
90 | + )); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | ?> |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | <div class="col-sm-8"> |
97 | 97 | <h2 class="h4 mrgn-tp-md mrgn-bttm-0"><?php echo elgg_echo('missions:search_for_archived_opportunities') . ':'; ?></h2> |
98 | 98 | <?php |
99 | - echo $simple_search_form; |
|
100 | - ?> |
|
99 | + echo $simple_search_form; |
|
100 | + ?> |
|
101 | 101 | </div> |
102 | 102 | </div> |
103 | 103 | <div class="col-sm-12"> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | /* |
11 | 11 | * Displays all completed and cancelled missions. |
12 | 12 | */ |
13 | -if($_SESSION['mission_entities_per_page']) { |
|
13 | +if ($_SESSION['mission_entities_per_page']) { |
|
14 | 14 | $entities_per_page = $_SESSION['mission_entities_per_page']; |
15 | 15 | } |
16 | 16 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $count = count($entity_list); |
36 | 36 | $offset = (int) get_input('offset', 0); |
37 | -if($entities_per_page) { |
|
37 | +if ($entities_per_page) { |
|
38 | 38 | $max = $entities_per_page; |
39 | 39 | } |
40 | 40 | else { |
@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | } |
43 | 43 | //Nick - Added the type filter session to the sort hook |
44 | 44 | $entity_list = mm_sort_mission_decider($_SESSION['missions_sort_field_value'], $_SESSION['missions_order_field_value'], $entity_list, $_SESSION['missions_type_field_value'], $_SESSION['missions_role_field_value']); |
45 | -$count = count($entity_list); // count the filtered list |
|
46 | -if ( $offset >= $count ) // reset offset if it no longer makes sense after filtering |
|
45 | +$count = count($entity_list); // count the filtered list |
|
46 | +if ($offset >= $count) // reset offset if it no longer makes sense after filtering |
|
47 | 47 | $offset = 0; |
48 | 48 | |
49 | 49 | $max_reached = ''; |
50 | -if(($offset + $max) >= elgg_get_plugin_setting('search_limit', 'missions') && $count >= elgg_get_plugin_setting('search_limit', 'missions')) { |
|
50 | +if (($offset + $max) >= elgg_get_plugin_setting('search_limit', 'missions') && $count >= elgg_get_plugin_setting('search_limit', 'missions')) { |
|
51 | 51 | $max_reached = '<div class="col-sm-12" style="font-style:italic;">' . elgg_echo('missions:reached_maximum_entities') . '</div>'; |
52 | 52 | } |
53 | 53 |
@@ -36,15 +36,16 @@ |
||
36 | 36 | $offset = (int) get_input('offset', 0); |
37 | 37 | if($entities_per_page) { |
38 | 38 | $max = $entities_per_page; |
39 | -} |
|
40 | -else { |
|
39 | +} else { |
|
41 | 40 | $max = elgg_get_plugin_setting('search_result_per_page', 'missions'); |
42 | 41 | } |
43 | 42 | //Nick - Added the type filter session to the sort hook |
44 | 43 | $entity_list = mm_sort_mission_decider($_SESSION['missions_sort_field_value'], $_SESSION['missions_order_field_value'], $entity_list, $_SESSION['missions_type_field_value'], $_SESSION['missions_role_field_value']); |
45 | 44 | $count = count($entity_list); // count the filtered list |
46 | -if ( $offset >= $count ) // reset offset if it no longer makes sense after filtering |
|
45 | +if ( $offset >= $count ) { |
|
46 | + // reset offset if it no longer makes sense after filtering |
|
47 | 47 | $offset = 0; |
48 | +} |
|
48 | 49 | |
49 | 50 | $max_reached = ''; |
50 | 51 | if(($offset + $max) >= elgg_get_plugin_setting('search_limit', 'missions') && $count >= elgg_get_plugin_setting('search_limit', 'missions')) { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <script> |
16 | - document.getElementById('<?php echo $vars['restricted_element_id'];?>').onclick = function() { |
|
16 | + document.getElementById('<?php echo $vars['restricted_element_id']; ?>').onclick = function() { |
|
17 | 17 | document.body.style.cursor = 'wait'; |
18 | 18 | this.disabled = true; |
19 | 19 | this.form.submit(); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | $value = ''; |
18 | 18 | $container_style = 'none'; |
19 | -if($vars['value_override']) { |
|
19 | +if ($vars['value_override']) { |
|
20 | 20 | $value = $vars['value_override']; |
21 | 21 | $container_style = 'block'; |
22 | 22 | } |
@@ -32,24 +32,24 @@ |
||
32 | 32 | )); |
33 | 33 | |
34 | 34 | $input_role = elgg_view('input/dropdown', array( |
35 | - 'name' => 'job_role', |
|
36 | - 'value' => '', |
|
35 | + 'name' => 'job_role', |
|
36 | + 'value' => '', |
|
37 | 37 | 'options_values' => array('' => '') + mm_echo_explode_setting_string(elgg_get_plugin_setting('opportunity_role_string', 'missions')), |
38 | - 'id' => 'data-analytics-role-dropdown-input' |
|
38 | + 'id' => 'data-analytics-role-dropdown-input' |
|
39 | 39 | )); |
40 | 40 | |
41 | 41 | $input_type = elgg_view('input/dropdown', array( |
42 | - 'name' => 'job_type', |
|
43 | - 'value' => '', |
|
42 | + 'name' => 'job_type', |
|
43 | + 'value' => '', |
|
44 | 44 | 'options_values' => array('' => '') + mm_echo_explode_setting_string(elgg_get_plugin_setting('opportunity_type_string', 'missions')), |
45 | - 'id' => 'data-analytics-type-dropdown-input' |
|
45 | + 'id' => 'data-analytics-type-dropdown-input' |
|
46 | 46 | )); |
47 | 47 | |
48 | 48 | $input_status = elgg_view('input/dropdown', array( |
49 | - 'name' => 'status', |
|
50 | - 'value' => '', |
|
49 | + 'name' => 'status', |
|
50 | + 'value' => '', |
|
51 | 51 | 'options_values' => array('' => '') + mm_echo_explode_setting_string(elgg_get_plugin_setting('opportunity_status_string', 'missions')), |
52 | - 'id' => 'data-analytics-status-dropdown-input' |
|
52 | + 'id' => 'data-analytics-status-dropdown-input' |
|
53 | 53 | )); |
54 | 54 | |
55 | 55 | $graph_generate_button = elgg_view('output/url', array( |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | <div class="col-sm-12" style="margin:4px;"> |
108 | 108 | <label for='data-analytics-graph-type-dropdown-input' class="col-sm-3" style="text-align:right;"> |
109 | - <?php echo elgg_echo('missions:graph_type') . ':';?> |
|
109 | + <?php echo elgg_echo('missions:graph_type') . ':'; ?> |
|
110 | 110 | </label> |
111 | 111 | <div class="col-sm-3"> |
112 | 112 | <?php echo $input_graph_type; ?> |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | <div id="graph-type-inputs"></div> |
116 | 116 | <div class="col-sm-12" style="margin:4px;" id="department-input-row"> |
117 | 117 | <label class="col-sm-3" style="text-align:right;"> |
118 | - <?php echo elgg_echo('missions:department') . ':';?> |
|
118 | + <?php echo elgg_echo('missions:department') . ':'; ?> |
|
119 | 119 | </label> |
120 | 120 | <div class="col-sm-3"> |
121 | 121 | <?php echo $input_department; ?> |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | </div> |
124 | 124 | <div class="col-sm-12" style="margin:4px;" id="role-input-row"> |
125 | 125 | <label class="col-sm-3 text-right"> |
126 | - <?php echo elgg_echo('missions:opportunity_role') . ':';?> |
|
126 | + <?php echo elgg_echo('missions:opportunity_role') . ':'; ?> |
|
127 | 127 | </label> |
128 | 128 | <div class="col-sm-3"> |
129 | 129 | <?php echo $input_role; ?> |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | </div> |
132 | 132 | <div class="col-sm-12" style="margin:4px;" id="type-input-row"> |
133 | 133 | <label class="col-sm-3 text-right"> |
134 | - <?php echo elgg_echo('missions:opportunity_type') . ':';?> |
|
134 | + <?php echo elgg_echo('missions:opportunity_type') . ':'; ?> |
|
135 | 135 | </label> |
136 | 136 | <div class="col-sm-3"> |
137 | 137 | <?php echo $input_type; ?> |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | </div> |
140 | 140 | <div class="col-sm-12" style="margin:4px;" id="status-input-row"> |
141 | 141 | <label class="col-sm-3 text-right"> |
142 | - <?php echo elgg_echo('missions:opportunity_status') . ':';?> |
|
142 | + <?php echo elgg_echo('missions:opportunity_status') . ':'; ?> |
|
143 | 143 | </label> |
144 | 144 | <div class="col-sm-3"> |
145 | 145 | <?php echo $input_status; ?> |