Add the container class to some views

main
Michael Weimann 5 years ago committed by Igor Scheller
parent 3f13549771
commit ea034ecec6

@ -170,7 +170,7 @@ function admin_rooms()
]), ]),
form_submit('submit', __('Save')) form_submit('submit', __('Save'))
]) ])
]); ], true);
} elseif ($request->input('show') == 'delete') { } elseif ($request->input('show') == 'delete') {
if ($request->hasPostData('ack')) { if ($request->hasPostData('ack')) {
$shifts = Shifts_by_room($room_id); $shifts = Shifts_by_room($room_id);
@ -195,7 +195,7 @@ function admin_rooms()
form([ form([
form_submit('ack', __('Delete'), 'delete btn-danger'), form_submit('ack', __('Delete'), 'delete btn-danger'),
], page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room_id])), ], page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room_id])),
]); ], true);
} }
} }
@ -209,5 +209,5 @@ function admin_rooms()
'map_url' => __('Map'), 'map_url' => __('Map'),
'actions' => '' 'actions' => ''
], $rooms) ], $rooms)
]); ], true);
} }

@ -32,7 +32,8 @@ function meetings_title()
function user_meetings() function user_meetings()
{ {
$display_news = config('display_news'); $display_news = config('display_news');
$html = '<div class="col-md-12"><h1>' . meetings_title() . '</h1>' . msg(); $html = '<div class="container">';
$html .= '<h1>' . meetings_title() . '</h1>' . msg();
$request = request(); $request = request();
if (preg_match('/^\d{1,}$/', $request->input('page', 0))) { if (preg_match('/^\d{1,}$/', $request->input('page', 0))) {
@ -128,7 +129,8 @@ function user_news_comments()
$user = auth()->user(); $user = auth()->user();
$request = request(); $request = request();
$html = '<div class="col-md-12"><h1>' . user_news_comments_title() . '</h1>'; $html = '<div class="container">';
$html .= '<h1>' . user_news_comments_title() . '</h1>';
$nid = $request->input('nid'); $nid = $request->input('nid');
if ( if (
$request->has('nid') $request->has('nid')
@ -179,7 +181,8 @@ function user_news()
$display_news = config('display_news'); $display_news = config('display_news');
$request = request(); $request = request();
$html = '<div class="col-md-12"><h1>' . news_title() . '</h1>' . msg(); $html = '<div class="container">';
$html .= '<h1>' . news_title() . '</h1>' . msg();
$isMeeting = $request->postData('treffen', false); $isMeeting = $request->postData('treffen', false);
if ($request->has('text') && $request->has('betreff') && auth()->can('admin_news')) { if ($request->has('text') && $request->has('betreff') && auth()->can('admin_news')) {

@ -251,11 +251,17 @@ function page($elements)
* *
* @param string $title * @param string $title
* @param string[] $elements * @param string[] $elements
* @param bool $container
* @return string * @return string
*/ */
function page_with_title($title, $elements) function page_with_title($title, $elements, bool $container = false)
{ {
return '<div class="col-md-12"><h1>' . $title . '</h1>' . join($elements) . '</div>'; if ($container) {
$html = '<div class="container">';
} else {
$html = '<div class="col-md-12">';
}
return $html . '<h1>' . $title . '</h1>' . join($elements) . '</div>';
} }
/** /**

@ -64,7 +64,7 @@ function AngelType_delete_view($angeltype)
form_submit('delete', glyph('ok') . __('delete'), 'btn-danger', false), form_submit('delete', glyph('ok') . __('delete'), 'btn-danger', false),
]) ])
]), ]),
]); ], true);
} }
/** /**
@ -360,7 +360,7 @@ function AngelType_view(
$shiftCalendarRenderer $shiftCalendarRenderer
) )
], $tab) ], $tab)
]); ], true);
} }
/** /**
@ -507,7 +507,7 @@ function AngelTypes_list_view($angeltypes, $admin_angeltypes)
'membership' => __('Membership'), 'membership' => __('Membership'),
'actions' => '' 'actions' => ''
], $angeltypes) ], $angeltypes)
]); ], true);
} }
/** /**
@ -595,5 +595,5 @@ function AngelTypes_about_view($angeltypes, $user_logged_in)
$content[] = AngelTypes_about_view_angeltype($angeltype); $content[] = AngelTypes_about_view_angeltype($angeltype);
} }
return page_with_title(__('Teams/Job description'), $content); return page_with_title(__('Teams/Job description'), $content, true);
} }

@ -61,5 +61,5 @@ function Questions_view(array $open_questions, array $answered_questions, $ask_a
form_textarea('question', __('Your Question:'), ''), form_textarea('question', __('Your Question:'), ''),
form_submit('submit', __('Save')) form_submit('submit', __('Save'))
], $ask_action) ], $ask_action)
]); ], true);
} }

@ -54,7 +54,7 @@ function Room_view($room, ShiftsFilterRenderer $shiftsFilterRenderer, ShiftCalen
$assignNotice, $assignNotice,
$description, $description,
tabs($tabs, $selected_tab) tabs($tabs, $selected_tab)
]); ], true);
} }
/** /**

@ -31,7 +31,7 @@ function ShiftType_delete_view($shifttype)
), ),
]), ]),
]), ]),
]); ], true);
} }
/** /**
@ -63,7 +63,7 @@ function ShiftType_edit_view($name, $angeltype_id, $angeltypes, $description, $s
form_info('', __('Please use markdown for the description.')), form_info('', __('Please use markdown for the description.')),
form_submit('submit', __('Save')) form_submit('submit', __('Save'))
]) ])
]); ], true);
} }
/** /**
@ -99,7 +99,7 @@ function ShiftType_view($shifttype, $angeltype)
]), ]),
heading(__('Description'), 2), heading(__('Description'), 2),
$parsedown->parse($shifttype['description']) $parsedown->parse($shifttype['description'])
]); ], true);
} }
/** /**
@ -140,5 +140,5 @@ function ShiftTypes_list_view($shifttypes)
'name' => __('Name'), 'name' => __('Name'),
'actions' => '' 'actions' => ''
], $shifttypes) ], $shifttypes)
]); ], true);
} }

@ -123,7 +123,7 @@ function UserAngelType_delete_view($user_angeltype, $user, $angeltype)
form_submit('delete', glyph('ok') . __('yes'), 'btn-primary', false), form_submit('delete', glyph('ok') . __('yes'), 'btn-primary', false),
]), ]),
], page_link_to('user_angeltypes', ['action' => 'delete', 'user_angeltype_id' => $user_angeltype['id']])), ], page_link_to('user_angeltypes', ['action' => 'delete', 'user_angeltype_id' => $user_angeltype['id']])),
]); ], true);
} }
/** /**

Loading…
Cancel
Save