Commit f002bc5e by Junedi

new

parent b942f34a
/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
......
......@@ -33,8 +33,18 @@ class UVotesController extends Controller
public function index1($id){
$types = Type::where('id',$id)->first();
$votes = $types->vote;
$votess =$types->result;
return view('polling.hasil', compact('votes', 'votess'));
$votess =Result::where('no_vote','=','1')->count('id');
$votesss =Result::where('no_vote','=','2')->count('id');
$votes3 =Result::where('no_vote','=','3')->count('id');
$votes4 =Result::where('no_vote','=','4')->count('id');
$votes5 =Result::where('no_vote','=','5')->count('id');
$votes6 =Result::where('no_vote','=','6')->count('id');
return view('polling.hasil', compact('votes', 'votess','votesss','votes3','votes4','votes5','votes6'));
}
......
......@@ -32,8 +32,8 @@
<a href="{{route('seeupload.index')}}">
<img alt="" src="{{URL::asset('admin/img/icon/PA.png')}}"> PA/TA
</a>
</li>
<li><a href="polling">Polling</a></li>
<li><a href="polling"><i class="fa fa-sitemap fa-fw"></i>Polling</a></li>
</ul>
<!-- sidebar menu end-->
......
......@@ -4,21 +4,13 @@
@stop
@section('content')
<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><i class="fa fa-home"></i><a href="{{URL::to('home')}}">Home</a></li>
<li><i class="fa fa-paperclip"></i>Hasil</li>
</ol>
</div>
</div>
<div class="main clearfix">
<div class="contain landing-section">
<h2 class="textCenter">Daftar Kontestan</h2>
<div class="promotion cols cols--tablet">
<div class="col-3">
<br>
<table class="table table-striped">
<tr>
<th>No.</th>
......@@ -27,7 +19,7 @@
<th>Nama</th>
<th>Gambar</th>
<th>Voter</th>
</tr>
<?php $no=1;?>
......@@ -40,34 +32,59 @@
<td>
<img src="{{ asset('img/'.$vote->image) }}" style="height:200px;width:200px;margin-top:10px;">
</td>
@foreach($votess as $vot)
<td> @if(count($vot->id) > 0) {{count($vot->id)}} Vote(s) @else No Vote. Be the first to vote. @endif</td>
</tr>@endforeach
</tr>
@endforeach
</table>
</table><br>
<h2 class="textCenter">Voter Sementara</h2>
<div class="promotion cols cols--tablet">
<div class="col-3"><br><br>
<table class="table table-striped">
<tr>
<th>No.1</th>
<th>No.2</th>
<th>No.3</th>
</tr>
<tr>
<td> @if($votess > 0) {{$votess}} Vote(s) @else No Vote. Be the first to vote. @endif</td>
<td> @if($votesss > 0) {{$votesss}} Vote(s) @else No Vote. Be the first to vote. @endif</td>
<td> @if($votes3 > 0) {{$votes3}} Vote(s) @else 0 Vote(s). @endif</td>
</tr>
</table>
</div>
<br><br><br><br>
<!-- Core Scripts - Include with every page -->
<script src="{{asset('admin/plugins/jquery-1.10.2.js')}}"></script>
<script src="{{asset('admin/plugins/bootstrap/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/plugins/metisMenu/jquery.metisMenu.js')}}"></script>
<script src="{{asset('admin/plugins/pace/pace.js')}}"></script>
<script src="{{asset('admin/scripts/siminta.js')}}"></script>
<!-- Page-Level Plugin Scripts-->
<script src="{{asset('admin/plugins/morris/raphael-2.1.0.min.js')}}"></script>
<script src="{{asset('admin/plugins/morris/morris.js')}}"></script>
<script src="{{asset('admin/scripts/dashboard-demo.js')}}"></script>
</body>
<section class="bg-dark">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p>
&copy; 2016 Bootstrap HTML Template by WowThemes.net
</p>
</div>
</div>
</div>
</section>
</div>
<!-- jQuery -->
<script src="{{asset('layana/js/jquery.js')}}"></script>
<script src="{{asset('layana/js/bootstrap.min.js')}}"></script>
<script src="{{asset('layana/js/parallax.js')}}"></script>
<script src="{{asset('layana/js/contact.js')}}"></script>
<script src="{{asset('layana/js/countto.js')}}"></script>
<script src="{{asset('layana/js/jquery.easing.min.js')}}"></script>
<script src="{{asset('layana/js/wow.min.js')}}"></script>
<script src="{{asset('layana/js/common.js')}}"></script>
</body>
</html>
@endsection
\ No newline at end of file
......@@ -5,15 +5,6 @@
@stop
@section('content')
<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><i class="fa fa-home"></i><a href="{{URL::to('home')}}">Home</a></li>
<li><i class="fa fa-paperclip"></i>Polling</li>
</ol>
</div>
</div>
......@@ -40,7 +31,37 @@
</table>
</div>
<!-- /container -->
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<section class="bg-dark">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
</body>
<p>
&copy; 2016 Bootstrap HTML Template by WowThemes.net
</p>
</div>
</div>
</div>
</section>
<!-- jQuery -->
<script src="{{asset('layana/js/jquery.js')}}"></script>
<script src="{{asset('layana/js/bootstrap.min.js')}}"></script>
<script src="{{asset('layana/js/parallax.js')}}"></script>
<script src="{{asset('layana/js/contact.js')}}"></script>
<script src="{{asset('layana/js/countto.js')}}"></script>
<script src="{{asset('layana/js/jquery.easing.min.js')}}"></script>
<script src="{{asset('layana/js/wow.min.js')}}"></script>
<script src="{{asset('layana/js/common.js')}}"></script>
</body>
</html>
@endsection
\ No newline at end of file
......@@ -3,21 +3,12 @@
@stop
@section('content')
<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><i class="fa fa-home"></i><a href="{{URL::to('home')}}">Home</a></li>
<li><i class="fa fa-paperclip"></i>Vote</li>
</ol>
</div>
</div>
<div class="main clearfix">
<div class="main clearfix">
<div class="contain landing-section">
<h2 class="textCenter">Daftar Kontestan</h2>
<div class="promotion cols cols--tablet">
<div class="col-3">
<br>
<table class="table table-striped">
<tr>
......@@ -27,7 +18,7 @@
<th>Nama</th>
<th>Gambar</th>
<th>Action</th>
<th>Voter</th>
</tr>
<?php $no=1;?>
......@@ -50,7 +41,7 @@
<button class="btn btn-lg btn-primary btn-block" type="submit">Vote</button>
</td>
</form>
<td> @if(count($votess) > 0) {{count($votess)}} Vote(s) @else No Vote. Be the first to vote. @endif</td>
</tr>
@endforeach
......@@ -64,19 +55,31 @@
</div>
<br><br>
<!-- Core Scripts - Include with every page -->
<script src="{{asset('admin/plugins/jquery-1.10.2.js')}}"></script>
<script src="{{asset('admin/plugins/bootstrap/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/plugins/metisMenu/jquery.metisMenu.js')}}"></script>
<script src="{{asset('admin/plugins/pace/pace.js')}}"></script>
<script src="{{asset('admin/scripts/siminta.js')}}"></script>
<!-- Page-Level Plugin Scripts-->
<script src="{{asset('admin/plugins/morris/raphael-2.1.0.min.js')}}"></script>
<script src="{{asset('admin/plugins/morris/morris.js')}}"></script>
<script src="{{asset('admin/scripts/dashboard-demo.js')}}"></script>
</body>
<section class="bg-dark">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
</div>
</div>
</div>
</section>
<!-- jQuery -->
<script src="{{asset('layana/js/jquery.js')}}"></script>
<script src="{{asset('layana/js/bootstrap.min.js')}}"></script>
<script src="{{asset('layana/js/parallax.js')}}"></script>
<script src="{{asset('layana/js/contact.js')}}"></script>
<script src="{{asset('layana/js/countto.js')}}"></script>
<script src="{{asset('layana/js/jquery.easing.min.js')}}"></script>
<script src="{{asset('layana/js/wow.min.js')}}"></script>
<script src="{{asset('layana/js/common.js')}}"></script>
</body>
</html>
@endsection
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Vote </title>
<!-- Core CSS - Include with every page -->
<link href="{{asset('admin/plugins/bootstrap/bootstrap.css')}}" rel="stylesheet" />
<link href="{{asset('admin/font-awesome/css/font-awesome.css')}}" rel="stylesheet" />
<link href="{{asset('admin/plugins/pace/pace-theme-big-counter.css')}}" rel="stylesheet" />
<link href="{{asset('admin/css/style.css')}}" rel="stylesheet" />
<link href="{{asset('admin/css/main-style.css')}}" rel="stylesheet" />
<!-- Page-Level CSS -->
<link href="{{asset('admin/plugins/morris/morris-0.4.3.min.css')}}"" rel="stylesheet" />
</head>
<body>
<!-- wrapper -->
<div id="wrapper">
<!-- navbar top -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" id="navbar">
<!-- navbar-header -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- end navbar-header -->
<!-- navbar-top-links -->
<ul class="nav navbar-top-links navbar-right">
<!-- main dropdown -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-user fa-3x"></i>
</a>
<!-- dropdown user-->
<ul class="dropdown-menu dropdown-user">
<li><a href="#"><i class="fa fa-user fa-fw"></i>User Profile</a>
</li>
<li><a href="#"><i class="fa fa-gear fa-fw"></i>Settings</a>
</li>
<li class="divider"></li>
<li><a href="logout"><i class="fa fa-sign-out fa-fw"></i>Logout</a>
</li>
</ul>
<!-- end dropdown-user -->
</li>
<!-- end main dropdown -->
</ul>
<!-- end navbar-top-links -->
</nav>
<!-- end navbar top -->
z
<!-- navbar side -->
<nav class="navbar-default navbar-static-side" role="navigation">
<!-- sidebar-collapse -->
<div class="sidebar-collapse">
<!-- side-menu -->
<ul class="nav" id="side-menu">
<li>
<!-- user image section-->
<div class="user-section">
<div class="user-section-inner">
<img src="admin/img/user.jpg" alt="">
</div>
<div class="user-info">
<div><strong>Administrator</strong></div>
<div class="user-text-online">
<span class="user-circle-online btn btn-success btn-circle "></span>&nbsp;Online
</div>
</div>
</div>
<!--end user image section-->
</li>
<li class="selected">
<a href="halamanAdmin"><i class="fa fa-dashboard fa-fw"></i>Admin Dashboard</a>
</li>
<li>
<a href="register"><i class="fa fa-edit fa-fw"></i>Create New User</a>
</li>
<li>
<a href=""><i class="fa fa-sitemap fa-fw"></i>Create New Polling</a>
</li>
<li>
<a href="#"><i class="fa fa-wrench fa-fw"></i>UI Elements<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="panels-wells.html">Panels and Wells</a>
</li>
<li>
<a href="buttons.html">Buttons</a>
</li>
<li>
<a href="notifications.html">Notifications</a>
</li>
<li>
<a href="typography.html">Typography</a>
</li>
<li>
<a href="grid.html">Grid</a>
</li>
</ul>
<!-- second-level-items -->
</li>
<li>
<a href="#"><i class="fa fa-sitemap fa-fw"></i>Multi-Level Dropdown<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="#">Second Level Item</a>
</li>
<li>
<a href="#">Second Level Item</a>
</li>
<li>
<a href="#">Third Level <span class="fa arrow"></span></a>
<ul class="nav nav-third-level">
<li>
<a href="#">Third Level Item</a>
</li>
<li>
<a href="#">Third Level Item</a>
</li>
<li>
<a href="#">Third Level Item</a>
</li>
<li>
<a href="#">Third Level Item</a>
</li>
</ul>
<!-- third-level-items -->
</li>
</ul>
<!-- second-level-items -->
</li>
<li>
<a href="#"><i class="fa fa-files-o fa-fw"></i>Sample Pages<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="blank.html">Blank Page</a>
</li>
<li>
<a href="login.html">Login Page</a>
</li>
</ul>
<!-- second-level-items -->
</li>
</ul>
<!-- end side-menu -->
</div>
<!-- end sidebar-collapse -->
</nav>
<!-- end navbar side -->
<!-- page-wrapper -->
<br>
<div id="page-wrapper">
<div class="main clearfix">
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Vote </title>
<!-- Core CSS - Include with every page -->
<link href="{{asset('admin/plugins/bootstrap/bootstrap.css')}}" rel="stylesheet" />
<link href="{{asset('admin/font-awesome/css/font-awesome.css')}}" rel="stylesheet" />
<link href="{{asset('admin/plugins/pace/pace-theme-big-counter.css')}}" rel="stylesheet" />
<link href="{{asset('admin/css/style.css')}}" rel="stylesheet" />
<link href="{{asset('admin/css/main-style.css')}}" rel="stylesheet" />
<!-- Page-Level CSS -->
<link href="{{asset('admin/plugins/morris/morris-0.4.3.min.css')}}"" rel="stylesheet" />
</head>
<body>
<!-- wrapper -->
<div id="wrapper">
<!-- navbar top -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" id="navbar">
<!-- navbar-header -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="row">
<div class="col-md-12">
<h1>Mengubah Data Vote</h1>
</div>
</div>
</div>
<!-- end navbar-header -->
<!-- navbar-top-links -->
<ul class="nav navbar-top-links navbar-right">
<!-- main dropdown -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-user fa-3x"></i>
</a>
<!-- dropdown user-->
<ul class="dropdown-menu dropdown-user">
<li><a href="#"><i class="fa fa-user fa-fw"></i>User Profile</a>
</li>
<li><a href="#"><i class="fa fa-gear fa-fw"></i>Settings</a>
</li>
<li class="divider"></li>
<li><a href="logout"><i class="fa fa-sign-out fa-fw"></i>Logout</a>
</li>
</ul>
<!-- end dropdown-user -->
</li>
<!-- end main dropdown -->
</ul>
<!-- end navbar-top-links -->
</nav>
<!-- end navbar top -->
z
<!-- navbar side -->
<nav class="navbar-default navbar-static-side" role="navigation">
<!-- sidebar-collapse -->
<div class="sidebar-collapse">
<!-- side-menu -->
<ul class="nav" id="side-menu">
<li>
<!-- user image section-->
<div class="user-section">
<div class="user-section-inner">
<img src="admin/img/user.jpg" alt="">
</div>
<div class="user-info">
<div><strong>Administrator</strong></div>
<div class="user-text-online">
<span class="user-circle-online btn btn-success btn-circle "></span>&nbsp;Online
</div>
</div>
</div>
<!--end user image section-->
</li>
<li class="selected">
<a href="halamanAdmin"><i class="fa fa-dashboard fa-fw"></i>Admin Dashboard</a>
</li>
<li>
<a href="register"><i class="fa fa-edit fa-fw"></i>Create New User</a>
</li>
<li>
<a href="votes"><i class="fa fa-sitemap fa-fw"></i>Create New Polling</a>
</li>
<li>
<a href="#"><i class="fa fa-wrench fa-fw"></i>UI Elements<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="panels-wells.html">Panels and Wells</a>
</li>
<li>
<a href="buttons.html">Buttons</a>
</li>
<li>
<a href="notifications.html">Notifications</a>
</li>
<li>
<a href="typography.html">Typography</a>
</li>
<li>
<a href="grid.html">Grid</a>
</li>
</ul>
<!-- second-level-items -->
</li>
<li>
<a href="#"><i class="fa fa-sitemap fa-fw"></i>Multi-Level Dropdown<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="#">Second Level Item</a>
</li>
<li>
<a href="#">Second Level Item</a>
</li>
<li>
<a href="#">Third Level <span class="fa arrow"></span></a>
<ul class="nav nav-third-level">
<li>
<a href="#">Third Level Item</a>
</li>
<li>
<a href="#">Third Level Item</a>
</li>
<li>
<a href="#">Third Level Item</a>
</li>
<li>
<a href="#">Third Level Item</a>
</li>
</ul>
<!-- third-level-items -->
</li>
</ul>
<!-- second-level-items -->
</li>
<li>
<a href="#"><i class="fa fa-files-o fa-fw"></i>Sample Pages<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="blank.html">Blank Page</a>
</li>
<li>
<a href="login.html">Login Page</a>
</li>
</ul>
<!-- second-level-items -->
</li>
</ul>
<!-- end side-menu -->
</div>
<!-- end sidebar-collapse -->
</nav>
<!-- end navbar side -->
<!-- page-wrapper -->
<br>
<div id="page-wrapper">
<div class="main clearfix">
<div class="contain landing-section">
<h2 class="textCenter">Edit Data Vote</h2>
<div class="promotion cols cols--tablet">
<div class="col-3">
<form class="" action="{{route('types.update',$type->id)}}" method="post">
<input name="_method" type="hidden" value="PATCH">
{{csrf_field()}}
......@@ -20,3 +182,16 @@
<input type="submit" class="btn btn-primary" value="save">
</div>
</form>
<script src="{{asset('admin/plugins/jquery-1.10.2.js')}}"></script>
<script src="{{asset('admin/plugins/bootstrap/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/plugins/metisMenu/jquery.metisMenu.js')}}"></script>
<script src="{{asset('admin/plugins/pace/pace.js')}}"></script>
<script src="{{asset('admin/scripts/siminta.js')}}"></script>
<!-- Page-Level Plugin Scripts-->
<script src="{{asset('admin/plugins/morris/raphael-2.1.0.min.js')}}"></script>
<script src="{{asset('admin/plugins/morris/morris.js')}}"></script>
<script src="{{asset('admin/scripts/dashboard-demo.js')}}"></script>
</body>
</html>
@extends('layouts.master')
@section('breadcrump')
@stop
@section('content')
<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><i class="fa fa-home"></i><a href="{{URL::to('home')}}">Home</a></li>
<li><i class="fa fa-paperclip"></i>Daftar Vote</li>
</ol>
</div>
</div>
<div id="page-wrapper">
<div class="main clearfix">
<div class="contain landing-section">
......@@ -26,6 +13,7 @@
<th>Nama Vote</th>
<th>Action</th>
</tr>
<a href="{{route('kandidat.index')}}" class="btn btn-info">Kandidat</a>
<a href="{{ route('types.create') }}" class="btn btn-info pull-right">Tambah Data type</a>
@foreach($types as $type)
......@@ -38,8 +26,7 @@
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<a href="{{route('types.edit',$type->id)}}" class="btn btn-primary">Edit</a>
<input type="submit" class="btn btn-danger" onclick="return confirm('are you sure to delete?')" name="name" value="delete">
<a href="{{route('types.edit',$type->id)}}" class="btn btn-primary">Hasil</a>
</form>
</td>
</tr>
......@@ -60,4 +47,3 @@
</body>
</html>
@endsection
\ No newline at end of file
<div id="page-wrapper">
<div class="main clearfix">
<div class="contain landing-section">
......
<div class="row">
<div class="col-md-12">
<h1>Mengubah Data Kontestan Polling</h1>
</div>
</div>
<div id="page-wrapper">
<div class="main clearfix">
<div class="contain landing-section">
<h2 class="textCenter">Edit Data Kandidat</h2>
<div class="promotion cols cols--tablet">
<form class="" action="{{route('votes.update',$vote->no_vote)}}" method="post">
<input name="_method" type="hidden" value="PATCH">
{{csrf_field()}}
......
......@@ -3,17 +3,6 @@
@stop
@section('content')
<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><i class="fa fa-home"></i><a href="{{URL::to('home')}}">Home</a></li>
<li><i class="fa fa-paperclip"></i>Create New File </li>
</ol>
</div>
</div>
<div id="page-wrapper">
<div class="main clearfix">
<div class="contain landing-section">
......@@ -29,7 +18,7 @@
<th>Gambar</th>
<th>Action</th>
</tr>
<a href="{{route('votes.create')}}" class="btn btn-info pull-right">Tambah Kontestan</a>
<a href="{{route('kandidat.create')}}" class="btn btn-info pull-right">Tambah Kontestan</a>
<a href="{{route('types.index')}}" class="btn btn-info">Type Vote</a>
<?php $no=1;?>
@foreach($vote as $votes)
......@@ -43,10 +32,10 @@
<td><img src="{{ asset('img/'.$votes->image) }}" style="height:200px;width:200px;margin-top:10px;">
</td>
<td>
<form class="" action="{{route('votes.destroy',$votes->no_vote)}}" method="post">
<form class="" action="{{route('kandidat.destroy',$votes->no_vote)}}" method="post">
<input type="hidden" name="_method" value="delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<a href="{{route('votes.edit',$votes->no_vote)}}" class="btn btn-primary">Edit</a>
<a href="{{route('kandidat.edit',$votes->no_vote)}}" class="btn btn-primary">Edit</a>
<input type="submit" class="btn btn-danger" onclick="return confirm('are you sure to delete?')" name="name" value="delete">
......
......@@ -152,6 +152,16 @@ Route::group(['middleware'=> ['web']],function (){
Route::group(['middleware'=> ['web']],function (){
Route::resource('/votes','VotesController');
//vote
Route::group(['middleware'=> ['web']],function (){
Route::resource('/votes','TypeController');
});
Route::group(['middleware'=> ['web']],function (){
Route::resource('/kandidat','VotesController');
});
});
Route::group(['middleware'=> ['web']],function (){
Route::post('/voting','ResultController@voting');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment