From 596856aa789bce907e4af9739a9155efd5b0aa8a Mon Sep 17 00:00:00 2001 From: andela-sachungo Date: Wed, 20 Jan 2016 16:28:59 +0300 Subject: [PATCH 1/8] (fix) Fixing the README Add a link to the latest CircleCI build and StyleCI analysis,as well as a link to the hosted site on Heroku. --- .../Controllers/Auth/SocialAuthController.php | 2 +- app/Http/Flash.php | 2 +- public/css/soma.css | 0 public/js/soma.js | 0 readme.md | 22 +++---- resources/views/about/about.blade.php | 11 +--- resources/views/categories/own.blade.php | 63 ++++++++----------- 7 files changed, 40 insertions(+), 60 deletions(-) create mode 100644 public/css/soma.css create mode 100644 public/js/soma.js diff --git a/app/Http/Controllers/Auth/SocialAuthController.php b/app/Http/Controllers/Auth/SocialAuthController.php index 0933332..cd1e733 100644 --- a/app/Http/Controllers/Auth/SocialAuthController.php +++ b/app/Http/Controllers/Auth/SocialAuthController.php @@ -58,7 +58,7 @@ private function findOrCreateUser($socialUser) return User::create([ 'name' => $socialUser->getName(), 'email' => $socialUser->getEmail(), - 'provider_id' => $socialUser->getAvatar(), + 'provider_id' => $socialUser->getId(), 'avatar' => $socialUser->getAvatar(), ]); } diff --git a/app/Http/Flash.php b/app/Http/Flash.php index a30d085..8861b7a 100644 --- a/app/Http/Flash.php +++ b/app/Http/Flash.php @@ -7,6 +7,7 @@ class Flash /** * Create a flash message. * + * Flash is HTTP specific hence no need to inject the Session::store() * @param string $title * @param string $message * @param string $key @@ -14,7 +15,6 @@ class Flash */ public function createFlash($title, $message, $type, $key = 'flash_message') { - // Flash is HTTP specific hence no need to inject the Session::store() session()->flash($key, [ 'title' => $title, 'message' => $message, diff --git a/public/css/soma.css b/public/css/soma.css new file mode 100644 index 0000000..e69de29 diff --git a/public/js/soma.js b/public/js/soma.js new file mode 100644 index 0000000..e69de29 diff --git a/readme.md b/readme.md index fa377f9..c7ef834 100644 --- a/readme.md +++ b/readme.md @@ -1,27 +1,27 @@ # soma-tech -![CircleCI Badge](https://circleci.com/gh/andela-sachungo/soma-tech.svg?style=shield&circle-token=eab6015ece8c084d689495dcbbf2bd5bd22c50cb) +[![CircleCI Badge](https://circleci.com/gh/andela-sachungo/soma-tech.svg?style=shield&circle-token=eab6015ece8c084d689495dcbbf2bd5bd22c50cb)](https://circleci.com/gh/andela-sachungo/soma-tech/69) [![Coverage Status](https://coveralls.io/repos/andela-sachungo/soma-tech/badge.svg?branch=master&service=github)](https://coveralls.io/github/andela-sachungo/soma-tech?branch=master) -![StyleCI Badge](https://styleci.io/repos/48097337/shield) +[![StyleCI Badge](https://styleci.io/repos/48097337/shield)](https://styleci.io/repos/48097337) -Soma-tech is a learning management system that helps people learn various technologies. - -**NOTE:** It is highly recommended that you use [Homestead virtual machine](http://laravel.com/docs/5.1/homestead). +Soma-tech is a learning management system that helps people learn various technologies. You can upload YouTube videos by category, edit and delete them. You have to log in first before uploading or changing a video from your dashboard. To view the project and play with it, [visit this page](http://soma-tech.herokuapp.com/). ##Installation instructions * Clone the repository `git clone ` * Run `composer install` * Rename `.env.example` to `.env` -* Run `php artisan key:generate` to generate the *application key* +* Run `php artisan key:generate` to generate the *application key*. + +**NOTE:** It is highly recommended that you use [Homestead virtual machine](http://laravel.com/docs/5.1/homestead). ##Defining the site in Homestead -[Laravel](http://laravel.com/docs/5.1/homestead#connecting-via-ssh) explains how to configure **Homestead**. +[Laravel Documentation](http://laravel.com/docs/5.1/homestead#connecting-via-ssh) explains how to configure **Homestead**. In summary: - 1. Identify which folder(s) you want to share with Homestead as - explained in [Configuring Shared Folders](http://laravel.com/docs/5.1/homestead#configuring-homestead). - 2. Map a domain to a folder on your Homestead environment as explained in [Configuring Nginx Sites](http://laravel.com/docs/5.1/homestead#configuring-homestead). - 3. Then add the domain to your Nginx site to the `hosts` file on your machine, as explained in [The Hosts File](http://laravel.com/docs/5.1/homestead#configuring-homestead). + 1. Identify which directory(s) you want to share with Homestead as + explained in [Configuring Shared Folders section](http://laravel.com/docs/5.1/homestead#configuring-homestead). + 2. Map a domain to a directory on your Homestead environment as explained in [Configuring Nginx Sites section](http://laravel.com/docs/5.1/homestead#configuring-homestead). + 3. Then add the domain to your Nginx site to the `hosts` file on your machine, as explained in [the Hosts File section](http://laravel.com/docs/5.1/homestead#configuring-homestead). 4. Run the `vagrant up` command from your Homestead directory. **NOTE:** When your Homestead environment is provisioned and running, to add an additional Nginx site ; add it on `Homestead.yaml` file and then run `vagrant provision`. diff --git a/resources/views/about/about.blade.php b/resources/views/about/about.blade.php index 0f67548..be351f2 100644 --- a/resources/views/about/about.blade.php +++ b/resources/views/about/about.blade.php @@ -1,13 +1,4 @@ - - - - - - - - - -@extends('layouts.master') +≠@extends('layouts.master') @section('title', 'About') diff --git a/resources/views/categories/own.blade.php b/resources/views/categories/own.blade.php index db2f51c..53176df 100644 --- a/resources/views/categories/own.blade.php +++ b/resources/views/categories/own.blade.php @@ -21,9 +21,6 @@ display: table; width: 100%; } - #text-style { - font-style: oblique; - } @endsection @@ -32,44 +29,37 @@ @include('partials.sidebar')
-
+

Categories

- @if ($categories->count() === 0) -
-

You have not yet created a category.
- Click Add Category to create one.

-
- @else - - - @foreach ($categories as $category) - - + @endcan + + @endforeach + +
- - {{ $category->title }} + + + @foreach ($categories as $category) + + + @can('userCategory', $category) + - @can('userCategory', $category) - - @endcan - - @endforeach - -
+ + {{ $category->title }} + + + + - - - - - - {!! Form::open(array('route' => array('category.destroy', $category->id), 'method' => 'delete')) !!} - - {!! Form::close() !!} -
- @endif + + {!! Form::open(array('route' => array('category.destroy', $category->id), 'method' => 'delete')) !!} + + {!! Form::close() !!} +
@include('partials.category_modal')