diff --git a/.gitattributes b/.gitattributes index 21256661..e69de29b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +0,0 @@ -* text=auto \ No newline at end of file diff --git a/README.md b/README.md index e19b379d..0e907ffd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## SeAT - Simple (or Stupid) EVE Online API Tool ## -[![Latest Stable Version](https://poser.pugx.org/eve-seat/seat/v/stable.svg)](https://packagist.org/packages/eve-seat/seat) [![Total Downloads](https://poser.pugx.org/eve-seat/seat/downloads.svg)](https://packagist.org/packages/eve-seat/seat) [![Latest Unstable Version](https://poser.pugx.org/eve-seat/seat/v/unstable.svg)](https://packagist.org/packages/eve-seat/seat) [![License](https://poser.pugx.org/eve-seat/seat/license.svg)](https://packagist.org/packages/eve-seat/seat) +[![Latest Stable Version](https://poser.pugx.org/eve-seat/seat/v/stable.svg)](https://packagist.org/packages/eve-seat/seat) [![Latest Unstable Version](https://poser.pugx.org/eve-seat/seat/v/unstable.svg)](https://packagist.org/packages/eve-seat/seat) [![License](https://poser.pugx.org/eve-seat/seat/license.svg)](https://packagist.org/packages/eve-seat/seat) ##### *SeAT is still under heavy development and is not considered 100% stable yet. USE AT YOUR OWN RISK* ##### diff --git a/app/commands/SeatAPIUpdate.php b/app/commands/SeatAPIUpdate.php index 5379546b..7eb17121 100644 --- a/app/commands/SeatAPIUpdate.php +++ b/app/commands/SeatAPIUpdate.php @@ -72,9 +72,9 @@ public function fire() // Call the addToQueue helper to queue jobs for // the EVE Server, Map and General EVE info - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Server'), 0, NULL, 'ServerStatus', 'Server'); - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Map'), 0, NULL, 'Map', 'Eve'); - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Eve'), 0, NULL, 'Eve', 'Eve'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Server', 0, NULL, 'ServerStatus', 'Server'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Map', 0, NULL, 'Map', 'Eve'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Eve', 0, NULL, 'Eve', 'Eve'); // Log the start of the key processing \Log::info('Starting job submissions for all keys', array('src' => __CLASS__)); @@ -105,11 +105,11 @@ public function fire() // Do a fresh AccountStatus lookup Account\AccountStatus::update($key->keyID, $key->vCode); - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Character'), $key->keyID, $key->vCode, 'Character', 'Eve'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Character', $key->keyID, $key->vCode, 'Character', 'Eve'); break; case 'Corporation': - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Corporation'), $key->keyID, $key->vCode, 'Corporation', 'Eve'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Corporation', $key->keyID, $key->vCode, 'Corporation', 'Eve'); break; default: diff --git a/app/commands/SeatDiagnose.php b/app/commands/SeatDiagnose.php index 3b61f2f1..22d6d39c 100644 --- a/app/commands/SeatDiagnose.php +++ b/app/commands/SeatDiagnose.php @@ -71,21 +71,20 @@ public function fire() $this->info('Running SeAT ' . \Config::get('seat.version') . ' Diagnostics'); $this->line(''); - // It is important to run the command as the user that the - // workers are running as. This allows for the checks - // for file permissions to logs to be checked - // correctly. Lets notify the user about - // this - $this->comment('If you are not already doing so, it is reccomended that you run this as the user the workers are running as.'); - $this->comment('Eg: `sudo -u apache /usr/bin/php /var/www/seat/artisan seat:diagnose`.'); - $this->comment('This allows you to ensure the correct permissions are in place as required.'); + // It is important to run the command as the user that the workers are running as. + // This way, the checks that ensure file permissions are right are executed + // properly. If this is not the case, notify the user + + $this->comment('If you are not already doing so, it is recommended that you run this as the user the workers are running as.'); + $this->comment('Eg: `sudo -u apache php artisan seat:diagnose`.'); + $this->comment('This helps to check whether the permissions are correct.'); $this->line(''); // Go ahead and get the configuration information using // the \Config helper and print that $this->info('SeAT configuration:'); if (\Config::get('app.debug')) - $this->comment('[warning] Debug Mode On: Yes. It is reccomended that you set this to false in app/config/app.php'); + $this->comment('[warning] Debug Mode On: Yes. It is recommended that you set this to false in app/config/app.php'); else $this->line('[ok] Debug Mode On: No'); $this->line('Url: ' . \Config::get('app.url')); diff --git a/app/config/seat.php b/app/config/seat.php index 25de69a2..d257b157 100644 --- a/app/config/seat.php +++ b/app/config/seat.php @@ -32,7 +32,7 @@ | */ - 'version' => '0.13.0', + 'version' => '0.14.0', /* |-------------------------------------------------------------------------- diff --git a/app/controllers/CharacterController.php b/app/controllers/CharacterController.php index 9e94c5ba..53feffa6 100644 --- a/app/controllers/CharacterController.php +++ b/app/controllers/CharacterController.php @@ -195,6 +195,9 @@ public function getAjaxCharacterSheet($characterID) $jump_clones = DB::table(DB::raw('character_charactersheet_jumpclones as a')) ->select(DB::raw(" *, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -490,6 +493,9 @@ public function getAjaxAssets($characterID) $assets = DB::table(DB::raw('character_assetlist as a')) ->select(DB::raw(" *, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -631,6 +637,9 @@ public function getAjaxContracts($characterID) $contract_list = DB::table(DB::raw('character_contracts as a')) ->select(DB::raw( "*, CASE + when a.startStationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.startStationID-6000000) when a.startStationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.startStationID-6000001) @@ -650,6 +659,9 @@ public function getAjaxContracts($characterID) WHERE m.itemID=a.startStationID) end AS startlocation, CASE + when a.endstationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.endStationID-6000000) when a.endStationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.endStationID-6000001) @@ -775,6 +787,9 @@ public function getAjaxMarketOrders($characterID) $market_orders = DB::table(DB::raw('character_marketorders as a')) ->select(DB::raw( "*, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) @@ -1290,6 +1305,9 @@ public function postSearchAssets() $assets = DB::table(DB::raw('character_assetlist as a')) ->select(DB::raw( "*, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -1385,6 +1403,9 @@ public function getAjaxIndustry($characterID) $current_jobs = DB::table('character_industryjobs as a') ->select(DB::raw(" *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) @@ -1412,6 +1433,9 @@ public function getAjaxIndustry($characterID) $finished_jobs = DB::table('character_industryjobs as a') ->select(DB::raw(" *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) diff --git a/app/controllers/CorporationController.php b/app/controllers/CorporationController.php index 046fa61e..614e34d3 100644 --- a/app/controllers/CorporationController.php +++ b/app/controllers/CorporationController.php @@ -28,6 +28,41 @@ class CorporationController extends BaseController { + /* + |-------------------------------------------------------------------------- + | getAll() + |-------------------------------------------------------------------------- + | + | Get all of the corporations on record + | + */ + public function getAll() + { + + // Query the databse for all the characters and some related + // information + $corporations = DB::table('account_apikeyinfo') + ->leftJoin('seat_keys', 'account_apikeyinfo.keyID', '=', 'seat_keys.keyID') + ->leftJoin('account_apikeyinfo_characters', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') + ->leftJoin('corporation_corporationsheet', 'account_apikeyinfo_characters.corporationID', '=', 'corporation_corporationsheet.corporationID') + ->where('account_apikeyinfo.type', '=', 'Corporation') + ->orderBy('seat_keys.isOk', 'asc') + ->orderBy('account_apikeyinfo_characters.corporationName', 'asc') + ->groupBy('account_apikeyinfo_characters.characterID'); + + // Check that we only return characters that the current + // user has access to. SuperUser() automatically + // inherits all permissions + if (!\Auth::hasAccess('recruiter')) + $corporations = $corporations->whereIn('seat_keys.keyID', Session::get('valid_keys')) + ->get(); + else + $corporations = $corporations->get(); + + return View::make('corporation.all') + ->with('corporations', $corporations); + } + /* |-------------------------------------------------------------------------- | getListJournals() @@ -239,6 +274,9 @@ public function getAssets($corporationID) $assets = DB::select( "SELECT *, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -399,6 +437,9 @@ public function getContracts($corporationID) // Contract list $contract_list = DB::select( 'SELECT *, CASE + when a.startStationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.startStationID-6000000) when a.startStationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.startStationID-6000001) @@ -418,6 +459,9 @@ public function getContracts($corporationID) WHERE m.itemID=a.startStationID) end AS startlocation, CASE + when a.endStationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.endStationID-6000000) when a.endStationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.endStationID-6000001) @@ -1102,6 +1146,11 @@ public function getLedgerSummary($corporationID) ->where('corporation_accountbalance.corporationID', $corporationID) ->get(); + $wallet_balances_total = 0; + foreach($wallet_balances as $div) { + $wallet_balances_total += $div->balance; + } + // The overall corporation ledger. We will loop over the wallet divisions // and get the ledger calculated for each $ledgers = array(); @@ -1154,6 +1203,16 @@ public function getLedgerSummary($corporationID) ->orderBy('total', 'desc') ->get(); + $incursions_tax = DB::table('corporation_walletjournal') + ->select('ownerID2', 'ownerName2', DB::raw('SUM(corporation_walletjournal.amount) total')) + ->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID') + ->where('corporation_walletjournal.refTypeID', 99) // Ref type id 99: Corporate Reward Payout (yeah, seriously ...) + ->where('corporation_walletjournal.ownerName1', "CONCORD") // check if the payout came from CONCORD + ->where('corporation_walletjournal.corporationID', $corporationID) + ->groupBy('corporation_walletjournal.ownerName2') + ->orderBy('total', 'desc') + ->get(); + return View::make('corporation.ledger.ledger') ->with('corporationID', $corporationID) ->with('ledger_dates', $ledger_dates) @@ -1161,7 +1220,9 @@ public function getLedgerSummary($corporationID) ->with('ledgers', $ledgers) ->with('bounty_tax', $bounty_tax) ->with('mission_tax', $mission_tax) - ->with('pi_tax', $pi_tax); + ->with('pi_tax', $pi_tax) + ->with('incursions_tax', $incursions_tax) + ->with('wallet_balances_total', $wallet_balances_total); } /* @@ -1251,13 +1312,26 @@ public function getLedgerMonth($corporationID, $date) ->orderBy('total', 'desc') ->get(); + $incursions_tax = DB::table('corporation_walletjournal') + ->select('ownerID2', 'ownerName2', DB::raw('SUM(corporation_walletjournal.amount) total')) + ->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID') + ->where('corporation_walletjournal.refTypeID', 99) // Ref type id 99: Corporate Reward Payout (yeah, seriously ...) + ->where('corporation_walletjournal.ownerName1', "CONCORD") // check if the payout came from CONCORD + ->where(DB::raw('MONTH(date)'), $month) + ->where(DB::raw('YEAR(date)'), $year) + ->where('corporation_walletjournal.corporationID', $corporationID) + ->groupBy('corporation_walletjournal.ownerName2') + ->orderBy('total', 'desc') + ->get(); + return View::make('corporation.ledger.ajax.ledgermonth') ->with('corporationID', $corporationID) ->with('date', $date) ->with('ledgers', $ledgers) ->with('bounty_tax', $bounty_tax) ->with('mission_tax', $mission_tax) - ->with('pi_tax', $pi_tax); + ->with('pi_tax', $pi_tax) + ->with('incursions_tax', $incursions_tax); } /* @@ -1453,6 +1527,9 @@ public function getMarketOrders($corporationID) // Corporation Market Orders $market_orders = DB::select( 'SELECT *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) @@ -1662,6 +1739,9 @@ public function getIndustry($corporationID) $current_jobs = DB::table('corporation_industryjobs as a') ->select(DB::raw(" *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) @@ -1694,6 +1774,9 @@ public function getIndustry($corporationID) $finished_jobs = DB::table('corporation_industryjobs as a') ->select(DB::raw(" *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index cd12180d..8b047267 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -100,6 +100,9 @@ public function getSearch() $character_assets = DB::table(DB::raw('character_assetlist as a')) ->select(DB::raw( "*, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -208,6 +211,9 @@ public function getSearch() $corporation_assets = DB::table(DB::raw('corporation_assetlist as a')) ->select(DB::raw( "*, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index 7be0bccc..48433cf1 100644 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -57,16 +57,31 @@ public function showIndex() if (count(Session::get('valid_keys')) > 0) { $total_keys = SeatKey::whereIn('keyID', Session::get('valid_keys'))->count(); + $total_characters = EveCharacterCharacterSheet::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.characterID', '=', 'character_charactersheet.characterID') ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) ->where('account_apikeyinfo.type','!=','Corporation') ->count(); - $total_isk = EveCharacterCharacterSheet::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.characterID', '=', 'character_charactersheet.characterID') + + $total_corporations = EveCorporationCorporationSheet::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.corporationID', '=', 'corporation_corporationsheet.corporationID') + ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') + ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) + ->where('account_apikeyinfo.type','=','Corporation') + ->count(); + + $total_char_isk = EveCharacterCharacterSheet::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.characterID', '=', 'character_charactersheet.characterID') ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) ->where('account_apikeyinfo.type','!=','Corporation') ->sum('balance'); + + $total_corp_isk = EveCorporationAccountBalance::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.corporationID', '=', 'corporation_accountbalance.corporationID') + ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') + ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) + ->where('account_apikeyinfo.type','=','Corporation') + ->where('accountKey', '!=', EveCorporationAccountBalance::Dust_Account_Key)->sum('balance'); + $total_skillpoints = EveCharacterCharacterSheetSkills::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.characterID', '=', 'character_charactersheet_skills.characterID') ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) @@ -75,7 +90,7 @@ public function showIndex() } else { - $total_keys = $total_characters = $total_isk = $total_skillpoints = 0; + $total_keys = $total_characters = $total_corporations = $total_char_isk = $total_corp_isk= $total_skillpoints = 0; } @@ -84,7 +99,9 @@ public function showIndex() // Super user gets all of the data! $total_keys = SeatKey::count(); $total_characters = EveCharacterCharacterSheet::count(); - $total_isk = EveCharacterCharacterSheet::sum('balance'); + $total_corporations = EveCorporationCorporationSheet::count(); + $total_char_isk = EveCharacterCharacterSheet::sum('balance'); + $total_corp_isk = EveCorporationAccountBalance::where('accountKey', '!=', EveCorporationAccountBalance::Dust_Account_Key)->sum('balance'); $total_skillpoints = EveCharacterCharacterSheetSkills::sum('skillpoints'); } @@ -93,7 +110,9 @@ public function showIndex() ->with('server', $server) ->with('total_keys', $total_keys) ->with('total_characters', $total_characters) - ->with('total_isk', $total_isk) + ->with('total_corporations', $total_corporations) + ->with('total_char_isk', $total_char_isk) + ->with('total_corp_isk', $total_corp_isk) ->with('total_skillpoints', $total_skillpoints); } } diff --git a/app/controllers/SettingsController.php b/app/controllers/SettingsController.php index d8950576..25e5a9de 100644 --- a/app/controllers/SettingsController.php +++ b/app/controllers/SettingsController.php @@ -64,6 +64,9 @@ public function getSettings() ->with('decimal_seperator', Settings::getSetting('decimal_seperator', true)) ->with('required_mask', Settings::getSetting('required_mask', true)) ->with('registration_enabled', Settings::getSetting('registration_enabled', true)) + ->with('administrative_contact', Settings::getSetting('administrative_contact', true)) + ->with('seatnotify_member_inactivity_months', Settings::getSetting('seatnotify_member_inactivity_months', true)) + ->with('seatnotify_fuel_warning_days', Settings::getSetting('seatnotify_fuel_warning_days', true)) ->with('seatscheduled_character', Settings::getSetting('seatscheduled_character', true)) ->with('seatscheduled_corporation', Settings::getSetting('seatscheduled_corporation', true)) ->with('seatscheduled_corporation_assets', Settings::getSetting('seatscheduled_corporation_assets', true)) @@ -99,6 +102,11 @@ public function postUpdateSetting() Settings::setSetting('decimal_seperator', Input::get('decimal_seperator')); Settings::setSetting('required_mask', Input::get('required_mask')); Settings::setSetting('registration_enabled', Input::get('registration_enabled')); + Settings::setSetting('administrative_contact', Input::get('administrative_contact')); + + // SeAT Notifications + Settings::setSetting('seatnotify_member_inactivity_months', Input::get('seatnotify_member_inactivity_months')); + Settings::setSetting('seatnotify_fuel_warning_days', Input::get('seatnotify_fuel_warning_days')); // SeAT Queues Settings::setSetting('seatscheduled_character', Input::get('seatscheduled_character')); diff --git a/app/database/migrations/2015_02_05_221915_SeatUsersNullableColumns.php b/app/database/migrations/2015_02_05_221915_SeatUsersNullableColumns.php new file mode 100644 index 00000000..0029fea6 --- /dev/null +++ b/app/database/migrations/2015_02_05_221915_SeatUsersNullableColumns.php @@ -0,0 +1,38 @@ +cache = new \Pheal\Cache\FileStorage( storage_path(). '/cache/phealcache/' ); PhealConfig::getInstance()->access = new \Pheal\Access\StaticCheck(); PhealConfig::getInstance()->log = new \Pheal\Log\FileStorage( storage_path() . '/logs/' ); - PhealConfig::getInstance()->http_user_agent = 'SeAT ' . \Config::get('seat.version') . 'API Fetcher'; PhealConfig::getInstance()->api_customkeys = true; PhealConfig::getInstance()->http_method = 'curl'; + // Build a meaningful User-Agent for CCP should they need to contact someone + $user_agent = 'SeAT ' . \Config::get('seat.version') // Set the Program Identifier + . ' API Fetcher at ' + . \Config::get('app.url'); // Add the Url + + // If the administrative_contact is set, add this to the User-Agent, else use the + // default mail_from in the settings + if (Settings::getSetting('administrative_contact') == null) + $user_agent .= ' Install mail_from: ' . \Config::get('mail.from.name') . ' <' . \Config::get('mail.from.address') . '>'; + else + $user_agent .= ' Administrative Contact: ' . Settings::getSetting('administrative_contact'); + + // Set the newly compiled User-Agent + PhealConfig::getInstance()->http_user_agent = $user_agent; + // Should the EVE api be determined as 'down', set the cache value for 'eve_api_down' // with a expiration of 30 minutes. We will also decrement the current error count // by 10 to allow for some calls to happen after the value has expired out of // cache if (\Cache::get('eve_api_error_count') >= \Config::get('seat.error_limit')) { - \Cache::set('eve_api_down', true, 30); + \Cache::put('eve_api_down', true, 30); \Cache::decrement('eve_api_error_count', 10); } diff --git a/app/eveapi/account/AccountAPIKeyInfo.php b/app/eveapi/account/AccountAPIKeyInfo.php index 57edfdcf..3fbfd632 100644 --- a/app/eveapi/account/AccountAPIKeyInfo.php +++ b/app/eveapi/account/AccountAPIKeyInfo.php @@ -76,7 +76,11 @@ public static function Update($keyID, $vCode) // If we are rate limited, set the status of the eveapi // server to 'down' in the cache so that subsequent // calls don't fail because of this. - \Cache::set('eve_api_down', true, 30); + + // Get time of IP ban in minutes, rounded up to the next whole minute + $time = round(($e->cached_until_unixtime - $e->request_time_unixtime) / 60, 0, PHP_ROUND_HALF_UP); + + \Cache::put('eve_api_down', true, $time); return; // "EVE backend database temporarily disabled."" @@ -84,7 +88,7 @@ public static function Update($keyID, $vCode) // The EVE API Database is apparently down, so mark the // server as 'down' in the cache so that subsequent // calls don't fail because of this. - \Cache::set('eve_api_down', true, 30); + \Cache::put('eve_api_down', true, 30); return; // "Web site database temporarily disabled." @@ -92,7 +96,7 @@ public static function Update($keyID, $vCode) // The EVE API Database is apparently down, so mark the // server as 'down' in the cache so that subsequent // calls don't fail because of this. - \Cache::set('eve_api_down', true, 30); + \Cache::put('eve_api_down', true, 30); return; // "Authentication failure. Legacy API keys can no longer be diff --git a/app/models/EveCorporationAccountBalance.php b/app/models/EveCorporationAccountBalance.php index 140759ff..e51e0079 100644 --- a/app/models/EveCorporationAccountBalance.php +++ b/app/models/EveCorporationAccountBalance.php @@ -26,5 +26,7 @@ class EveCorporationAccountBalance extends Eloquent { + const Dust_Account_Key = 10000; + protected $table = 'corporation_accountbalance'; } diff --git a/app/notifications/corporation/MemberInactivity.php b/app/notifications/corporation/MemberInactivity.php index 3af944a0..6f9d96b1 100644 --- a/app/notifications/corporation/MemberInactivity.php +++ b/app/notifications/corporation/MemberInactivity.php @@ -26,6 +26,7 @@ namespace Seat\Notifications\Corporation; use Seat\Notifications\BaseNotify; +use App\Services\Settings\SettingHelper; /* |-------------------------------------------------------------------------- @@ -62,9 +63,13 @@ public static function Update() // that can come later :D foreach($recruiters as $recruiter) { + // Do a lookup to see how many months without a login should + // be considered as a inactive member + (int)$inactive_months = SettingHelper::getSetting('seatnotify_member_inactivity_months'); + // Now, get a list of members that have not // logged in for 1 month. - $members = \EveCorporationMemberTracking::where('logoffDateTime', '<', \DB::raw('date_sub(NOW(), INTERVAL 1 MONTH)'))->get(); + $members = \EveCorporationMemberTracking::where('logoffDateTime', '<', \DB::raw('date_sub(NOW(), INTERVAL ' . $inactive_months . ' MONTH)'))->get(); // If there are no members, continue if (!$members) @@ -90,7 +95,7 @@ public static function Update() $notification_type = 'Corporation'; $notification_title = 'Member Inactivity'; $notification_text = $member->name . ' in ' . $corporation_name . ' has been inactive ' . - 'for over a month. The last logon time was ' . + 'for ' . $inactive_months . ' month(s). The last logon time was ' . \Carbon\Carbon::parse($member->logonDateTime)->diffFOrHumans() . ' with the last ' . 'known location being ' . $member->location . '.'; diff --git a/app/notifications/starbase/Fuel.php b/app/notifications/starbase/Fuel.php index 62a1b708..bd539252 100644 --- a/app/notifications/starbase/Fuel.php +++ b/app/notifications/starbase/Fuel.php @@ -26,6 +26,7 @@ namespace Seat\Notifications\Starbase; use Seat\Notifications\BaseNotify; +use App\Services\Settings\SettingHelper; /* |-------------------------------------------------------------------------- @@ -182,8 +183,14 @@ public static function Update() // we came for and notify someone // If now plus (the fuel amount devided by the usage) muliplied - // by hours is less that 3 days, send a notification - if(\Carbon\Carbon::now()->addHours($starbase->fuelBlocks / $usage)->lte(\Carbon\Carbon::now()->addDays(3))) { + // by hours is less than the configured days, send a + // notification + + // Retreive the configured days ... + (int)$warning_days = SettingHelper::getSetting('seatnotify_fuel_warning_days'); + + // ... and process a notification if required + if(\Carbon\Carbon::now()->addHours($starbase->fuelBlocks / $usage)->lte(\Carbon\Carbon::now()->addDays($warning_days))) { // OK! We need to tell someone that their towers fuel is // going to be running out soon! @@ -230,7 +237,7 @@ public static function Update() // is anchored in is > 5, check the charters if ($starbase->security >= 5) { - if(Carbon\Carbon::now()->addHours($starbase->starbaseCharter / 1)->lte(Carbon\Carbon::now()->addDays(3))) { + if(Carbon\Carbon::now()->addHours($starbase->starbaseCharter / 1)->lte(Carbon\Carbon::now()->addDays($warning_days))) { // OK! We need to tell someone that their towers charters is // going to be running out soon! diff --git a/app/services/helpers/Img.php b/app/services/helpers/Img.php new file mode 100644 index 00000000..8517e93e --- /dev/null +++ b/app/services/helpers/Img.php @@ -0,0 +1,245 @@ + 'Character', + 1 => 'Corporation', + 2 => 'Alliance', + 3 => 'Type' + ); + + + /* + |-------------------------------------------------------------------------- + | Generate image HTML + |-------------------------------------------------------------------------- + | + | Return the HTML for a image. Based on the $id argument, the correct + | character/corporation/alliance image will be returned. If no type + | could be determined, a character type is assumed. + | + */ + public static function html($id, $size, $attrs, $lazy = true) + { + + if ($id > 90000000 && $id < 98000000) { + + return self::character($id, $size, $attrs, $lazy); + } + elseif (($id > 98000000 && $id < 99000000) || ($id > 1000000 && $id < 2000000)) { + + return self::corporation($id, $size, $attrs, $lazy); + } + elseif (($id > 99000000 && $id < 100000000) || ($id > 0 && $id < 1000000)) { + + return self::alliance($id, $size, $attrs, $lazy); + } + + return self::character($id, $size, $attrs, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate character image HTML + |-------------------------------------------------------------------------- + | + | Generates a HTML response based on the characterID. If a size of smaller + | than 32 is received, then the is overwritten with 32. + | + */ + public static function character($id, $size, $attrs, $lazy = true) + { + + if ($size < 32) + return self::_renderHtml($id, 32, self::Character, $attrs, 32, $lazy); + + return self::_renderHtml($id, $size, self::Character, $attrs, 0, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate corporation image HTML + |-------------------------------------------------------------------------- + | + | Generates a HTML response based on the corporationID. If a size of smaller + | than 32 is received, then the is overwritten with 32. + | + */ + public static function corporation($id, $size, $attrs, $lazy = true) + { + + if ($size < 32) + return self::_renderHtml($id, 32, self::Corporation, $attrs, 32, $lazy); + + return self::_renderHtml($id, $size, self::Corporation, $attrs, 0, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate alliance image HTML + |-------------------------------------------------------------------------- + | + | Generates a HTML response based on the allianceID. If a size of smaller + | than 32 is received, then the is overwritten with 32. + | + */ + public static function alliance($id, $size, $attrs, $lazy = true) + { + + if ($size < 32) + return self::_renderHtml($id, 32, self::Alliance, $attrs, 32, $lazy); + + return self::_renderHtml($id, $size, self::Alliance, $attrs, 0, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate type image HTML + |-------------------------------------------------------------------------- + | + | Generates a HTML response based on the typeID. If a size of smaller + | than 32 is received, then the is overwritten with 32. + | + */ + public static function type($id, $size, $attrs, $lazy = true) + { + + if ($size < 32) + return self::_renderHtml($id, 32, self::Type, $attrs, 32, $lazy); + + return self::_renderHtml($id, $size, self::Type, $attrs, 0, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate a image URL that is lazy load ready + |-------------------------------------------------------------------------- + | + | Generates a HTML response that will put a placeholder instead of the + | actual image. This image however is later lazy loaded client side + | based on the data-src attribute. + | + */ + public static function _renderHtml($id, $size, $type, $attrs, $retina_size = 0, $lazy = true) + { + + // fix default retina image size + if ($retina_size === 0) + $retina_size = $size * 2; + + // make new IMG tag + $html = ' $value) + $html .= "{$name}=\"{$value}\" "; + + // close IMG tag + $html .= ' />'; + + // return completed img tag + return $html; + } + + /* + |-------------------------------------------------------------------------- + | Generate a image URL + |-------------------------------------------------------------------------- + | + | Generates a URL from the CCP image server based on the recieved + | size and image type. + | + */ + public static function _renderUrl($id, $size, $type) + { + + // Base Eve Online Image CDN url + $url = '//image.eveonline.com/'; + + // construct ending bit of URL + switch ($type) { + case self::Corporation: + $url .= self::$types[self::Corporation] . '/' . $id . '_' . $size . '.png'; + break; + + case self::Alliance: + $url .= self::$types[self::Alliance] . '/' . $id . '_' . $size . '.png'; + break; + + case self::Type: + $url .= self::$types[self::Type] . '/' . $id . '_' . $size . '.png'; + break; + + case self::Character: + default: + $url .= self::$types[self::Character] . '/' . $id . '_' . $size . '.jpg'; + } + + // return full URL + return $url; + } + +} diff --git a/app/services/helpers/helpers.php b/app/services/helpers/helpers.php index bd401a26..247ca487 100644 --- a/app/services/helpers/helpers.php +++ b/app/services/helpers/helpers.php @@ -41,7 +41,8 @@ public static function getCorporationList() { $corporations = \DB::table('account_apikeyinfo') ->join('account_apikeyinfo_characters', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') - ->where('account_apikeyinfo.type', 'Corporation'); + ->where('account_apikeyinfo.type', 'Corporation') + ->orderBy('account_apikeyinfo_characters.corporationName'); if (!\Auth::isSuperUser() ) $corporations = $corporations->whereIn('corporationID', \Session::get('corporation_affiliations'))->get(); @@ -364,7 +365,7 @@ public static function getMembersForTitle($corporationID, $titleID) |-------------------------------------------------------------------------- | getSecRolesArray() |-------------------------------------------------------------------------- - | + | | Converts a String or JSON Array of RoleIDs | to an Fancy Role Array with Corporation Division's | @@ -378,7 +379,7 @@ public static function getMembersForTitle($corporationID, $titleID) public static function getSecRolesArray($mixed_roles, $corporationID) { - + if($mixed_roles == '' or $mixed_roles == '[]' or is_null($mixed_roles)) { return array("None"); } else { @@ -407,14 +408,14 @@ public static function getSecRolesArray($mixed_roles, $corporationID) ->where('corporationID',$corporationID) ->remember(0.1) ->get(); - + $divisions_wallet = \DB::table('corporation_corporationsheet_walletdivisions') ->select('accountKey','description') ->orderBy('accountKey') ->where('corporationID',$corporationID) ->remember(0.1) ->get(); - + foreach ($role_list as $role) { $regex = "/(Hangar|Wallet Division|Container from Hangar)\s(\d)/"; diff --git a/app/services/settings/SettingHelper.php b/app/services/settings/SettingHelper.php index 470f4863..4c417234 100644 --- a/app/services/settings/SettingHelper.php +++ b/app/services/settings/SettingHelper.php @@ -45,6 +45,7 @@ class SettingHelper 'app_name' => 'SeAT', 'required_mask' => 176693568, 'registration_enabled' => true, + 'administrative_contact' => null, // User personalization 'color_scheme' => 'blue', @@ -54,6 +55,10 @@ class SettingHelper 'main_character_name' => null, 'email_notifications' => false, + // SeAT Notifications + 'seatnotify_member_inactivity_months' => 1, + 'seatnotify_fuel_warning_days' => 3, + // SeAT Backend 'seatscheduled_character' => true, 'seatscheduled_corporation' => true, @@ -78,6 +83,7 @@ class SettingHelper */ static $user_settings = array( + 'color_scheme', 'thousand_seperator', 'decimal_seperator', @@ -140,14 +146,25 @@ public static function getSetting($setting_name, $system_setting = false, $user_ try { // Looks like we have a user setting, lets do a - // db lookup for it. - $setting_value = \SeatUserSetting::where('user_id', $effective_user_id) + // db lookup for it. Before the lookup we + // first prepare a Cache key to use. + // This key will be used to store + // the resolved value. + $cache_key = self::getUserSettingCacheKeyPrefix($effective_user_id, $setting_name); + $setting_value = \Cache::get($cache_key, function() use ($effective_user_id, $setting_name, $cache_key) { + + $setting_value = \SeatUserSetting::where('user_id', $effective_user_id) ->where('setting', $setting_name) ->pluck('value'); - if($setting_value) + // cache result + \Cache::forever($cache_key, $setting_value); + + return $setting_value; + }); - // Found the user setting, return that! + // If we found the user setting, return that! + if($setting_value) return $setting_value; } catch (\Exception $e) {} @@ -167,9 +184,20 @@ public static function getSetting($setting_name, $system_setting = false, $user_ try { // So we dont have a user setting for whatever reason, - // so lets check the SeAT global settings. - $setting_value = \SeatSetting::where('setting', $setting_name) - ->pluck('value'); + // so lets check the SeAT global settings. Before + // the lookup we first prepare a Cache key to + // use. This key will be used to store + // the resolved value. + $cache_key = self::getSystemSettingCacheKeyPrefix($setting_name); + $setting_value = \Cache::get($cache_key, function() use ($setting_name, $cache_key) { + + $setting_value = \SeatSetting::where('setting', $setting_name)->pluck('value'); + + // cache result + \Cache::forever($cache_key, $setting_value); + + return $setting_value; + }); // If we have a database entry for the setting, return // that as the value @@ -239,6 +267,10 @@ public static function setSetting($setting_name, $setting_value, $user_id = null $user_setting->value = $setting_value; $user_setting->save(); + // cache this value forever to save on DB calls + $cache_key = self::getUserSettingCacheKeyPrefix(\Auth::User()->id, $setting_name); + \Cache::forever($cache_key, $setting_value); + // Return as we are done return true; @@ -257,6 +289,10 @@ public static function setSetting($setting_name, $setting_value, $user_id = null $global_setting->value = $setting_value; $global_setting->save(); + // cache this value forever to save on DB calls + $cache_key = self::getSystemSettingCacheKeyPrefix($setting_name); + \Cache::forever($cache_key, $setting_value); + return true; } @@ -288,4 +324,32 @@ public static function getAllSettings() { } + /* + |-------------------------------------------------------------------------- + | getUserSettingCacheKeyPrefix() + |-------------------------------------------------------------------------- + | + | Get cache prefix for user settings + | + */ + + public static function getUserSettingCacheKeyPrefix($user_id, $setting_name) { + + return 'seat.settings.user.'.(int)$user_id.'.'.$setting_name; + } + + /* + |-------------------------------------------------------------------------- + | getSystemSettingCacheKeyPrefix() + |-------------------------------------------------------------------------- + | + | Get cache prefix for user settings + | + */ + + public static function getSystemSettingCacheKeyPrefix($setting_name) { + + return 'seat.settings.system.'.$setting_name; + } + } diff --git a/app/services/validators/SeatSettingValidator.php b/app/services/validators/SeatSettingValidator.php index b1195211..33154ebd 100644 --- a/app/services/validators/SeatSettingValidator.php +++ b/app/services/validators/SeatSettingValidator.php @@ -30,11 +30,14 @@ class SettingValidator extends Validator public static $rules = array( 'app_name' => 'required', - 'registration_enabled' => 'required', - 'required_mask' => 'required|numeric|min:176693568', - 'color_scheme' => 'required|in:blue,black', - 'thousand_seperator' => 'required', - 'decimal_seperator' => 'required', + 'registration_enabled' => 'required', + 'required_mask' => 'required|numeric|min:176693568', + 'administrative_contact' => 'required|email', + 'color_scheme' => 'required|in:blue,black', + 'thousand_seperator' => 'in:" ",",","."|size:1', + 'decimal_seperator' => 'required|in:",","."|size:1', + 'seatnotify_member_inactivity_months' => 'required|numeric', + 'seatnotify_fuel_warning_days' => 'required|numeric', 'seatscheduled_character' => 'required|in:true,false', 'seatscheduled_corporation' => 'required|in:true,false', 'seatscheduled_corporation_assets' => 'required|in:true,false', diff --git a/app/services/validators/SeatUserSettingValidator.php b/app/services/validators/SeatUserSettingValidator.php index fc28c667..e96c1464 100644 --- a/app/services/validators/SeatUserSettingValidator.php +++ b/app/services/validators/SeatUserSettingValidator.php @@ -29,8 +29,10 @@ class UserSettingValidator extends Validator { public static $rules = array( - 'color_scheme' => 'required|in:blue,black', + 'color_scheme' => 'required|in:blue,black', 'main_character_id' => 'required|numeric', 'email_notifications' => 'required|in:true,false', + 'thousand_seperator' => 'in:" ",",","."|size:1', + 'decimal_seperator' => 'required|in:",","."|size:1', ); } diff --git a/app/views/character/all.blade.php b/app/views/character/all.blade.php index 8cead3d4..a9ae2ef6 100644 --- a/app/views/character/all.blade.php +++ b/app/views/character/all.blade.php @@ -31,8 +31,8 @@ - - {{ $character->characterName }} + {{ Seat\Services\Helpers\Img::character($character->characterID, 32, array('class' => 'img-circle eveIcon small')) }} + {{ $character->characterName }} {{ $character->corporationName }} diff --git a/app/views/character/assetsearch/ajax/result.blade.php b/app/views/character/assetsearch/ajax/result.blade.php index c467e17e..352a32bf 100644 --- a/app/views/character/assetsearch/ajax/result.blade.php +++ b/app/views/character/assetsearch/ajax/result.blade.php @@ -17,7 +17,7 @@ - + {{ Seat\Services\Helpers\Img::character($result->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $result->characterName }} diff --git a/app/views/character/mail/view.blade.php b/app/views/character/mail/view.blade.php index 3eda12fc..1e69fc84 100644 --- a/app/views/character/mail/view.blade.php +++ b/app/views/character/mail/view.blade.php @@ -12,7 +12,7 @@

All Mail for: - + {{ Seat\Services\Helpers\Img::character($characterID, 32, array('class eveIcon medium')) }} {{ $character_name }}

@@ -47,7 +47,7 @@ - + {{ Seat\Services\Helpers\Img::character($message->senderID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $message->senderName }} diff --git a/app/views/character/public.blade.php b/app/views/character/public.blade.php index 3c3e9b8e..b0a1e2b1 100644 --- a/app/views/character/public.blade.php +++ b/app/views/character/public.blade.php @@ -19,7 +19,7 @@
- + {{ Seat\Services\Helpers\Img::character($character_info->characterID, 128, array('class' => 'img-circle pull-right eveIcon xlarge')) }}
@@ -70,7 +70,7 @@ @foreach($employment_history as $employment)
  • - + {{ Seat\Services\Helpers\Img::corporation($employment->corporationID, 16, array('class' => 'img-circle eveIcon small')) }} Joined {{ $employment->corporationID }} on {{ $employment->startDate }} ({{ Carbon\Carbon::parse($employment->startDate)->diffForHumans() }})
  • diff --git a/app/views/character/skillsearch/ajax/result.blade.php b/app/views/character/skillsearch/ajax/result.blade.php index 1dfc8c6f..de33b467 100644 --- a/app/views/character/skillsearch/ajax/result.blade.php +++ b/app/views/character/skillsearch/ajax/result.blade.php @@ -17,7 +17,7 @@ - + {{ Seat\Services\Helpers\Img::character($result->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $result->characterName }} diff --git a/app/views/character/view.blade.php b/app/views/character/view.blade.php index a23c3dd8..211ea154 100644 --- a/app/views/character/view.blade.php +++ b/app/views/character/view.blade.php @@ -13,11 +13,30 @@

    - + {{ Seat\Services\Helpers\Img::character($character->characterID, 256, array('class' => 'img-circle eveIcon xxlarge')) }}

    {{ $character->characterName }}

    - +
    @@ -30,7 +49,7 @@
    - + {{ Seat\Services\Helpers\Img::character($alt->characterID, 32, array('class' => 'img-circle eveIcon large')) }}
      @@ -71,7 +90,7 @@ @foreach ($other_alts as $person)
    • - + {{ Seat\Services\Helpers\Img::character($person->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $person->characterName }}
    • @@ -238,6 +257,7 @@ // Show or hide contents.toggle(); + setupLazyLoader(contents); // some code for stylish if (contents.is(":visible")){ diff --git a/app/views/character/view/assets.blade.php b/app/views/character/view/assets.blade.php index 7364a3cc..8c23762f 100644 --- a/app/views/character/view/assets.blade.php +++ b/app/views/character/view/assets.blade.php @@ -40,7 +40,7 @@ {{ App\Services\Helpers\Helpers::formatBigNumber($asset['quantity']) }} - + {{ Seat\Services\Helpers\Img::type($asset['typeID'], 16, array('class' => 'eveIcon small')) }} {{ str_limit($asset['typeName'], 35, $end = '...') }} {{ isset($asset['contents']) ? "(". count($asset['contents']) . ")" : "" }} @@ -78,7 +78,7 @@ - + {{ Seat\Services\Helpers\Img::type($content['typeID'], 16, array('class' => 'eveIcon small')) }} {{ str_limit($content['typeName'], 30, $end = '...') }} diff --git a/app/views/character/view/character_pi.blade.php b/app/views/character/view/character_pi.blade.php index 0f149d4f..b7c5cbb7 100644 --- a/app/views/character/view/character_pi.blade.php +++ b/app/views/character/view/character_pi.blade.php @@ -42,12 +42,21 @@ @if($route->planetID == $colony['planetID']) - {{ $route->sourceTypeName }} - {{ $route->contentTypeName }} ({{ $route->quantity }}) + + {{ Seat\Services\Helpers\Img::type($route->sourceTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $route->sourceTypeName }} + + + {{ Seat\Services\Helpers\Img::type($route->contentTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $route->contentTypeName }} ({{ $route->quantity }}) + @if($route->cycleTime != 0){{ $route->cycleTime }} minutes @endif @if($route->quantityPerCycle != 0){{ $route->quantityPerCycle }} @endif @if( date('Y-m-d H:i:s') < ($route->expiryTime)){{ Carbon\Carbon::parse($route->expiryTime)->diffForHumans() }}@else No Active Cycle @endif - {{ $route->destinationTypeName }} + + {{ Seat\Services\Helpers\Img::type($route->destinationTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $route->destinationTypeName }} + @endif @@ -78,9 +87,15 @@ @if($link->planetID == $colony['planetID']) - {{ $link->sourceTypeName }} + + {{ Seat\Services\Helpers\Img::type($link->sourceTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $link->sourceTypeName }} + {{ $link->linkLevel }} - {{ $link->destinationTypeName }} + + {{ Seat\Services\Helpers\Img::type($link->destinationTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $link->destinationTypeName }} + @endif @@ -108,7 +123,10 @@ @if($installation->planetID == $colony['planetID']) - {{ $installation->typeName }} + + {{ Seat\Services\Helpers\Img::type($installation->typeID, 16, array('class' => 'eveIcon small')) }} + {{ $installation->typeName }} + @endif diff --git a/app/views/character/view/character_research.blade.php b/app/views/character/view/character_research.blade.php index 7b511e7b..6a2a03eb 100644 --- a/app/views/character/view/character_research.blade.php +++ b/app/views/character/view/character_research.blade.php @@ -21,7 +21,10 @@ @foreach ($research as $agent) - {{ $agent->itemName }} + + {{ Seat\Services\Helpers\Img::character($agent->agentID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $agent->itemName }} + {{ $agent->typeName }} {{ $agent->researchStartDate }} {{ $agent->pointsPerDay }} diff --git a/app/views/character/view/character_sheet.blade.php b/app/views/character/view/character_sheet.blade.php index 68767b8a..2f8c9389 100644 --- a/app/views/character/view/character_sheet.blade.php +++ b/app/views/character/view/character_sheet.blade.php @@ -224,7 +224,7 @@ @foreach($employment_history as $employment)
    • - + {{ Seat\Services\Helpers\Img::corporation($employment->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }} Joined {{ $employment->corporationID }} on {{ $employment->startDate }} ({{ Carbon\Carbon::parse($employment->startDate)->diffForHumans() }})
    • diff --git a/app/views/character/view/character_skills.blade.php b/app/views/character/view/character_skills.blade.php index a07fce3c..1aadc6e3 100644 --- a/app/views/character/view/character_skills.blade.php +++ b/app/views/character/view/character_skills.blade.php @@ -77,6 +77,7 @@
    • Core
    • Tech 2
    • Tech 3
    • +
    • ORE
    @@ -500,17 +501,17 @@ Heavy Interdiction Cruisers - @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) == 5) + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28609) == 5) 5 - @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) == 0) - {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28609) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28609) }} @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) - {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28609) }} @else - {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28609) }} @endif - @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) > 0) + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28609) > 0) {{--*/$skill5 = false;/*--}} @foreach( array(3335, 3334, 3332, 3333) as $s) @if(App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) == 5) @@ -757,6 +758,148 @@
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ShipLevel
    Industrial Command Ships + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + @endif +
    Capital Industrial Ships + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) }} + @endif + @if ((App\Services\Helpers\Helpers::findSkillLevel($character_skills, 20533) < 2) || (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3456) < 1)) + Secondary Skill missing! + @endif +
    ORE Freighter + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) }} + @endif + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 20342) < 1) + Secondary Skill missing! + @endif +
    Mining Frigate + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) }} + @endif +
    Expedition Frigates + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) }} + @endif + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) < 5) + Secondary Skill missing! + @endif +
    ORE Industrial + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) }} + @endif + @if ((App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3402) < 2) || (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 25863) < 1)) + Secondary Skill missing! + @endif +
    Exhumer + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) }} + @endif + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) < 5) + Secondary Skill missing! + @endif +
    Mining Barge + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) }} + @endif + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3410) < 3) + Secondary Skill missing! + @endif +
    +
    diff --git a/app/views/character/view/character_standings.blade.php b/app/views/character/view/character_standings.blade.php index a546f612..9583a671 100644 --- a/app/views/character/view/character_standings.blade.php +++ b/app/views/character/view/character_standings.blade.php @@ -22,7 +22,7 @@ - + {{ Seat\Services\Helpers\Img::html($standing->fromID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $standing->fromName }} {{ $standing->standing }} @@ -47,7 +47,7 @@ - + {{ Seat\Services\Helpers\Img::html($standing->fromID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $standing->fromName }} {{ $standing->standing }} @@ -72,7 +72,7 @@ - + {{ Seat\Services\Helpers\Img::html($standing->fromID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $standing->fromName }} {{ $standing->standing }} diff --git a/app/views/character/view/contacts.blade.php b/app/views/character/view/contacts.blade.php index e9fcdf35..4860c92a 100644 --- a/app/views/character/view/contacts.blade.php +++ b/app/views/character/view/contacts.blade.php @@ -25,7 +25,7 @@ - + {{ Seat\Services\Helpers\Img::character($contact->contactID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $contact->contactName }} diff --git a/app/views/character/view/contracts.blade.php b/app/views/character/view/contracts.blade.php index b86570ce..9876a09f 100644 --- a/app/views/character/view/contracts.blade.php +++ b/app/views/character/view/contracts.blade.php @@ -40,12 +40,12 @@ - + {{ Seat\Services\Helpers\Img::html($contract['issuerID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['issuerID'] }} @if ($contract['assigneeID'] <> 0) - + {{ Seat\Services\Helpers\Img::html($contract['assigneeID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['assigneeID'] }} @else Unknown Assignee @@ -101,7 +101,8 @@
  • Completed: {{ Carbon\Carbon::parse($contract['dateCompleted'])->diffForHumans() }} - by + by + {{ Seat\Services\Helpers\Img::html($contract['acceptorID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['acceptorID'] }}
  • @endif @@ -138,7 +139,7 @@
  • {{-- Check if it's a item request or not --}} @if($content['included'] == 1) - + {{ Seat\Services\Helpers\Img::type($content['typeID'], 16, array('class' => 'eveIcon small')) }} {{ number_format($content['quantity'], 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} x {{ $content['typeName'] }} @endif
  • @@ -158,7 +159,7 @@
  • {{-- Check if it's a item request or not --}} @if($content['included'] == 0) - + {{ Seat\Services\Helpers\Img::type($content['typeID'], 16, array('class' => 'eveIcon small')) }} {{ number_format($content['quantity'], 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} x {{ $content['typeName'] }} @endif
  • @@ -212,12 +213,12 @@ - + {{ Seat\Services\Helpers\Img::html($contract['issuerID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['issuerID'] }} @if ($contract['assigneeID'] <> 0) - + {{ Seat\Services\Helpers\Img::html($contract['assigneeID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['assigneeID'] }} @else Unknown Assignee @@ -278,7 +279,8 @@
  • Accepted: {{ Carbon\Carbon::parse($contract['dateAccepted'])->diffForHumans() }} - by + by + {{ Seat\Services\Helpers\Img::character($contract['acceptorID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['acceptorID'] }}
  • @endif diff --git a/app/views/character/view/industry.blade.php b/app/views/character/view/industry.blade.php index 2d301f8e..71253e77 100644 --- a/app/views/character/view/industry.blade.php +++ b/app/views/character/view/industry.blade.php @@ -63,10 +63,19 @@
    - {{ $job->installerName }} + + {{ Seat\Services\Helpers\Img::character($job->installerID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $job->installerName }} + {{ $job->runs }} - {{ $job->blueprintTypeName }} - {{ $job->productTypeName }} + + {{ Seat\Services\Helpers\Img::type($job->blueprintTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $job->blueprintTypeName }} + + + {{ Seat\Services\Helpers\Img::type($job->productTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $job->productTypeName }} + {{ $job->location }} @@ -115,10 +124,19 @@ Invention @endif - {{ $job->installerName }} + + {{ Seat\Services\Helpers\Img::character($job->installerID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $job->installerName }} + {{ $job->runs }} - {{ $job->blueprintTypeName }} - {{ $job->productTypeName }} + + {{ Seat\Services\Helpers\Img::type($job->blueprintTypeID, 32, array('class' => 'eveIcon medium')) }} + {{ $job->blueprintTypeName }} + + + {{ Seat\Services\Helpers\Img::type($job->productTypeID, 32, array('class' => 'eveIcon medium')) }} + {{ $job->productTypeName }} + {{ $job->location }} diff --git a/app/views/character/view/killmails.blade.php b/app/views/character/view/killmails.blade.php index 7eec0955..3eaa6310 100644 --- a/app/views/character/view/killmails.blade.php +++ b/app/views/character/view/killmails.blade.php @@ -27,7 +27,7 @@ - + {{ Seat\Services\Helpers\Img::character($killmail->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $killmail->characterName }} {{-- if the characterID == victim characterID, then this is a loss --}} @if($killmail->characterID == $characterID) @@ -37,7 +37,7 @@ - + {{ Seat\Services\Helpers\Img::type($killmail->shipTypeID, 16, array('class' => 'eveIcon small')) }} {{ $killmail->typeName }} diff --git a/app/views/character/view/mail.blade.php b/app/views/character/view/mail.blade.php index 4f03f87e..ef3ba209 100644 --- a/app/views/character/view/mail.blade.php +++ b/app/views/character/view/mail.blade.php @@ -35,7 +35,7 @@ - + {{ Seat\Services\Helpers\Img::character($message->senderID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $message->senderName }} diff --git a/app/views/character/view/market_orders.blade.php b/app/views/character/view/market_orders.blade.php index 7e86e269..a50a20e9 100644 --- a/app/views/character/view/market_orders.blade.php +++ b/app/views/character/view/market_orders.blade.php @@ -50,13 +50,13 @@ - + {{ Seat\Services\Helpers\Img::character($order->charID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $order->charID }} {{ $order->location }} - + {{ Seat\Services\Helpers\Img::type($order->typeID, 16, array('class' => 'eveIcon small')) }} {{ $order->typeName }} {{ $order->volRemaining }}/{{ $order->volEntered }} diff --git a/app/views/character/view/wallet_journal.blade.php b/app/views/character/view/wallet_journal.blade.php index 6551a612..7898335b 100644 --- a/app/views/character/view/wallet_journal.blade.php +++ b/app/views/character/view/wallet_journal.blade.php @@ -40,11 +40,11 @@ {{ $e->refTypeName }} - + {{ Seat\Services\Helpers\Img::html($e->ownerID1, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->ownerName1 }} - + {{ Seat\Services\Helpers\Img::html($e->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->ownerName2 }} {{ $e->argName1 }} diff --git a/app/views/character/view/wallet_transactions.blade.php b/app/views/character/view/wallet_transactions.blade.php index b38fef20..8df4f5c0 100644 --- a/app/views/character/view/wallet_transactions.blade.php +++ b/app/views/character/view/wallet_transactions.blade.php @@ -35,7 +35,7 @@ - + {{ Seat\Services\Helpers\Img::type($e->typeID, 16, array('class' => 'eveIcon small')) }} {{ $e->typeName }} {{ $e->quantity }} diff --git a/app/views/character/walletjournal/view.blade.php b/app/views/character/walletjournal/view.blade.php index 30aeefee..dda9e2f0 100644 --- a/app/views/character/walletjournal/view.blade.php +++ b/app/views/character/walletjournal/view.blade.php @@ -12,7 +12,7 @@

    Wallet Journal for: - + {{ Seat\Services\Helpers\Img::character($characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $character_name }}

    @@ -47,11 +47,11 @@ {{ $e->refTypeName }} - + {{ Seat\Services\Helpers\Img::html($e->ownerID1, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->ownerName1 }} - + {{ Seat\Services\Helpers\Img::html($e->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->ownerName2 }} {{ $e->argName1 }} diff --git a/app/views/character/wallettransactions/view.blade.php b/app/views/character/wallettransactions/view.blade.php index 2c7587f5..44ca9366 100644 --- a/app/views/character/wallettransactions/view.blade.php +++ b/app/views/character/wallettransactions/view.blade.php @@ -12,7 +12,7 @@

    Wallet Transactions for: - + {{ Seat\Services\Helpers\Img::character($characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $character_name }}

    @@ -47,7 +47,7 @@ - + {{ Seat\Services\Helpers\Img::type($e->typeID, 16, array('class' => 'eveIcon small')) }} {{ $e->typeName }} {{ $e->quantity }} diff --git a/app/views/corporation/all.blade.php b/app/views/corporation/all.blade.php new file mode 100644 index 00000000..048ed313 --- /dev/null +++ b/app/views/corporation/all.blade.php @@ -0,0 +1,80 @@ +@extends('layouts.masterLayout') + +@section('html_title', 'All Corporations') + +@section('page_content') + +
    +
    +
    +
    +

    + All Corporations(s) @if (count($corporations) > 0) ({{ count($corporations) }}) @endif +

    +
    +
    + + + + + + + + + + + + + + @foreach ($corporations as $corporation) + + + + + + + + + + {{-- key information --}} + + + + + @endforeach + + +
    Corp NameCEOAllianceTax RateMembersShares
    + {{ Seat\Services\Helpers\Img::corporation($corporation->corporationID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $corporation->corporationName }} [{{ $corporation->ticker }}] + + + {{ Seat\Services\Helpers\Img::character($corporation->ceoID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $corporation->ceoName }} + + + {{ Seat\Services\Helpers\Img::alliance($corporation->allianceID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $corporation->allianceName }} + + {{ number_format($corporation->taxRate, 1, $settings['decimal_seperator'], $settings['thousand_seperator']) }} % + + {{ number_format($corporation->memberCount, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} / + {{ number_format($corporation->memberLimit, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} + + {{ number_format($corporation->shares, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} + + @if ($corporation->isOk == 1) + Key Ok + @else + Key not Ok + @endif +
    + +
    + +
    + +
    +
    + +@stop diff --git a/app/views/corporation/assets/assets.blade.php b/app/views/corporation/assets/assets.blade.php index 1559cc49..7b184df2 100644 --- a/app/views/corporation/assets/assets.blade.php +++ b/app/views/corporation/assets/assets.blade.php @@ -52,7 +52,7 @@ {{ App\Services\Helpers\Helpers::formatBigNumber($asset['quantity']) }} - + {{ Seat\Services\Helpers\Img::type($asset['typeID'], 16, array('class' => 'eveIcon small')) }} {{ str_limit($asset['typeName'], 35, $end = '...') }} {{ isset($asset['contents']) ? "(". count($asset['contents']) . ")" : "" }} @@ -90,7 +90,7 @@ - + {{ Seat\Services\Helpers\Img::type($content['typeID'], 16, array('class' => 'eveIcon small')) }} {{ str_limit($content['typeName'], 30, $end = '...') }} @@ -164,7 +164,7 @@ {{ App\Services\Helpers\Helpers::formatBigNumber($asset['quantity']) }} - + {{ Seat\Services\Helpers\Img::type($asset['typeID'], 16, array('class' => 'eveIcon small')) }} {{ str_limit($asset['typeName'], 35, $end = '...') }} {{ isset($asset['contents']) ? "(". count($asset['contents']) . ")" : "" }} @@ -202,7 +202,7 @@ - + {{ Seat\Services\Helpers\Img::type($content['typeID'], 16, array('class' => 'eveIcon small')) }} {{ str_limit($content['typeName'], 30, $end = '...') }} @@ -257,8 +257,10 @@ $(".viewcontent").on("click", function( event ){ // get the tbody tag direct after the button var contents = $(this).closest( "tbody").next( "tbody" ); + // Show or hide contents.toggle(); + setupLazyLoader(contents); // some code for stylish if (contents.is(":visible")){ diff --git a/app/views/corporation/assets/listasset.blade.php b/app/views/corporation/assets/listasset.blade.php index 6b19108b..cec5b375 100644 --- a/app/views/corporation/assets/listasset.blade.php +++ b/app/views/corporation/assets/listasset.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Assets diff --git a/app/views/corporation/contracts/contracts.blade.php b/app/views/corporation/contracts/contracts.blade.php index 198c3f74..361d2fe5 100644 --- a/app/views/corporation/contracts/contracts.blade.php +++ b/app/views/corporation/contracts/contracts.blade.php @@ -49,12 +49,12 @@ - + {{ Seat\Services\Helpers\Img::html($contract['issuerID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['issuerID'] }} @if ($contract['assigneeID'] <> 0) - + {{ Seat\Services\Helpers\Img::html($contract['assigneeID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['assigneeID'] }} @else Unknown Assignee @@ -109,8 +109,9 @@
  • Completed: {{ Carbon\Carbon::parse($contract['dateCompleted'])->diffForHumans() }} - by - {{ $contract['acceptorID'] }} + by + {{ Seat\Services\Helpers\Img::html($contract['acceptorID'], 16, array('class' => 'img-circle eveIcon small')) }} + {{ $contract['acceptorID'] }}
  • @endif
  • @@ -146,8 +147,8 @@
  • {{-- Check if it's a item request or not --}} @if($content['included'] == 1) - - {{ number_format($content['quantity'], 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} x {{ $content['typeName'] }} + {{ Seat\Services\Helpers\Img::type($content['typeID'], 16, array('class' => 'eveIcon small')) }} + {{ number_format($content['quantity'], 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} x {{ $content['typeName'] }} @endif
  • @@ -167,8 +168,8 @@
  • {{-- Check if it's a item request or not --}} @if($content['included'] == 0) - - {{ number_format($content['quantity'], 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} x {{ $content['typeName'] }} + {{ Seat\Services\Helpers\Img::type($content['typeID'], 16, array('class' => 'eveIcon small')) }} + {{ number_format($content['quantity'], 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} x {{ $content['typeName'] }} @endif
  • @@ -220,12 +221,12 @@ - + {{ Seat\Services\Helpers\Img::html($contract['issuerID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['issuerID'] }} @if ($contract['assigneeID'] <> 0) - + {{ Seat\Services\Helpers\Img::html($contract['assigneeID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $contract['assigneeID'] }} @else Unknown Assignee @@ -287,8 +288,9 @@
  • Accepted: {{ Carbon\Carbon::parse($contract['dateAccepted'])->diffForHumans() }} - by - {{ $contract['acceptorID'] }} + by + {{ Seat\Services\Helpers\Img::html($contract['acceptorID'], 16, array('class' => 'img-circle eveIcon small')) }} + {{ $contract['acceptorID'] }}
  • @endif @@ -346,6 +348,7 @@ // Show or hide contents.toggle(); + setupLazyLoader(contents); // some code for stylish if (contents.is(":visible")){ diff --git a/app/views/corporation/contracts/listcontract.blade.php b/app/views/corporation/contracts/listcontract.blade.php index f1a64dbc..f16ff16a 100644 --- a/app/views/corporation/contracts/listcontract.blade.php +++ b/app/views/corporation/contracts/listcontract.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Contracts diff --git a/app/views/corporation/customsoffices/listcustomsoffices.blade.php b/app/views/corporation/customsoffices/listcustomsoffices.blade.php index ca89de46..23f2cd78 100644 --- a/app/views/corporation/customsoffices/listcustomsoffices.blade.php +++ b/app/views/corporation/customsoffices/listcustomsoffices.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Corporation Customs Offices diff --git a/app/views/corporation/industry/industry.blade.php b/app/views/corporation/industry/industry.blade.php index 235a33eb..c2440112 100644 --- a/app/views/corporation/industry/industry.blade.php +++ b/app/views/corporation/industry/industry.blade.php @@ -71,10 +71,19 @@ - {{ $job->installerName }} + + {{ Seat\Services\Helpers\Img::character($job->installerID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $job->installerName }} + {{ $job->runs }} - {{ $job->blueprintTypeName }} - {{ $job->productTypeName }} + + {{ Seat\Services\Helpers\Img::type($job->blueprintTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $job->blueprintTypeName }} + + + {{ Seat\Services\Helpers\Img::type($job->productTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $job->productTypeName }} + {{ $job->location }} @@ -124,10 +133,19 @@ Invention @endif - {{ $job->installerName }} + + {{ Seat\Services\Helpers\Img::character($job->installerID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $job->installerName }} + {{ $job->runs }} - {{ $job->blueprintTypeName }} - {{ $job->productTypeName }} + + {{ Seat\Services\Helpers\Img::type($job->blueprintTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $job->blueprintTypeName }} + + + {{ Seat\Services\Helpers\Img::type($job->productTypeID, 16, array('class' => 'eveIcon small')) }} + {{ $job->productTypeName }} + {{ $job->location }} diff --git a/app/views/corporation/industry/listindustry.blade.php b/app/views/corporation/industry/listindustry.blade.php index 657513b3..e2103e30 100644 --- a/app/views/corporation/industry/listindustry.blade.php +++ b/app/views/corporation/industry/listindustry.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Corporation Jobs diff --git a/app/views/corporation/killmails/killmails.blade.php b/app/views/corporation/killmails/killmails.blade.php index e0631cc2..beec6bba 100644 --- a/app/views/corporation/killmails/killmails.blade.php +++ b/app/views/corporation/killmails/killmails.blade.php @@ -31,7 +31,7 @@ - + {{ Seat\Services\Helpers\Img::character($killmail->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $killmail->characterName }} {{-- if the characterID == victim characterID, then this is a loss --}} @if($killmail->corporationID == $corporationID) @@ -41,7 +41,7 @@ - + {{ Seat\Services\Helpers\Img::type($killmail->shipTypeID, 16, array('class' => 'eveIcon small')) }} {{ $killmail->typeName }} diff --git a/app/views/corporation/killmails/listkillmails.blade.php b/app/views/corporation/killmails/listkillmails.blade.php index c0c7e8c6..81b54aeb 100644 --- a/app/views/corporation/killmails/listkillmails.blade.php +++ b/app/views/corporation/killmails/listkillmails.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Kill Mails diff --git a/app/views/corporation/ledger/ajax/ledgermonth.blade.php b/app/views/corporation/ledger/ajax/ledgermonth.blade.php index 5cc374fd..3fadec73 100644 --- a/app/views/corporation/ledger/ajax/ledgermonth.blade.php +++ b/app/views/corporation/ledger/ajax/ledgermonth.blade.php @@ -105,6 +105,7 @@
  • Bounty Prizes
  • Mission Rewards
  • Planetary Interaction
  • +
  • Incursions Payouts
  • @@ -131,7 +132,7 @@ - + {{ Seat\Services\Helpers\Img::character($entry->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} {{ $entry->ownerName2 }} @@ -173,7 +174,7 @@ - + {{ Seat\Services\Helpers\Img::character($entry->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} {{ $entry->ownerName2 }} @@ -191,6 +192,49 @@

    No Tax Contributor Information Available

    @endif +
    +
    + + {{-- bounty tax --}} + @if (count($incursions_tax) > 0) + +
    +
    +

    Tax Contributions for Incursions Payouts

    +
    +
    + + + + + + + + + + @foreach ($incursions_tax as $entry) + + + + + + + @endforeach + + +
    ContributorContribution Total
    + + {{ Seat\Services\Helpers\Img::character($entry->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $entry->ownerName2 }} + + {{ number_format($entry->total, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }} ISK
    +
    +
    + + @else +

    No Tax Contributor Information Available

    + @endif +
    @@ -216,7 +260,7 @@ - + {{ Seat\Services\Helpers\Img::character($entry->ownerID1, 16, array('class' => 'img-circle eveIcon small')) }} {{ $entry->ownerName1 }} diff --git a/app/views/corporation/ledger/ledger.blade.php b/app/views/corporation/ledger/ledger.blade.php index dca78346..1e2a9267 100644 --- a/app/views/corporation/ledger/ledger.blade.php +++ b/app/views/corporation/ledger/ledger.blade.php @@ -72,6 +72,12 @@ @endforeach + + + Total: + {{ number_format($wallet_balances_total, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }} ISK + +
    @@ -176,6 +182,7 @@
  • Bounty Prizes
  • Mission Rewards
  • Planetary Interaction
  • +
  • Incursions Payout
  • @@ -202,7 +209,7 @@ - + {{ Seat\Services\Helpers\Img::character($entry->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} {{ $entry->ownerName2 }} @@ -244,7 +251,7 @@ - + {{ Seat\Services\Helpers\Img::character($entry->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} {{ $entry->ownerName2 }} @@ -287,7 +294,7 @@ - + {{ Seat\Services\Helpers\Img::character($entry->ownerID1, 16, array('class' => 'img-circle eveIcon small')) }} {{ $entry->ownerName1 }} @@ -310,6 +317,48 @@
    +
    + + {{-- bounty tax --}} + @if (count($incursions_tax) > 0) + +
    +
    +

    Tax Contributions for Incursions Payouts

    +
    +
    + + + + + + + + + + @foreach ($incursions_tax as $entry) + + + + + + + @endforeach + + +
    ContributorContribution Total
    + + {{ Seat\Services\Helpers\Img::character($entry->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $entry->ownerName2 }} + + {{ number_format($entry->total, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }} ISK
    +
    +
    + @else +

    No Tax Contributor Information Available

    + @endif + +
    diff --git a/app/views/corporation/ledger/listledger.blade.php b/app/views/corporation/ledger/listledger.blade.php index f5f53f2e..48aa2f0a 100644 --- a/app/views/corporation/ledger/listledger.blade.php +++ b/app/views/corporation/ledger/listledger.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Ledger diff --git a/app/views/corporation/marketorders/listmarketorders.blade.php b/app/views/corporation/marketorders/listmarketorders.blade.php index 7d47047e..b8ac7e82 100644 --- a/app/views/corporation/marketorders/listmarketorders.blade.php +++ b/app/views/corporation/marketorders/listmarketorders.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Market Orders diff --git a/app/views/corporation/marketorders/marketorders.blade.php b/app/views/corporation/marketorders/marketorders.blade.php index 58c2b61a..faafc44b 100644 --- a/app/views/corporation/marketorders/marketorders.blade.php +++ b/app/views/corporation/marketorders/marketorders.blade.php @@ -82,13 +82,13 @@ - + {{ Seat\Services\Helpers\Img::character($order->charID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $order->charID }} {{ $order->location }} - + {{ Seat\Services\Helpers\Img::type($order->typeID, 16, array('class' => 'eveIcon small')) }} {{ $order->typeName }} {{ $order->volRemaining }}/{{ $order->volEntered }} diff --git a/app/views/corporation/membersecurity/listmembersecurity.blade.php b/app/views/corporation/membersecurity/listmembersecurity.blade.php index 3bfee9ed..b3550003 100644 --- a/app/views/corporation/membersecurity/listmembersecurity.blade.php +++ b/app/views/corporation/membersecurity/listmembersecurity.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Member Security diff --git a/app/views/corporation/membersecurity/membersecurity.blade.php b/app/views/corporation/membersecurity/membersecurity.blade.php index b90edb43..8c22332f 100644 --- a/app/views/corporation/membersecurity/membersecurity.blade.php +++ b/app/views/corporation/membersecurity/membersecurity.blade.php @@ -48,7 +48,7 @@ - + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->name }} @@ -88,7 +88,7 @@ - + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->name }} @@ -128,7 +128,7 @@ - + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->name }} @@ -168,7 +168,7 @@ - + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->name }} @@ -208,7 +208,7 @@ - + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->name }} @@ -248,7 +248,7 @@ - + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->name }} @@ -288,7 +288,7 @@ - + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->name }} @@ -328,7 +328,7 @@ - + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->name }} @@ -373,10 +373,12 @@ - {{ $e->characterName }} + {{ Seat\Services\Helpers\Img::character($e->characterID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $e->characterName }} - {{ $e->issuerName }} + {{ Seat\Services\Helpers\Img::html($e->issuerID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $e->issuerName }} {{ $e->roleLocationType }} {{ $e->changeTime }} @@ -495,7 +497,7 @@ @endforeach @endif - + Grantable Roles (Base) diff --git a/app/views/corporation/memberstandings/listmemberstandings.blade.php b/app/views/corporation/memberstandings/listmemberstandings.blade.php index 21799c94..17179d37 100644 --- a/app/views/corporation/memberstandings/listmemberstandings.blade.php +++ b/app/views/corporation/memberstandings/listmemberstandings.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Standings diff --git a/app/views/corporation/memberstandings/memberstandings.blade.php b/app/views/corporation/memberstandings/memberstandings.blade.php index 6c0056ab..76157a99 100644 --- a/app/views/corporation/memberstandings/memberstandings.blade.php +++ b/app/views/corporation/memberstandings/memberstandings.blade.php @@ -24,7 +24,7 @@ - + {{ Seat\Services\Helpers\Img::html($standing->fromID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $standing->fromName }} {{ number_format($standing->standing, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }} @@ -50,7 +50,7 @@ - + {{ Seat\Services\Helpers\Img::character($standing->fromID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $standing->fromName }} {{ number_format($standing->standing, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }} @@ -76,7 +76,7 @@ - + {{ Seat\Services\Helpers\Img::html($standing->fromID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $standing->fromName }} {{ number_format($standing->standing, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }} diff --git a/app/views/corporation/membertracking/listmembertracking.blade.php b/app/views/corporation/membertracking/listmembertracking.blade.php index 99fd3111..b2cae619 100644 --- a/app/views/corporation/membertracking/listmembertracking.blade.php +++ b/app/views/corporation/membertracking/listmembertracking.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Member Tracking diff --git a/app/views/corporation/membertracking/membertracking.blade.php b/app/views/corporation/membertracking/membertracking.blade.php index 08845f55..e7994c29 100644 --- a/app/views/corporation/membertracking/membertracking.blade.php +++ b/app/views/corporation/membertracking/membertracking.blade.php @@ -31,8 +31,8 @@ - - {{ $character->name }} + {{ Seat\Services\Helpers\Img::character($character->characterID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $character->name }} diff --git a/app/views/corporation/starbase/liststarbase.blade.php b/app/views/corporation/starbase/liststarbase.blade.php index 56c5b681..3fddec5f 100644 --- a/app/views/corporation/starbase/liststarbase.blade.php +++ b/app/views/corporation/starbase/liststarbase.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Corporation Starbases diff --git a/app/views/corporation/starbase/starbase.blade.php b/app/views/corporation/starbase/starbase.blade.php index 6b65a1ff..a00a2e61 100644 --- a/app/views/corporation/starbase/starbase.blade.php +++ b/app/views/corporation/starbase/starbase.blade.php @@ -29,7 +29,10 @@ Onlined Sec Offline Estimate - Fuel Level + + {{ Seat\Services\Helpers\Img::type('4051', 32, array('style' => 'width: 18px;height: 18px;')) }} + Fuel Level + State @@ -40,13 +43,13 @@ - + {{ Seat\Services\Helpers\Img::type($details->typeID, 32, array('style' => 'width: 18px;height: 18px;', )) }} {{ $details->typeName }} {{ $starbase_names[$details->itemID] }} {{ $details->itemName }} - {{ $details->onlineTimeStamp }} ({{ Carbon\Carbon::parse($details->onlineTimeStamp)->diffForHumans() }}) + {{ $details->onlineTimeStamp }} ({{ Carbon\Carbon::parse($details->onlineTimeStamp)->diffForHumans() }}) {{ number_format($details->security, 1, $settings['decimal_seperator'], $settings['thousand_seperator']) }} @@ -177,7 +180,7 @@ - + {{ Seat\Services\Helpers\Img::type('4051', 32, array('style' => 'width: 18px;height: 18px;', )) }} Fuel Blocks @if($details->security >= 0.5)+ Charters @endif: {{ ($details->starbaseCharter) + ($details->fuelBlocks * 5) }} m3 / {{ $bay_sizes[$details->typeID]['fuelBay'] }} m3 @@ -189,9 +192,8 @@ - + {{ Seat\Services\Helpers\Img::type('16275', 32, array('style' => 'width: 18px;height: 18px;')) }} Strontium: {{ ($details->strontium * 3) }} m3 / {{ $bay_sizes[$details->typeID]['strontBay'] }} m3 -
    @@ -257,11 +259,11 @@
    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Corporation Wallet Journal diff --git a/app/views/corporation/walletjournal/walletjournal.blade.php b/app/views/corporation/walletjournal/walletjournal.blade.php index a55cfeea..14c4eaee 100644 --- a/app/views/corporation/walletjournal/walletjournal.blade.php +++ b/app/views/corporation/walletjournal/walletjournal.blade.php @@ -48,11 +48,11 @@ {{ $e->description }} {{ $e->refTypeName }} - + {{ Seat\Services\Helpers\Img::html($e->ownerID1, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->ownerName1 }} - + {{ Seat\Services\Helpers\Img::html($e->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} {{ $e->ownerName2 }} {{ $e->argName1 }} diff --git a/app/views/corporation/wallettransactions/listtransactions.blade.php b/app/views/corporation/wallettransactions/listtransactions.blade.php index 2f4b24c2..cbac91f4 100644 --- a/app/views/corporation/wallettransactions/listtransactions.blade.php +++ b/app/views/corporation/wallettransactions/listtransactions.blade.php @@ -13,7 +13,7 @@

    From character: {{ $corp->characterName }}

    - + {{ Seat\Services\Helpers\Img::corporation($corp->corporationID, 32, array('class' => 'img-circle eveIcon medium')) }}
    View Corporation Wallet Transactions diff --git a/app/views/corporation/wallettransactions/wallettransactions.blade.php b/app/views/corporation/wallettransactions/wallettransactions.blade.php index db4369fe..4816bb44 100644 --- a/app/views/corporation/wallettransactions/wallettransactions.blade.php +++ b/app/views/corporation/wallettransactions/wallettransactions.blade.php @@ -42,7 +42,7 @@ - + {{ Seat\Services\Helpers\Img::type($e->typeID, 16, array('class' => 'eveIcon small')) }} {{ $e->typeName }} {{ $e->quantity }} diff --git a/app/views/emails/layouts/masterLayout.blade.php b/app/views/emails/layouts/masterLayout.blade.php index 36d79e61..d66302e5 100644 --- a/app/views/emails/layouts/masterLayout.blade.php +++ b/app/views/emails/layouts/masterLayout.blade.php @@ -1,154 +1,154 @@ - - - - - - - @include('emails.layouts.style') - - - - - - - - -
    - - - - - - - - -
     
    - - - - - - - -
    - - - - - - -
    - - - - - - -
    -
     
    - - - - - - -
    - -

    - @if (trim($__env->yieldContent('email_title'))) - @yield('email_title') - @else - Untitled Email! - @endif -

    - - {{-- the actual email content goes here --}} - @yield('email_content') - -
    - - - - - - - -
    - - {{-- if the email has botton actions, yield them here --}} - @yield('button_action') - -
    - -
     
    -
    -
    -
    - -
     
    - - - - - - - - - - -
    - - - + + + + + + + @include('emails.layouts.style') + + + + + + + + +
    + + + + + + + + +
     
    + + + + + + + +
    + + + + + + +
    + + + + + + +
    +
     
    + + + + + + +
    + +

    + @if (trim($__env->yieldContent('email_title'))) + @yield('email_title') + @else + Untitled Email! + @endif +

    + + {{-- the actual email content goes here --}} + @yield('email_content') + +
    + + + + + + + +
    + + {{-- if the email has botton actions, yield them here --}} + @yield('button_action') + +
    + +
     
    +
    +
    +
    + +
     
    + + + + + + + + + + +
    + + + diff --git a/app/views/emails/layouts/style.blade.php b/app/views/emails/layouts/style.blade.php index afc08d08..03e0ea77 100644 --- a/app/views/emails/layouts/style.blade.php +++ b/app/views/emails/layouts/style.blade.php @@ -1,968 +1,968 @@ - - - + \ No newline at end of file diff --git a/app/views/emails/notifications/notify.blade.php b/app/views/emails/notifications/notify.blade.php index 2154f087..874c07b4 100644 --- a/app/views/emails/notifications/notify.blade.php +++ b/app/views/emails/notifications/notify.blade.php @@ -1,50 +1,50 @@ -@extends('emails.layouts.masterLayout') - -@section('email_title', $title . ' notification') - -@section('email_content') -

    - Hello, -

    -

    - You have received a new SeAT notification: -

    - - - -

    - The notification text is: -

    - -

    - - {{ $text }} - -

    -@stop - -@section('button_action') -
    - - - View Notification Online - - - -
    - -@stop +@extends('emails.layouts.masterLayout') + +@section('email_title', $title . ' notification') + +@section('email_content') +

    + Hello, +

    +

    + You have received a new SeAT notification: +

    + + + +

    + The notification text is: +

    + +

    + + {{ $text }} + +

    +@stop + +@section('button_action') +
    + + + View Notification Online + + + +
    + +@stop diff --git a/app/views/eve/item/ajax/result.blade.php b/app/views/eve/item/ajax/result.blade.php index 23cc10ce..fe573bc3 100644 --- a/app/views/eve/item/ajax/result.blade.php +++ b/app/views/eve/item/ajax/result.blade.php @@ -16,7 +16,9 @@ @foreach ($items as $result) - + + {{ Seat\Services\Helpers\Img::type($result->typeID, 16, array('class' => 'eveIcon small')) }} + {{ $result->typeID }} {{ $result->typeName }} {{ $result->description }} diff --git a/app/views/eve/item/search.blade.php b/app/views/eve/item/search.blade.php index ef56eb2d..b27e218d 100644 --- a/app/views/eve/item/search.blade.php +++ b/app/views/eve/item/search.blade.php @@ -74,6 +74,7 @@ }, success: function(result){ $("div#result").html(result); + setupLazyLoader($("div#result")); $("table#datatable").dataTable({ paging:false }); }, error: function(xhr, textStatus, errorThrown){ diff --git a/app/views/home.blade.php b/app/views/home.blade.php index 71531e45..0015efb8 100644 --- a/app/views/home.blade.php +++ b/app/views/home.blade.php @@ -28,11 +28,11 @@
    -
    +
    -

    {{ $total_keys }}

    +

    {{ number_format($total_keys, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }}

    Total Recorded API Keys

    @@ -44,11 +44,11 @@
    -
    +
    -

    {{ $total_characters }}

    +

    {{ number_format($total_characters, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }}

    Total Character Sheets

    @@ -60,12 +60,28 @@
    -
    +
    + +
    +
    +

    {{ number_format($total_corporations, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }}

    +

    Total Corporation Sheets

    +
    +
    + +
    + + All Corporations + +
    +
    + +
    -

    {{ number_format($total_isk , 2, '.', ' ') }}

    -

    Total Recorded ISK

    +

    {{ number_format($total_char_isk, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }}

    +

    Total Recorded Character ISK

    @@ -75,11 +91,28 @@
    -
    + +
    + +
    +
    +

    {{ number_format($total_corp_isk, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }}

    +

    Total Recorded Corporation ISK

    +
    +
    + +
    + + All Corp Wallets + +
    +
    + +
    -

    {{ number_format($total_skillpoints , 0, '.', ' ') }}

    +

    {{ number_format($total_skillpoints, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }}

    Total Recorded Skillpoints

    diff --git a/app/views/keys/ajax/character.blade.php b/app/views/keys/ajax/character.blade.php index 50ed022a..cefef87f 100644 --- a/app/views/keys/ajax/character.blade.php +++ b/app/views/keys/ajax/character.blade.php @@ -87,7 +87,7 @@
    - + {{ Seat\Services\Helpers\Img::character($character->characterID, 128, array('class' => 'img-thumbnail eveIcon xlarge')) }}
    diff --git a/app/views/keys/ajax/corporation.blade.php b/app/views/keys/ajax/corporation.blade.php index 10f2f344..1141a8bf 100644 --- a/app/views/keys/ajax/corporation.blade.php +++ b/app/views/keys/ajax/corporation.blade.php @@ -71,7 +71,7 @@
    - + {{ Seat\Services\Helpers\Img::character($character->characterID, 128, array('class' => 'img-thumbnail eveIcon xlarge')) }}
    diff --git a/app/views/keys/all.blade.php b/app/views/keys/all.blade.php index 2fb0fa17..638587cc 100644 --- a/app/views/keys/all.blade.php +++ b/app/views/keys/all.blade.php @@ -45,7 +45,7 @@ @foreach($key['characters'] as $char) - + {{ Seat\Services\Helpers\Img::character($char['characterID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $char['characterName'] }} diff --git a/app/views/keys/detail.blade.php b/app/views/keys/detail.blade.php index 4bfa3040..00bdd46c 100644 --- a/app/views/keys/detail.blade.php +++ b/app/views/keys/detail.blade.php @@ -87,7 +87,7 @@
    diff --git a/app/views/keys/people.blade.php b/app/views/keys/people.blade.php index d0bc0f8a..673c2ffe 100644 --- a/app/views/keys/people.blade.php +++ b/app/views/keys/people.blade.php @@ -40,7 +40,7 @@
    - characterID }}_32.jpg' class='img-circle'> + {{ Seat\Services\Helpers\Img::character($personData[0]['main']->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ str_limit($personData[0]['main']->characterName, 30, $end = '...') }} ({{ count($personData) }} keys) @@ -64,7 +64,7 @@
  • - + {{ Seat\Services\Helpers\Img::character($character->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $character->characterName }} @if ($personData[0]['main']->characterID <> $character->characterID) @@ -108,7 +108,7 @@
  • - + {{ Seat\Services\Helpers\Img::character($character->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $character->characterName }} Use as Main for new Group diff --git a/app/views/layouts/components/header.blade.php b/app/views/layouts/components/header.blade.php index 80bba254..d6eaf20c 100644 --- a/app/views/layouts/components/header.blade.php +++ b/app/views/layouts/components/header.blade.php @@ -58,9 +58,9 @@ @endif {{-- See SettingHelper why this has to be more than 1 --}} @if($settings['main_character_id'] > 1) - User Image + {{ Seat\Services\Helpers\Img::character($settings['main_character_id'], 64, array('class' => 'img-circle eveIcon large'), false) }} @else - User Image + {{ Seat\Services\Helpers\Img::character('1', 16, array('class' => 'img-circle eveIcon small')) }} @endif

    {{ \Auth::User()->email }} diff --git a/app/views/layouts/components/sidebar.blade.php b/app/views/layouts/components/sidebar.blade.php index 790f4957..a6176540 100644 --- a/app/views/layouts/components/sidebar.blade.php +++ b/app/views/layouts/components/sidebar.blade.php @@ -7,9 +7,9 @@

    {{-- See SettingHelper why this has to be more than 1 --}} @if($settings['main_character_id'] > 1) - User Image + {{ Seat\Services\Helpers\Img::character($settings['main_character_id'], 16, array('class' => 'img-circle eveIcon medium')) }} @else - User Image + {{ Seat\Services\Helpers\Img::character('1', 16, array('class' => 'img-circle eveIcon medium')) }} @endif
    @@ -59,6 +59,7 @@
      +
    • All Corporations
    • @if(\Auth::hasAccess('asset_manager'))
    • Assets
    • @endif diff --git a/app/views/layouts/masterLayout.blade.php b/app/views/layouts/masterLayout.blade.php index 94d62a89..bd4b1d09 100644 --- a/app/views/layouts/masterLayout.blade.php +++ b/app/views/layouts/masterLayout.blade.php @@ -90,8 +90,10 @@ - + + + @@ -133,7 +135,17 @@ })(); // Specify the location of the search controller - var search_location = "{{ action('DashboardController@getSearch') }}" + var search_location = "{{ action('DashboardController@getSearch') }}"; + + $(document).ready(function() { + setupLazyLoader(); + $(window).on('shown.bs.tab', function(){ + setupLazyLoader(); + }); + $( document ).ajaxComplete(function() { + setupLazyLoader(); + }); + }); diff --git a/app/views/layouts/minimalLayout.blade.php b/app/views/layouts/minimalLayout.blade.php index 9f0fc058..6ef46668 100644 --- a/app/views/layouts/minimalLayout.blade.php +++ b/app/views/layouts/minimalLayout.blade.php @@ -62,6 +62,20 @@ + + + + diff --git a/app/views/mail/read.blade.php b/app/views/mail/read.blade.php index d1b8a1fc..b6e94daf 100644 --- a/app/views/mail/read.blade.php +++ b/app/views/mail/read.blade.php @@ -30,7 +30,7 @@ From: - + {{ Seat\Services\Helpers\Img::character($message->senderID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $message->senderName }} sent about {{ Carbon\Carbon::parse($message->sentDate)->diffForHumans() }} @ {{ $message->sentDate }} @@ -43,10 +43,8 @@ To Corp/Alliance: @foreach (explode(',', $message->toCorpOrAllianceID) as $corp_alliance) - - + {{ Seat\Services\Helpers\Img::html($corp_alliance, 16, array('class' => 'img-circle eveIcon small')) }} {{ $corp_alliance }} - @endforeach @endif @@ -57,12 +55,10 @@ To Characters: @foreach (explode(',', $message->toCharacterIDs) as $characterID) - - + {{ Seat\Services\Helpers\Img::character($characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $characterID }} - @endforeach @endif @@ -132,7 +128,7 @@ - + {{ Seat\Services\Helpers\Img::character($recipient, 16, array('class' => 'img-circle eveIcon small')) }} {{ $recipient }} diff --git a/app/views/mail/subjects.blade.php b/app/views/mail/subjects.blade.php index 79c73ac9..aba440d7 100644 --- a/app/views/mail/subjects.blade.php +++ b/app/views/mail/subjects.blade.php @@ -42,7 +42,7 @@ - + {{ Seat\Services\Helpers\Img::character($message->senderID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $message->senderName }} diff --git a/app/views/mail/timeline.blade.php b/app/views/mail/timeline.blade.php index 9f7d8f48..0c4bef31 100644 --- a/app/views/mail/timeline.blade.php +++ b/app/views/mail/timeline.blade.php @@ -46,7 +46,7 @@ From: - + {{ Seat\Services\Helpers\Img::character($message->senderID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $message->senderName }} sent about {{ Carbon\Carbon::parse($message->sentDate)->diffForHumans() }} @ {{ $message->sentDate }} @@ -59,7 +59,7 @@ @foreach (explode(',', $message->toCorpOrAllianceID) as $corp_alliance) - + {{ Seat\Services\Helpers\Img::html($corp_alliance, 16, array('class' => 'img-circle eveIcon small')) }} {{ $corp_alliance }} @endforeach @@ -73,7 +73,7 @@ @foreach (explode(',', $message->toCharacterIDs) as $characterID) - + {{ Seat\Services\Helpers\Img::character($characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $characterID }} diff --git a/app/views/search.blade.php b/app/views/search.blade.php index 34e93ab3..55eb25ad 100644 --- a/app/views/search.blade.php +++ b/app/views/search.blade.php @@ -40,7 +40,7 @@ - + {{ Seat\Services\Helpers\Img::character($character->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ App\Services\Helpers\Helpers::highlightKeyword($character->characterName, $keyword) }} @@ -82,7 +82,7 @@ - + {{ Seat\Services\Helpers\Img::character($character_asset->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $character_asset->characterName }} @@ -124,7 +124,7 @@ - + {{ Seat\Services\Helpers\Img::character($character_contact->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $character_contact->characterName }} @@ -171,7 +171,7 @@ - + {{ Seat\Services\Helpers\Img::character($message->senderID, 16, array('class' => 'img-circle eveIcon small')) }} {{ App\Services\Helpers\Helpers::highlightKeyword($message->senderName, $keyword) }} @@ -214,7 +214,7 @@ - + {{ Seat\Services\Helpers\Img::character($standing->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ App\Services\Helpers\Helpers::highlightKeyword($standing->characterName, $keyword) }} diff --git a/app/views/settings/settings.blade.php b/app/views/settings/settings.blade.php index 6330aaab..a24f208a 100644 --- a/app/views/settings/settings.blade.php +++ b/app/views/settings/settings.blade.php @@ -5,7 +5,7 @@ @section('page_content')
      -
      +

      SeAT Settings

      @@ -49,6 +49,17 @@
      + +
      + +
      +
      + {{ Form::text('administrative_contact', $administrative_contact, array('id' => 'administrative_contact', 'class' => 'form-control'), 'required') }} + What is the email address for the SeAT administrator for this installation. +
      +
      +
      +
      @@ -74,6 +85,34 @@
      + Seat Notifications Settings + +

      + Note: These parameters affect the SeAT Notifications system +

      + + +
      + +
      +
      + {{ Form::text('seatnotify_member_inactivity_months', $seatnotify_member_inactivity_months, array('class' => 'form-control')) }} + After how many months should a character be considered inactive. +
      +
      +
      + + +
      + +
      +
      + {{ Form::text('seatnotify_fuel_warning_days', $seatnotify_fuel_warning_days, array('class' => 'form-control')) }} + How many days in advance should a starbase warn about fuel levels. +
      +
      +
      + Seat Queue Settings

      diff --git a/docs/INSTALL_Centos7.md b/docs/INSTALL_Centos7.md new file mode 100644 index 00000000..8ce75780 --- /dev/null +++ b/docs/INSTALL_Centos7.md @@ -0,0 +1,643 @@ +## SeAT - Simple (or Stupid) EVE Online API Tool ## + +### Introduction ### +SeAT is a EVE Online™ Corporation / API Key Management Tool written in PHP using the [Laravel][1] Framework. This guide attempts to detail the process in order to successfully get a new installation setup, configured and ready to use. Lets dive right in. + +### Requirements ### +Installing SeAT *should* be relatively simple. At a high level, the main requirements for SeAT is: + + - [PHP (5.3+)][2] + - [Apache][3] + - [Redis][4] + - [supervisord][5] + - [MySQL][6] + +SeAT was developed for Linux and has been tested to work fine on CentOS/Ubuntu. Chances are you could get it going pretty easily on many other Linux flavors, so feel free to contribute docs with install guides. As far as windows support goes... well.... + +### Video Tutorial ### +A visual walkthrough of installing SeAT on CentOS 7 is hosted on asciicinema and can be viewed [here](https://asciinema.org/a/14881). The walkthrough follows the exact same steps as detailed in the below guide, so feel free to follow along. It also shows that you can install SeAT in 16 minutes :D + +### Installation Preparation ### +The following guide assumes you are using CentOS 7 and are currently logged in as the `root` user. A separate guide for CentOS 6 / Debian / Ubuntu can be found in `docs/`. +For CentOS 7, the EPEL repository is needed to satisfy the Redis and supervisord dependencies. We will have to add this repository early so lets get to that. Before you add the repository though, check that you have the `wget` command available for use by issuing it with `wget -V`: + +```bash +[root@seat ~]# wget -V +GNU Wget 1.12 built on linux-gnu. +[... snip ...] +``` + +If you get a error such as `-bash: wget: command not found`, simply install `wget` using `yum` with `yum install -y wget`: + +```bash +[root@seat ~]# yum install -y wget +Loaded plugins: fastestmirror +Setting up Install Process +Loading mirror speeds from cached hostfile + * base: dl.za.jsdaav.net + * extras: dl.za.jsdaav.net + * updates: dl.za.jsdaav.net +Resolving Dependencies +--> Running transaction check +---> Package wget.x86_64 0:1.12-5.el6_6.1 will be installed +``` + +With `wget` ready to use, we can finally add the EPEL repository: + +```bash +[root@seat ~]# wget http://mirror.wbs.co.za/fedora-epel/7/x86_64/e/epel-release-7-5.noarch.rpm -O epel-release-7-5.noarch.rpm && yum localinstall -y epel-release-7-5.noarch.rpm && rm -f epel-release-7-5.noarch.rpm +``` + +#### 1. Install & Configure MariaDB #### +Next, we will prepare a MariaDB server instance for SeAT to use. If you already have a database server that you want to use, you may skip the installation section and move on to creating the database and user for SeAT. + +##### MariaDB Server ##### +*Note* MariaDB is binary compatible with mysql, so many of the commands will say `mysql`. This is not a typo. +So, to install the database server, we run `yum install -y mariadb-server`: + +```bash +[root@seat ~]# yum install -y mariadb-server +[... snip ...] +--> Running transaction check +---> Package mariadb-server.x86_64 1:5.5.41-2.el7_0 will be installed +--> Processing Dependency: mariadb(x86-64) = 1:5.5.41-2.el7_0 for package: 1:mariadb-server-5.5.41-2.el7_0.x86_64 +--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.41-2.el7_0.x86_64 +--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.41-2.el7_0.x86_64 +--> Processing Dependency: perl(Data::Dumper) for package: 1:mariadb-server-5.5.41-2.el7_0.x86_64 +[... snip ...] +Installed: + mariadb-server.x86_64 1:5.5.41-2.el7_0 +``` + +With our MariaDB server installed, we will configure it to automatically start should the server ever reboot with `systemctl enable mariadb.service`: + +```bash +[root@seat ~]# systemctl enable mariadb.service +ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' +``` + +Next, we start the database server with `systemctl start mariadb.service`: + +```bash +[root@seat ~]# systemctl start mariadb.service +``` + +Lastly, we have to ensure that the database server is secure and that no unauthorized access is possible. MySQL comes shipped with a helper command for that, so we will invoke ith with `mysql_secure_installation`. Make sure you choose a strong MySQL `root` password and remember it: + +```bash +[root@seat ~]# mysql_secure_installation + +[... snip ...] + +Set root password? [Y/n] y +New password: +Re-enter new password: +Password updated successfully! +Reloading privilege tables.. + ... Success! + + [... snip ...] + +Remove anonymous users? [Y/n] y + ... Success! + +[... snip ...] + +Disallow root login remotely? [Y/n] y + ... Success! + +[... snip ...] + +Remove test database and access to it? [Y/n] y + - Dropping test database... + ... Success! + - Removing privileges on test database... + ... Success! + +[... snip ...] + +Reload privilege tables now? [Y/n] y + ... Success! + + [... snip ...] +``` + +And our MariaDB server installation is done. + +##### MariaDB Database and User ##### +With a database server ready to use, we will move on to configuring the actual database SeAT will use, along with a user that will access this database. + +First, we have to connect to the database server as the `root` MariaDB user with `mysql -uroot -p`. The `-p` will tell the MariaDB client to prompt you for the MariaDB `root` password: + +```bash +[root@seat ~]# mysql -uroot -p +Enter password: +Welcome to the MariaDB monitor. Commands end with ; or \g. +Your MariaDB connection id is 10 +Server version: 5.5.41-MariaDB MariaDB Server + +Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others. + +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + +MariaDB [(none)]> +``` + +Next, we create a database for SeAT to use with `create database seat;`: + +```bash +MariaDB [(none)]> create database seat; +Query OK, 1 row affected (0.00 sec) +``` + +Lastly, we add a MySQL user for SeAT with the `GRANT` statement: + +```bash +MariaDB [(none)]> GRANT ALL ON seat.* to seat@localhost IDENTIFIED BY 's_p3rs3c3r3tp455w0rd'; +Query OK, 0 rows affected (0.00 sec) + +MariaDB [(none)]> \q +Bye +[root@seat ~]# +``` + +The database should now be ready to use! +You can optionally test the connection with the `mysql` client: + +```bash +[root@seat ~]# mysql -useat -p #enter your s_p3rs3c3r3tp455w0rd at the prompt +Enter password: +Welcome to the MariaDB monitor. Commands end with ; or \g. +Your MariaDB connection id is 12 +Server version: 5.5.41-MariaDB MariaDB Server + +Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others. + +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + +MariaDB [(none)]> \q +Bye + +[root@seat ~]# +``` + +**Note:** Remember the password for the `seat` user as you will need to provide it later when actually installing SeAT itself! + +#### 2. Install & Configure PHP / Apache #### +Next we will prepare the web server along with PHP. If you plan on only using the SeAT for backend purposes then you can skip the `httpd` package. + +So, lets install the dependencies with `yum install -y httpd php php-mysql php-cli php-mcrypt php-process php-mbstring` + +```bash +[root@seat ~]# yum install -y httpd php php-mysql php-cli php-mcrypt php-process php-mbstring +[... snip ...] +Resolving Dependencies +--> Running transaction check +---> Package httpd.x86_64 0:2.4.6-19.el7.centos will be installed +--> Processing Dependency: httpd-tools = 2.4.6-19.el7.centos for package: httpd-2.4.6-19.el7.centos.x86_64 +--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-19.el7.centos.x86_64 +--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-19.el7.centos.x86_64 +--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-19.el7.centos.x86_64 +---> Package php.x86_64 0:5.4.16-23.el7_0.3 will be installed +--> Processing Dependency: php-common(x86-64) = 5.4.16-23.el7_0.3 for package: php-5.4.16-23.el7_0.3.x86_64 +---> Package php-cli.x86_64 0:5.4.16-23.el7_0.3 will be installed +---> Package php-mbstring.x86_64 0:5.4.16-23.el7_0.3 will be installed +---> Package php-mcrypt.x86_64 0:5.4.16-2.el7 will be installed +--> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-mcrypt-5.4.16-2.el7.x86_64 +---> Package php-mysql.x86_64 0:5.4.16-23.el7_0.3 will be installed +--> Processing Dependency: php-pdo(x86-64) = 5.4.16-23.el7_0.3 for package: php-mysql-5.4.16-23.el7_0.3.x86_64 +---> Package php-process.x86_64 0:5.4.16-23.el7_0.3 will be installed +--> Running transaction check +---> Package apr.x86_64 0:1.4.8-3.el7 will be installed +---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed +---> Package httpd-tools.x86_64 0:2.4.6-19.el7.centos will be installed +---> Package libmcrypt.x86_64 0:2.5.8-13.el7 will be installed +---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed +---> Package php-common.x86_64 0:5.4.16-23.el7_0.3 will be installed +--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-23.el7_0.3.x86_64 +---> Package php-pdo.x86_64 0:5.4.16-23.el7_0.3 will be installed +--> Running transaction check +---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed +--> Finished Dependency Resolution + +[... snip ...] + +Installed: + httpd.x86_64 0:2.4.6-19.el7.centos php.x86_64 0:5.4.16-23.el7_0.3 php-cli.x86_64 0:5.4.16-23.el7_0.3 php-mbstring.x86_64 0:5.4.16-23.el7_0.3 php-mcrypt.x86_64 0:5.4.16-2.el7 + php-mysql.x86_64 0:5.4.16-23.el7_0.3 php-process.x86_64 0:5.4.16-23.el7_0.3 +``` + +Next we ensire that the web server will automatically start should our server reboot (can be skipped if `httpd` was not installed) with `systemctl enable httpd.service`: + +```bash +[root@seat ~]# [root@localhost ~]# systemctl enable httpd.service +ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' +``` + +And then lastly, we start Apache with `systemctl start httpd.service`: + +```bash +[root@seat ~]# systemctl start httpd.service +``` + +#### 3. Install & Configure Redis #### +The SeAT Jobs system as well as caching occurs in Redis. At present this is the only supported backend for Queues and Cache. So just like we have been installing the other dependencies, we will do the same with `yum install -y redis`: + +```bash +root@seat ~]# yum install -y redis + +[... snip ...] + +Resolving Dependencies +--> Running transaction check +---> Package redis.x86_64 0:2.8.14-2.el7 will be installed +--> Processing Dependency: libjemalloc.so.1()(64bit) for package: redis-2.8.14-2.el7.x86_64 +--> Running transaction check +---> Package jemalloc.x86_64 0:3.6.0-1.el7 will be installed +--> Finished Dependency Resolution + +[... snip ...] + +Installed: + redis.x86_64 0:2.8.14-2.el7 + +``` + +Next we enable it to start on boot with `chkconfig redis on`: + +```bash +[root@seat ~]# systemctl enable redis.service +ln -s '/usr/lib/systemd/system/redis.service' '/etc/systemd/system/multi-user.target.wants/redis.service' +``` + +And start the Redis Cache with `systemctl start redis.service` + +```bash +[root@seat ~]# systemctl start redis.service +``` + +We now have all the required dependencies to install SeAT! :) + +#### 4. Get SeAT #### + +##### Preparing Git ##### +The SeAT source code is hosted on [Github](https://github.com/eve-seat/seat) and to get a copy of it, we will need the `git` client. So, first check that you have `git` installed with `git --version`: + +```bash +[root@seat ~]# git --version +git version 1.8.3.1 +``` + +If you get a error such as `-bash: git: command not found`, simply install it using `yum` with `yum install -y git`: + +```bash +[root@seat ~]# yum install -y git + +[... snip ...] + +Resolving Dependencies +--> Running transaction check +---> Package git.x86_64 0:1.8.3.1-4.el7 will be installed +--> Processing Dependency: perl-Git = 1.8.3.1-4.el7 for package: git-1.8.3.1-4.el7.x86_64 +--> Processing Dependency: rsync for package: git-1.8.3.1-4.el7.x86_64 +--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-4.el7.x86_64 +--> Processing Dependency: perl(Git) for package: git-1.8.3.1-4.el7.x86_64 +--> Processing Dependency: perl(Error) for package: git-1.8.3.1-4.el7.x86_64 +--> Processing Dependency: libgnome-keyring.so.0()(64bit) for package: git-1.8.3.1-4.el7.x86_64 +--> Running transaction check +---> Package libgnome-keyring.x86_64 0:3.8.0-3.el7 will be installed +---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed +---> Package perl-Git.noarch 0:1.8.3.1-4.el7 will be installed +---> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed +---> Package rsync.x86_64 0:3.0.9-15.el7 will be installed +--> Finished Dependency Resolution + +[... snip ...] + +Installed: + git.x86_64 0:1.8.3.1-4.el7 + +``` + +##### Getting SeAT ##### +Now we finally get to the part of downloading SeAT. This is also the time where you need to decide where you want SeAT to live on your server. I am going to use `/var/www` in the tutorial as the SELinux contexts will be very easy to setup. + +So, change directories to `/var/www`: + +```bash +[root@seat ~]# cd /var/www/ +[root@seat www]# +``` + +If you check the directory listing with `ls`, you will notice a few folders already present: + +```bash +[root@seat www]# ls +cgi-bin html +``` + +And finally, clone the SeAT repository from Github with `git clone https://github.com/eve-seat/seat.git`: + +```bash +[root@seat www]# git clone https://github.com/eve-seat/seat.git +Initialized empty Git repository in /var/www/seat/.git/ +remote: Counting objects: 6080, done. +remote: Compressing objects: 100% (165/165), done. +remote: Total 6080 (delta 87), reused 0 (delta 0) +Receiving objects: 100% (6080/6080), 2.25 MiB | 17 KiB/s, done. +Resolving deltas: 100% (4132/4132), done. +``` + +If you have to view the directory listing again now using `ls`, you should notice the new `seat` directory: + +```bash +[root@seat www]# ls +cgi-bin html seat +``` + +Change to the new SeAT directory using `cd seat` as we have some installation work to do here. You should be in the directory `/var/www/seat` after the `cd` command. This can be checked with the `pwd` command after the `cd`: + +```bash +[root@seat www]# cd seat +[root@seat seat]# pwd +/var/www/seat +``` + + + +SeAT is now downloaded and almost ready to start being useful! + +#### 5. SeAT Configuration File #### +Some of the SeAT settings need to live in a configuration file. Thankfully, this is not one you have to edit manually, but you do need to provide a sample for the SeAT installer to use later. A sample file lives in `app/config/env-sample.php`, and needs to be copied to `.env.php` in your `seat/` folder. So, while you are still in `/var/www/seat`, copy the sample with `cp app/config/env-sample.php .env.php`: + +```bash +[root@seat seat]# pwd +/var/www/seat +[root@seat seat]# cp app/config/env-sample.php .env.php +[root@seat seat]# +``` + +#### 5. The Composer Dependency Manager #### +SeAT relies heavily on [composer](https://getcomposer.org/) to manage its internal dependencies. `composer` is a command line tool that should be downloaded separately. Once downloaded, we will have a file called `composer.phar`, which will be executed to update the SeAT dependencies amongst other things. + +So, lets install `composer`. We can store the file in the same folder where our `composer.json` lives, which will therefore be `/var/www/seat` (make sure that is the directory you are in before downloading). Then we download `composer` with `curl -sS https://getcomposer.org/installer | php`: + +```bash +[root@seat seat]# curl -sS https://getcomposer.org/installer | php +#!/usr/bin/env php +All settings correct for using Composer +Downloading... + +Composer successfully installed to: /var/www/seat/composer.phar +Use it: php composer.phar +``` + +With `composer` now ready to use, we start the dependency installation with `php composer.phar install` (`composer.phar` is in the same directory as `composer.json` in the below example). Note that this could take some time to complete: + +```bash +[root@seat seat]# php composer.phar install +Loading composer repositories with package information +Installing dependencies (including require-dev) + - Installing 3rdpartyeve/phealng (1.3.0) + Downloading: 100% + +[... snip ...] + +Generating autoload files +Generating optimized class loader +Compiling common classes +[root@seat seat]# +``` + +** NEARLY THERE ** + +#### 5. The SeAT Installer #### +The next step is to invoke the SeAT installer. The installer is responsible for ensuring that the configuration files are correct, the SeAT install has been configured for email and that the database is ready for use. + +**Installer Notes:** The installer will only continue once it has successfully made a connection to a MariaDB database and a Redis cache. Please ensure that these have already been configured as per the previous steps. +**Notes about mail:** The SeAT installer will provide you with 3 options for email. `mail`, which will use PHP's mailer, `smtp`, which will prompt you for optional credentials and `sendmail`. + +All settings made by the installer may be changed at a later state as they live in the `.env.php` file. +So, lets invoke the installer with `php artisan seat:install`: + +```bash +[root@seat seat]# php artisan seat:install +[+] Welcome to the SeAT v0.11.0 installer! + +[+] Database setup... +[+] Please enter the details for the MySQL database to use (enter to use default): +[?] Username (root): + +[... snip ...] +SDE update to rhea-1.0-109013 completed successfully. +[+] Configuring the 'admin' user... +WARNING!!! This will RESET the current Administrator password! + +What is the new password to use for the admin user? : +[... snip ...] +[ok] Group Key Manager created. + +[+] Done! +``` + +And thats it :) +If the installer failed, you can safely go and rectify what ever is needed and re-run it. + +#### 8. Install & Configure supervisord #### +SeAT makes use of *workers* to actually process the update jobs that get scheduled. Think if the architecture as someone coming and dumping mail at the postoffice, and its up to say 4 workers to dig through the mail and sort it. Those 4 workers need a manager to ensure that they keep working. `supervisord` is a excellent candidate for the job. + +So lets install supervisord with `yum install -y supervisor`: + +```bash +root@seat seat]# yum install -y supervisor + +[... snip ...] + +Resolving Dependencies +--> Running transaction check +---> Package supervisor.noarch 0:3.0-1.el7 will be installed +--> Processing Dependency: python-meld3 >= 0.6.5 for package: supervisor-3.0-1.el7.noarch +--> Running transaction check +---> Package python-meld3.x86_64 0:0.6.10-1.el7 will be installed +--> Finished Dependency Resolution + +[... snip ...] + +Installed: + supervisor.noarch 0:3.0-1.el7 +``` + +Once it is installed, we also want it to start when the server boots, so lets do that with `systemctl enable supervisord.service`: + +```bash +[root@seat seat]# systemctl enable supervisord.service +ln -s '/usr/lib/systemd/system/supervisord.service' '/etc/systemd/system/multi-user.target.wants/supervisord.service' +``` + +We now have to configure the actual workers that `supervisord` will manage. We do this by adding a new configuration file to `/etc/supervisor/conf.d/` called `seat.ini` A sample configuration for this file is located in `docs/` and at the end of this paragraph. Note that the number of workers that we want to start is set by the `numprocs` settings. + +```bash +[program:seat] +command=/usr/bin/php /var/www/seat/artisan queue:listen --timeout=3600 --tries 1 +process_name = %(program_name)s-80%(process_num)02d +stdout_logfile = /var/log/seat-80%(process_num)02d.log +stdout_logfile_maxbytes=100MB +stdout_logfile_backups=10 +numprocs=4 +directory=/var/www/seat +stopwaitsecs=600 +user=apache +``` + +Once this is done, save the file and start supervisord with `systemctl start supervisord.service`: + +```bash +[root@seat seat]# systemctl start supervisord.service +``` + +You can checkup on the status of the workers with `supervisorctl status`: + +```bash +[root@seat seat]# supervisorctl status +seat:seat-8000 RUNNING pid 5083, uptime 0:00:28 +seat:seat-8001 RUNNING pid 5082, uptime 0:00:28 +seat:seat-8002 RUNNING pid 5085, uptime 0:00:28 +seat:seat-8003 RUNNING pid 5084, uptime 0:00:28 +``` + +SeAT should now process jobs that enter the job queue. + +#### 9. Setup cron #### +While we now have workers ready, and a supervisor for them, we need to configure the part that is responsible for generating the work. SeAT has a preconfigured schedule at which work will come in, however, we need to check every minute if there is work to do. For that we setup a simple cronjob for the web server user with `crontab -u apache -e`, adding the following line to it `* * * * * /usr/bin/php /var/www/seat/artisan scheduled:run 1>> /dev/null 2>&1`: + +```bash +[root@seat seat]# crontab -u apache -e +# paste * * * * * /usr/bin/php /var/www/seat/artisan scheduled:run 1>> /dev/null 2>&1 +``` + +#### 10. SELinux ##### +Many people hate SELinux, primarily due to a misunderstanding of what it does and how it works. SeAT can run perfectly fine with SELinux enabled, and I actually encourage you to leave it enabled. There is however one small settings change required to make everything work as expected. + +First, we have to allow apache to make network connections. This is so that we may connect to the EVEAPI, as well as the MySQL database and Redis cache. Allow this to happen with `setsebool -P httpd_can_network_connect 1`: + +```bash +[root@seat seat]# setsebool -P httpd_can_network_connect 1 +[root@seat seat]# +``` + +Next, we need to allow Apache to write to disk with `setsebool -P httpd_unified 1` + +```bash +[root@seat seat]# setsebool -P httpd_unified 1 +``` + +Lastly, we check that all of the SeAT files are labelled correctly so that the SELinux MAC does not incorrectly deny access. We do this with `restorecon -Rv /var/www/seat`: +```bash +[root@seat seat]# restorecon -Rv /var/www/seat +[root@seat seat]# +``` + +Done! :) + +#### 11. Web Server #### +In order to get the SeAT fronted running, we need to configure Apache to serve our SeAT installs `public/` folder. +The Apache configuration itself will depend on how your server is set up. Generally, virtual hosting is the way to go, and this is what I will be showing here. + +If you are not going to use virtual hosting, the easiest to get going will probably to symlink `/var/www/seat/public/` to `/var/www/html/seat` and configuring apache to `AllowOverride All` in the `` section. This should have SeAT available at http://hostname/seat after you restart apache. + +##### The VirtualHost setup ##### +Getting the virtual host setup is as simple as creating a new configuration file (I usually call it the domain.conf), and modifying it to match your setup. Everywhere you see `seat.local`, it needs to be substituted to your actual domain: + +First we will prepare SeAT. We create the directory `/var/www/html/seat.local` with `mkdir /var/www/html/seat.local`: + +```bash +[root@seat seat]# mkdir /var/www/html/seat.local +[root@seat seat]# +``` + +Next we symlink the SeAT public directory there with `ln -s /var/www/seat/public /var/www/html/seat.local/seat`. + +```bash +[root@seat seat]# ln -s /var/www/seat/public /var/www/html/seat.local/seat +[root@seat seat]# +``` + +With that done, we continue to configure Apache for our VirtualHost. First we change to the directory `/etc/httpd/conf.d` which will have our `seat.local.conf` configuration file with `cd /etc/httpd/conf.d`: + +```bash +[root@seat seat]# cd /etc/httpd/conf.d +[root@seat conf.d]# +``` + +Next, we create the file `seat.local.conf`, pasting the following contents into it: + +```bash + + ServerAdmin webmaster@your.domain + DocumentRoot "/var/www/html/seat.local/seat" + ServerName seat.local + ServerAlias www.seat.local + ErrorLog "logs/seat.local-error_log" + CustomLog "logs/seat.local-access_log" common + + AllowOverride All + Order allow,deny + Allow from all + + +``` + +With the configuration file ready, we will restart Apache, and check if it sees our new Virtual Host. Restart apache with `systemctl restart httpd.service`: + +```bash +[root@seat conf.d]# systemctl restart httpd.service +``` + +##### File Permissions ##### + +SeAT writes logfiles/cachefiles and other temporary data to the `app/storage` directory. That together with the fact that the web content will be hosted by apache means that we need to configure the files permissions to allow SeAT do do its thing. + +First, lets ensure that apache owns everything in `/var/www/seat` which is the folder we downloaded SeAT to with `chown -R apache:apache /var/www/seat`: + +```bash +[root@seat seat]# chown -R apache:apache /var/www/seat +[root@seat seat]# +``` + +Next, we will allow Apache to write to the `app/storage` directory so that it may manipulate the files in there as needed with `chmod -R guo+w /var/www/seat/app/storage`: + +```bash +[root@seat seat]# chmod -R guo+w /var/www/seat/app/storage +[root@seat seat]# +``` + +SeAT *should* now be available at http://seat.local/seat + +##### Logrotate ##### +SeAT logs a large amount of internals to 3 main log files: + + - `app/storage/logs/laravel.log` + - `app/storage/logs/pheal_access.log` + - `app/storage/logs/pheal_error.log` + +Over time, these logs may explode in size (see [this](https://github.com/eve-seat/seat/issues/216)). While not a requirement for SeAT, it is however recommended that you setup logrotate for the log files. A sample configuration that you can dump into `/etc/logrotate.d/` is: + +```bash +/var/www/seat/app/storage/logs/*.log { + monthly + missingok + rotate 12 + compress + notifempty + create 750 apache apache +} +``` + +Ensure the path matches where you installed SeAT, and the user `apache apache` matches the user your web server is running as. + + [1]: http://laravel.com/ + [2]: http://www.php.net/ + [3]: http://httpd.apache.org/ + [4]: http://redis.io/ + [5]: http://supervisord.org/ + [6]: http://www.mysql.com/ diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md new file mode 100644 index 00000000..5ccb9895 --- /dev/null +++ b/docs/Troubleshooting.md @@ -0,0 +1,48 @@ +#Troubleshooting SeAT + +This guide aims to provide basic troubleshooting tips for SeAT for common problems. At any point if you are unsure or want more help feel free to join the `#wcs-pub` IRC channel on coldfront.net where there is normally someone around to help you out. + +Table of Contents + +* [How to clear the cache and trigger an update](#clearcache) +* [Where are the logs stored](#logs) +* [I'm not receiving e-mails](#emails) + + +##How to clear the cache and trigger an update + +If you believe there might be an issue with the cache, particularly when API keys seem to be having issues, clearing the cache is a safe troubleshooting method which can go a long way in diagnosing or even fixing the problem. + +To clear the cache navigate to the directory you installed SeAT in (likely `/var/www/seat`) and run the following command: + +```bash +$ php artisan seat:clear-cache +``` + +You can then wait for SeAT to update the API keys, or you can trigger an update with the following command: + +```bash +$ php artisan seat:api-update +``` + + +##Where are the logs stored + +SeAT logs lots of things, making the logs extremely useful for troubleshooting. The logs are stored in the following directory inside your SeAT install: + +``` +/app/storage/logs +``` + +There are three logs: +* laravel.log - Contains SeATs logs, including any issues with the application etc... This is the most important one and where you will most likely find anything related to your issue +* pheal_access.log & pheal_error.log - Pheal is the library used to access the EVE API and so these logs contain any issues related to the API + +SeAT rolls (archives) the logs at the end of every month; ensure you are looking at the relevant log. + +If you are unsure what the logs mean, try and find the relevant part of the log and put it in ![Pastebin](http://pastebin.com/) and link this in the IRC channel so we can help you faster! + + +##I'm not receiving e-mails + +If you have installed SeAT, but you are not receiving e-mails the most common culprit is that the e-mail settings are incorrect. Open the `.env.php` file located in the root of your SeAT install and verify your e-mail settings are correct. It is important to check what mail driver you are using (detailed in the install docs). diff --git a/public/assets/css/app.css b/public/assets/css/app.css index dfd49e60..3d2e2986 100755 --- a/public/assets/css/app.css +++ b/public/assets/css/app.css @@ -144,6 +144,34 @@ h6, img { max-width: 100%important; } +img.eveIcon { + +} +img.eveIcon.small { + margin-top: -3px; + width:16px; + height:16px; +} +img.eveIcon.medium { + margin-top: -3px; + width:32px; + height:32px; +} +img.eveIcon.large { + margin-top: -3px; + width:64px; + height:64px; +} +img.eveIcon.xlarge { + margin-top: -3px; + width:128px; + height:128px; +} +img.eveIcon.xxlarge { + margin-top: -3px; + width:256px; + height:256px; +} .sort-highlight { background: #f4f4f4; border: 1px dashed #ddd; @@ -559,10 +587,6 @@ body > .header .logo .icon { .user-panel:after { clear: both; } -.user-panel > .image > img { - width: 45px; - height: 45px; -} .user-panel > .info { font-weight: 600; padding: 5px 5px 5px 15px; diff --git a/public/assets/img/bg.png b/public/assets/img/bg.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/public/assets/img/bg.png differ diff --git a/public/assets/img/eveboard.png b/public/assets/img/eveboard.png new file mode 100644 index 00000000..76979298 Binary files /dev/null and b/public/assets/img/eveboard.png differ diff --git a/public/assets/img/evegate.png b/public/assets/img/evegate.png new file mode 100644 index 00000000..67da85e9 Binary files /dev/null and b/public/assets/img/evegate.png differ diff --git a/public/assets/img/evekill.png b/public/assets/img/evekill.png new file mode 100644 index 00000000..ebaeaea1 Binary files /dev/null and b/public/assets/img/evekill.png differ diff --git a/public/assets/img/evesearch.png b/public/assets/img/evesearch.png new file mode 100644 index 00000000..4e04a18e Binary files /dev/null and b/public/assets/img/evesearch.png differ diff --git a/public/assets/img/evewho.png b/public/assets/img/evewho.png new file mode 100644 index 00000000..5d68fe08 Binary files /dev/null and b/public/assets/img/evewho.png differ diff --git a/public/assets/img/zkillboard.png b/public/assets/img/zkillboard.png new file mode 100644 index 00000000..ac4e1e26 Binary files /dev/null and b/public/assets/img/zkillboard.png differ diff --git a/public/assets/js/app.js b/public/assets/js/app.js index 39f35bad..6ae5f716 100755 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -306,6 +306,19 @@ function performSearch(q) { } } +/** + * Lazy Load magic bootstrap + * @param content + */ +function setupLazyLoader(content) { + if (typeof content != 'undefined') { + $("img.img-lazy-load:not(.img-unveiled,:hidden)", content).unveil(); + } + else { + $("img.img-lazy-load:not(.img-unveiled,:hidden)").unveil(); + } +} + // Prevent the search form from being submitted $("form#sidebar-form").submit(function(e) { e.preventDefault(); diff --git a/public/assets/js/jquery.unveil.js b/public/assets/js/jquery.unveil.js new file mode 100644 index 00000000..17b0fbea --- /dev/null +++ b/public/assets/js/jquery.unveil.js @@ -0,0 +1,60 @@ +/** + * jQuery Unveil + * A very lightweight jQuery plugin to lazy load images + * http://luis-almeida.github.com/unveil + * + * Licensed under the MIT license. + * Copyright 2013 Luís Almeida + * https://github.com/luis-almeida + */ + +;(function($) { + + $.fn.unveil = function(threshold, callback) { + + var $w = $(window), + th = threshold || 0, + retina = window.devicePixelRatio > 1, + attrib = retina? "data-src-retina" : "data-src", + images = this, + loadedClassName = "img-unveiled", + removedClassName = "img-lazy-load", + loaded; + + this.one("unveil", function() { + var source = this.getAttribute(attrib); + source = source || this.getAttribute("data-src"); + if (source) { + $(this).addClass(loadedClassName).removeClass(removedClassName).attr("src", source); + if (typeof callback === "function") callback.call(this); + } + }); + + function unveil() { + + var inview = images.filter(function() { + var $e = $(this); + if ($e.is(":hidden") || $e.hasClass(loadedClassName)) return; + + var wt = $w.scrollTop(), + wb = wt + $w.height(), + et = $e.offset().top, + eb = et + $e.height(); + + return eb >= wt - th && et <= wb + th; + }); + + loaded = inview.trigger("unveil"); + images = images.not(loaded); + images.removeClass(removedClassName); + } + + $w.on("scroll.unveil resize.unveil lookup.unveil", unveil); + + unveil(); + + return this; + + }; + +})(window.jQuery || window.Zepto);