Add compare selected button to top
3 unresolved threads
3 unresolved threads
- Extracted the button into a variable
- Refectored bottom button with extracted var
Closes #3183380
Merge request reports
Activity
added 12 commits
-
381f1963...6eef3b1d - 11 commits from branch
project:8.x-1.x
- bc92eda1 - Merge branch '8.x-1.x' into 3183380-add-compare-revisions
-
381f1963...6eef3b1d - 11 commits from branch
200 200 201 // Submit button for the form. 202 $compare_revision_submit = [ 203 '#type' => 'submit', 204 '#button_type' => 'primary', 205 '#value' => t('Compare selected revisions'), 206 '#attributes' => [ 207 'class' => [ 208 'diff-button', 209 ], 210 ], 211 ]; 212 213 // If the form is too long add a submit button on top of the screen. 214 if ($revision_count > 5) { 215 // This automatically satisfy if the revisions are greater then 1. changed this line in version 4 of the diff
299 317 300 318 // Allow comparisons only if there are 2 or more revisions. 301 319 if ($revision_count > 1) { 302 $build['submit'] = [ 303 '#type' => 'submit', 304 '#button_type' => 'primary', 305 '#value' => t('Compare selected revisions'), 306 '#attributes' => [ 307 'class' => [ 308 'diff-button', 309 ], 310 ], 311 ]; 320 $build['submit_bottom'] = $compare_revision_submit; changed this line in version 4 of the diff
286 290 } 287 291 } 288 292 293 /** 294 * Tests pager on diff overview. 295 */ 296 public function testRevisionOverviewLong() { changed this line in version 4 of the diff
added 1 commit
- e2c2d5fc - Address feedback: Consolidate tests, rename submit button key, better comments
added 5 commits
Toggle commit list
Please register or sign in to reply