]> BookStack Code Mirror - bookstack/commitdiff
Applied required changes
authorNilesh Deepak <redacted>
Wed, 5 Jul 2017 06:56:02 +0000 (12:26 +0530)
committerNilesh Deepak <redacted>
Wed, 5 Jul 2017 06:56:02 +0000 (12:26 +0530)
1  2 
app/Http/Controllers/BookController.php
app/User.php
database/migrations/2014_10_12_000000_create_users_table.php
database/migrations/2015_07_12_114933_create_books_table.php
resources/assets/sass/styles.scss

index 9c1154281be3f47b01ed10ab8efbd73c5db2daee,4ed945944364bc70bf21230b5cc9d806f2d61839..7aa434a805c6393cf2e93cf44dcb53fd4c042b6c
@@@ -39,9 -39,10 +39,9 @@@ class BookController extends Controlle
          $books = $this->entityRepo->getAllPaginated('book', 16);
          $recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false;
          $popular = $this->entityRepo->getPopular('book', 3, 0);
 -        $display = $this->currentUser->display;
 +        $books_display = $this->currentUser->books_display;
          $this->setPageTitle('Books');
-         return view('books/index', ['books' => $books, 'recents' => $recents, 'popular' => $popular, 'books_display' => $books_display]);
 -
 -        return view('books/index', ['books' => $books, 'recents' => $recents, 'popular' => $popular, 'display' => $display]); //added displaly to access user display
++        return view('books/index', ['books' => $books, 'recents' => $recents, 'popular' => $popular, 'books_display' => $books_display] );
      }
  
      /**
diff --cc app/User.php
index 24eca12f31c2f5d9d665830b7089c88fa6076b27,3d77cd8ee009cfe0f4a57d27779f3b52fa4b4b75..703322cbd269c5dfb80fcf164e5900f10be60d6d
@@@ -22,7 -22,7 +22,7 @@@ class User extends Model implements Aut
       * The attributes that are mass assignable.
       * @var array
       */
-     protected $fillable = ['name', 'email', 'image_id', 'books_display'];
 -    protected $fillable = ['name', 'email', 'image_id', 'display']; //to write in user database 
++    protected $fillable = ['name', 'email', 'image_id', 'books_display' ];
  
      /**
       * The attributes excluded from the model's JSON form.
index 62ac94b606d91605c50b70a1d8b8b768335aebca,17e71de5f99d933aaafb7d6996cb337203a468da..ce605b7cd495100c4ffa862fc5ad03a6fc6c3789
@@@ -17,8 -17,7 +17,8 @@@ class CreateUsersTable extends Migratio
              $table->string('name');
              $table->string('email')->unique();
              $table->string('password', 60);
-             $table->rememberToken();
 +            $table->string('books_display')->default('grid');
+             $table->rememberToken();
              $table->nullableTimestamps();
          });
  
index b8a6c9829f43e9d30c9f3cc7bd1983fee793d6f9,4220809d56e5145e1be711392f618e066de59d9c..b87b99db22293331f8a9dc815d9aed02ff565acc
@@@ -23,8 -23,7 +23,8 @@@ class CreateBooksTable extends Migratio
              $table->string('name');
              $table->string('slug')->indexed();
              $table->text('description');
-             $table->nullableTimestamps();
 +            $table->string('image');
+             $table->nullableTimestamps();
          });
      }
  
index bfa95fc1e45ff8c842a7e42b2de1826eb525bc61,afb9d531bd4a82ae8b17410083f97e1f6b0ab875..4f9c16efb91e5c11192bf7deb1b2cc1b0733a901
@@@ -276,28 -276,3 +276,54 @@@ $btt-size: 40px
  
  
  
++.galleryItem {
++  width: 22%;
++  padding: 5px;
++  float: left;
++  height: 330px;
++  margin: 2% 1% 2% 1%;
++  overflow: hidden;
++  border: 1px solid #9e9e9e;
++  h3 {
++    font-size: 1.2em;
++    text-align: center;
++  }
++  p {
++    font-size: 0.8em;
++    text-align: center;
++  }
++  img {
++    height: 192px;
++    width: 120px;
++    margin-top: 5%;
++  }
++  &.collapse {
++    height: 130px;
++  }
++}
++
 +.galleryItem {
 +  width: 22%;
 +  padding: 5px;
 +  float: left;
 +  height: 330px;
 +  margin: 2% 1% 2% 1%;
 +  overflow: hidden;
 +  border: 1px solid #9e9e9e;
 +  h3 {
 +    font-size: 1.2em;
 +    text-align: center;
 +  }
 +  p {
 +    font-size: 0.8em;
 +    text-align: center;
 +  }
 +  img {
 +    height: 192px;
 +    width: 120px;
 +    margin-top: 5%;
 +  }
 +  &.collapse {
 +    height: 130px;
 +  }
 +}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.