Skip to content

Commit

Permalink
Moved to Symfony 5. Code cleanup. Make use of Encore.
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismeonmounteverest committed Apr 5, 2020
1 parent cfae1af commit 09f3cc1
Show file tree
Hide file tree
Showing 131 changed files with 8,860 additions and 9,186 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ MAILER_URL=null://localhost

new_members_messages_per_hour=5
new_members_messages_per_day=10
new_members_requests_per_hour=5
new_members_requests_per_day=10
group_directory=data/groups
gallery_directory=data/gallery
upload_directory=data/uploaded
Expand Down
14 changes: 5 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ rox_local.ini
.php_cs.cache
.phpunit.result.cache
/data/*
!/data/.keep
google*.html
tools/testenv/images/status.csv
components/*
Expand Down Expand Up @@ -63,14 +62,6 @@ bewelcome.sql.bz2
/.php_cs
/.php_cs.cache
###< friendsofphp/php-cs-fixer ###

###> phpunit/phpunit ###
/phpunit.xml
###< phpunit/phpunit ###
###> symfony/web-server-bundle ###
/.web-server-pid
###< symfony/web-server-bundle ###

###> symfony/phpunit-bridge ###
.phpunit
/phpunit.xml
Expand All @@ -82,3 +73,8 @@ bewelcome.sql.bz2
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###

###> squizlabs/php_codesniffer ###
/.phpcs-cache
/phpcs.xml
###< squizlabs/php_codesniffer ###
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,3 @@ phpmetrics:

version:
git rev-parse --short HEAD > VERSION

checkjs:
./node_modules/.bin/grunt checkjs

10 changes: 6 additions & 4 deletions assets/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ $line-height: 1.5;
$headings-font-family: "Signika";
$table-bg-accent: #f9f9f9;
$table-bg-hover: #f5f5f5;
$input-btn-padding-y: .375rem;
$input-btn-primary-border: rgba(255,255,255,.5);
$input-btn-padding-x-sm: .75rem;
$input-btn-padding-x-lg: 1.25rem;
$input-btn-padding-x: .75rem !default;
$input-btn-padding-y: .375rem;
$input-btn-primary-border: rgba(255,255,255,.5);
$input-btn-padding-x-sm: .75rem;
$input-btn-padding-x-lg: 1.25rem;
$btn-block-spacing-y: 5px;
$btn-toolbar-margin: 5px;
$input-padding-x: .375rem;
$input-padding-y: .375rem;
$input-border-color: #ccc;
$input-padding-x-sm: .75rem;
Expand Down
75 changes: 75 additions & 0 deletions assets/scss/floating_labels.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
.floating-label {
position: relative;
}

.floating-label > label {
position: absolute;
display: block;
left: .375rem;
width: 100%;
margin-bottom: 0; /* Override default `<label>` margin */
line-height: 1.5;
color: #495057;
pointer-events: none;
cursor: text; /* Match the input under the label */
border: 1px solid transparent;
border-radius: .25rem;
transition: all .1s ease-in-out;
}

.floating-label input::-webkit-input-placeholder {
color: transparent;
}

.floating-label input:-ms-input-placeholder {
color: transparent;
}

.floating-label input::-ms-input-placeholder {
color: transparent;
}

.floating-label input::-moz-placeholder {
color: transparent;
}

.floating-label input::placeholder {
color: transparent;
}

.floating-label input:not(:placeholder-shown) {
padding-top: .375rem;
padding-bottom: .375rem;
}

.floating-label input:not(:placeholder-shown) ~ label {
padding-top: 0;
top: 0;
left: .375rem;
padding-bottom: .25rem;
font-weight: bold;
font-size: 9px;
color: #222;
}

/* Fallback for Edge
-------------------------------------------------- */
@supports (-ms-ime-align: auto) {
.floating-label > label {
display: none;
}
.form-label-group input::-ms-input-placeholder {
color: #777;
}
}

/* Fallback for IE
-------------------------------------------------- */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.floating-label > label {
display: none;
}
.floating-label input:-ms-input-placeholder {
color: #777;
}
}
8 changes: 4 additions & 4 deletions build/about/templates/getactive.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div class="col-12 col-md-6 mb-3">
<div class="card p-3 h-100">
<div class="card-body">
<h3 class="card-title m-0"><i class="fa fa-question-circle-o"
<h3 class="card-title m-0"><i class="far fa-question-circle"
aria-hidden="true"></i> <?php echo $words->get('GetActiveSupportTitle') ?></h3>
<p class="text-muted"><?php echo $words->get('HelpBeWelcomeSupportTags') . " <br> " . $words->get('HelpBeWelcomeContact') . ": " . $words->get('GetActiveSupportContact') ?></p>
<p class="card-text"><?php echo $words->get('GetActiveSupportText') ?></p>
Expand All @@ -70,7 +70,7 @@
<div class="col-12 col-md-6 mb-3">
<div class="card p-3 h-100">
<div class="card-body">
<h3 class="card-title m-0"><i class="fa fa-handshake-o"
<h3 class="card-title m-0"><i class="far fa-handshake"
aria-hidden="true"></i> <?php echo $words->get('GetActiveNMBWTitle') ?></h3>
<p class="text-muted"><?php echo $words->get('HelpBeWelcomeNMBWTags') . " <br> " . $words->get('HelpBeWelcomeContact') . ": " . $words->get('GetActiveNMBWContact') ?></p>
<p class="card-text"><?php echo $words->get('GetActiveNMBWText') ?></p>
Expand Down Expand Up @@ -125,7 +125,7 @@
<div class="col-12 col-md-6 mb-3">
<div class="card p-3 h-100">
<div class="card-body">
<h3 class="card-title m-0"><i class="fa fa-money"
<h3 class="card-title m-0"><i class="fa fa-euro-sign"
aria-hidden="true"></i> <?php echo $words->get('GetActiveDonationTitle') ?></h3>
<p class="text-muted"><?php echo $words->get('HelpBeWelcomeDonationTags') . " <br> " . $words->get('HelpBeWelcomeContact') . ": " . $words->get('GetActiveDonationContact') ?></p>
<p class="card-text"><?php echo $words->get('GetActiveDonationText') ?></p>
Expand All @@ -144,4 +144,4 @@
</div>
</div>
</div>
</div>
</div>
22 changes: 11 additions & 11 deletions build/activities/templates/activitieslist.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// activities map data
echo '<div id="activities-data" class="table-responsive">';

$latitudeMin = null;
$latitudeMax = null;
$longitudeMin = null;
Expand All @@ -26,26 +26,26 @@

if ($location != null && $location->latitude != null && $location->longitude != null){
echo '<tr>';

// activity title
echo '<td>' . $activity->title . '</td>';

// location name
echo '<td>' . $location->name . '</td>';
// location latitude
echo '<td>' . $location->latitude . '</td>';
// location longitude
echo '<td>' . $location->longitude . '</td>';

// activity details link URL
echo '<td>' . $env_conf->baseuri . 'activities/' . $activity->id . '</td>';

// date start
echo '<td>' . $activity->dateStart . '</td>';

// address
echo '<td>' . $activity->address . '</td>';

echo '</tr>';

// update the bounds of the map with this point
Expand All @@ -68,10 +68,10 @@

}
echo '</table>';

if ($latitudeMin != null){
// at least one point with valid location

// min & max latitude
echo '<input type="hidden" id="activity-data-min-latitude" value="' . $latitudeMin . '" />';
echo '<input type="hidden" id="activity-data-max-latitude" value="' . $latitudeMax . '" />';
Expand Down Expand Up @@ -132,11 +132,11 @@
}
echo $locationName . '<br>' . $countryName; ?>
</div>
<div class="px-2"><i class="fa fa-25 fa-map-marker-alt"></i></div>
<div class="px-2"><i class="fa fa-2x fa-map-marker-alt"></i></div>
</div>

<div class="ml-auto flex-md-row d-none d-md-flex">
<div><i class="fa fa-25 fa fa-user-circle-o"></i></div>
<div><i class="far fa-2x fa-user"></i></div>
<div class="attendees">
<?php
echo '<p class="p-0 m-0 pl-2';
Expand Down
6 changes: 3 additions & 3 deletions build/activities/templates/activitiesshow.column_col3.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
<?php
if ($this->activity->dateStart == $this->activity->dateEnd) {
echo '<i class="far fa-calendar-alt mr-1"></i>' . $this->activity->dateStart . '<br>';
echo '<i class="far fa-clock mr-1"></i> <span class="compacttext back">' . $this->activity->timeStart . ' - ' . $this->activity->timeEnd . '</span><br>';
echo '<i class="far fa-clock mr-1"></i>' . $this->activity->timeStart . ' - ' . $this->activity->timeEnd . '<br>';
} else {
echo '<i class="far fa-calendar-alt mr-1"></i>' . $this->activity->dateStart . ' <i class="far fa-clock px-2"></i><span class="compacttext back">' . $this->activity->timeStart . '</span><br>';
echo '<i class="far fa-calendar-alt mr-1"></i>' . $this->activity->dateEnd . ' <i class="far fa-clock px-2"></i><span class="compacttext back">' . $this->activity->timeEnd . '</span>';
echo '<i class="far fa-calendar-alt mr-1"></i>' . $this->activity->dateStart . ' <i class="far fa-clock mr-1"></i>' . $this->activity->timeStart . '<br>';
echo '<i class="far fa-calendar-alt mr-1"></i>' . $this->activity->dateEnd . ' <i class="far fa-clock mr-1"></i>' . $this->activity->timeEnd . '';
} ?>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion build/forums/forums.ctrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function index($subforum = false) {

$page = $view->page = new RoxGenericPage();

$page->setEngine($this->engine);
$page->setEnvironment($this->environment);

$request = $this->request;
if (isset($request[0]) && $request[0] != 'forums') {
Expand Down
4 changes: 2 additions & 2 deletions build/groups/groupforum.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function column_col3()
$memberlist_widget->setGroup($this->group);

$Forums = new ForumsController;
$Forums->setEngine($this->engine);
$Forums->setEngine($this->environment);
$Forums->index('group');
//$forums_widget->setGroup($this->getGroup());

Expand All @@ -72,7 +72,7 @@ protected function column_col3()
{
$words = $this->getWords();
$Forums = new ForumsController;
$Forums->setEngine($this->engine);
$Forums->setEngine($this->environment);
$Forums->index();
}

Expand Down
6 changes: 3 additions & 3 deletions build/members/pages/member.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function getSubmenuItems()
$tt=array(
array('editmyprofile', 'editmyprofile/' . $profile_language_code, '<i class="fa fa-fw fa-edit"></i> ' . $ww->EditMyProfile, 'editmyprofile'),
array('mypreferences', 'mypreferences', '<i class="fa fa-fw fa-cogs"></i> ' . $ww->MyPreferences, 'mypreferences'),
array('mydata', 'mydata/'.$username, '<i class="fa fa-fw fa-database"></i> ' . $ww->MyData, 'mydata'),
array('mydata', 'mydata', '<i class="fa fa-fw fa-database"></i> ' . $ww->MyData, 'mydata'),
array('mynotes', 'mynotes', '<i class="fa fa-fw fa-sticky-note"></i> ' . $words->get('MyNotes', '<span class="badge badge-primary pull-right">' . $mynotes_count . '</span>'), 'mynotes')
);

Expand Down Expand Up @@ -145,8 +145,8 @@ protected function getSubmenuItems()
{
$tt[] = array('adminedit',"members/{$username}/adminedit", '<i class="fa fa-fw fa-bed invisible"></i> Admin: Edit Profile');
}
if (MOD_right::get()->HasRight('SafetyTeam') || MOD_right::get()->HasRight('Admin') || Mod_right::get()->HasRight('Profile')) {
$tt[] = array('mydata', 'mydata/'.$username, '<i class="fa fa-fw fa-database"></i> ' . $ww->PersonalData, 'personaldata');
if (MOD_right::get()->HasRight('SafetyTeam') || MOD_right::get()->HasRight('Admin')) {
$tt[] = array('mydata', 'members/'.$username.'/data', '<i class="fa fa-fw fa-database"></i> ' . $ww->PersonalData, 'personaldata');
}
if (MOD_right::get()->HasRight('Rights')) {
array_push($tt,array('adminrights','admin/rights/list/members/'.$username, '<i class="fa fa-fw fa-bed invisible"></i> ' . $ww->AdminRights) ) ;
Expand Down
12 changes: 6 additions & 6 deletions build/members/templates/addcomment.column_col3.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// values from previous form submit
if (!$mem_redirect = $this->layoutkit->formkit->getMemFromRedirect()) {
// this is a fresh form
$ttRelation = ($TCom) ? explode(',',$TCom->Relation) : array();
$ttRelation = ($TCom) ? explode(',',$TCom->Relations) : array();
if ($this->commentGuidelinesRead) {
$vars["CommentGuidelines"] = 'checked';
}
Expand Down Expand Up @@ -90,7 +90,7 @@


<?php
// Display errors from last submit
// Display errors from last submit
if (isset($vars['errors']) && !empty($vars['errors']))
{
foreach ($vars['errors'] as $error)
Expand All @@ -99,7 +99,7 @@
}
}

// Display the form to propose to add a comment
// Display the form to propose to add a comment
?>
<?php
if (isset($TCom->comQuality) && $TCom->comQuality == "Bad" && $TCom->AllowEdit != 1) {
Expand Down Expand Up @@ -134,7 +134,7 @@
<i class="fa fa-question"></i>
</a>

<select class="custom-select mb-2 mr-sm-2 mb-sm-0" name="Quality" id="Quality">
<select class="select2 mb-2 mr-sm-2 mb-sm-0" name="Quality" id="Quality">
<option value=""><?=$words->getSilent("CommentQuality_SelectOne")?></option>
<option value="Good"
<?=(isset($TCom->comQuality) && $TCom->comQuality == "Good") ? " selected " : ""?>
Expand Down Expand Up @@ -225,7 +225,7 @@ function DoVerifySubmit(nameform) {
trigger: 'focus'
})
</script>
<?php
}
<?php
}
$words->flushBuffer();?>

Loading

0 comments on commit 09f3cc1

Please sign in to comment.