mentors

mentors Commit Details


Date:2014-06-28 20:38:56 (10 years 5 months ago)
Author:Right Or Wrong
Branch:develop
Commit:db9d088609f76c761ede119a5bee62453db94970
Parents: d9d2e5efdd3975b76302ad1ff3f2c1a566dc999d
Message:added more layouts and fixed a few bugs

Changes:

File differences

app/controllers/RemindersController.php
3737
3838
3939
40
40
4141
4242
4343
{
case Password::INVALID_USER:
\Session::flash('message', 'The email you entered does not exist. Try a different email.');
return Redirect::back()->with('error', Lang::get($response));
return Redirect::back()->withInput(\Input::except('password'));
case Password::REMINDER_SENT:
\Session::flash('message', 'Please check your email for instructions on how to reset your password');
app/controllers/UserController.php
163163
164164
165165
166
166
167167
168168
169169
......
197197
198198
199199
200
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
$user->photo = 'images/users/'.$filename;
}
$user_role = UserXrefRole::where('user_id', '=', $user_id)->get();
$user_role = UserXrefRole::find($user_id);
if(count($user_role))
{
return View::make('users.profile')->with('user', $user);
}
}
public function mentors()
{
$mentors = \DB::select(\DB::raw('SELECT * FROM
users, roles, user_xref_role
WHERE users.id = user_xref_role.user_id
AND roles.id = user_xref_role.role_id
AND roles.id = 1'));
return View::make('users.mentors')->with('mentors', $mentors);
}
public function mentees()
{
$mentees = \DB::select(\DB::raw('SELECT * FROM
users, roles, user_xref_role
WHERE users.id = user_xref_role.user_id
AND roles.id = user_xref_role.role_id
AND roles.id = 2'));
return View::make('users.mentees')->with('mentees', $mentees);
}
}
app/routes.php
2929
3030
3131
32
33
3234
3335
3436
Route::post('users/group/complete', array('uses' => 'UserController@saveProfile'));
Route::get('users/{id}', array('as' => 'users', 'uses' => 'UserController@showProfile'));
Route::get('users', array('as' => 'users', 'uses' => 'UserController@index'));
Route::get('mentors', array('as' => 'mentors', 'uses' => 'UserController@mentors'));
Route::get('mentees', array('as' => 'mentees', 'uses' => 'UserController@mentees'));
/**
* User Password Reminder Controller routes
app/views/login.blade.php
4545
4646
4747
48
48
4949
5050
5151
......
8181
8282
8383
84
84
8585
8686
8787
@if(Session::has('message'))
<p class="alert-success">{{ Session::get('message') }}</p>
@endif
<div class="control-group">
{{ Form::label('email', 'Email', array('class' => 'control-label')) }}
<div class="controls">
</div>
<div class="container padded"></div>
<div class="container padded"></div>
<br /><br /><br />
<div id="sub-footer">
<div class="container">
app/views/password/remind.blade.php
5252
5353
5454
55
55
5656
5757
5858
<div class="control-group">
{{ Form::label('email', 'Email', array('class' => 'control-label')) }}
<div class="controls">
{{ Form::text('email', null, array('class' => 'form-control borderd input-large', 'span' => 'span6', 'placeholder' => 'awesome@awesome.com'))}}
{{ Form::text('email', \Input::old('email'), array('class' => 'form-control borderd input-large', 'span' => 'span6', 'placeholder' => 'awesome@awesome.com'))}}
</div>
</div>
app/views/users/create.blade.php
8888
8989
9090
91
9192
9293
9394
<div class="container padded"></div>
<div class="container"></div>
<br />
<div id="sub-footer">
<div class="container">
app/views/users/index.blade.php
22
33
44
5
5
66
77
88
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Laravel PHP Framework</title>
<title>Users - mentconnect inc</title>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
{{HTML::style('css/mentconnect.css')}}
</head>
app/views/users/mentees.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Users - mentconnect inc</title>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
{{HTML::style('css/mentconnect.css')}}
</head>
<body>
<header id="cta" class="background-showcase">
<div id="nv" class="navbar">
<div class="container">
<a class="navbar-brand" href="/">
<div class="asset logo-white-header">
{{ HTML::image("images/mentconnect.png", "editor", array("width" => "130px", "height" => "44px")) }}
</div>
</a>
<ul class=" nav navbar-nav pull-right">
<li class>
{{HTML::link('partners', 'Partners') }}
</li>
<li class>
{{HTML::link('blog', 'Blog') }}
</li>
<li class="button">
{{HTML::link('login', 'Sign In') }}
</li>
</ul>
</div>
</div>
</header>
<div id="main">
<div class="container padded">
<div id="feature-screenshot">
<h2>Let there be mentors and mentees. Let there be learning!</h2>
<p class="center-feature-sub-content">
Most of us will agree that we spent a significant amount of time trying to learn what we have learned so far. The other fact is that most of that time went to waste because we did not know where to look or who to ask questions when we needed it most. So, today we join hands in harmony to eliminate the time wastage and focus on building the best products on the planet and beyond.
</p>
<hr />
</div>
<div class="row">
<div class="col-lg">
<table class="table table-striped table-hover">
<thead>
<tr>
<td><strong>First</strong></td>
<td><strong>Name</strong></td>
<td><strong>Location</strong></td>
<td><strong>Bio</strong></td>
<td><strong>View</strong></td>
</tr>
</thead>
<tbody>
@foreach($mentees as $key => $value)
<tr>
<td>{{ $value->first }}</td>
<td>{{ $value->last }}</td>
<td>{{ $value->location }}</td>
<td>{{ $value->bio }}</td>
<td>
<a class="btn btn-small btn-primary" href="{{ URL::to('users/' . $value->id) }}">View this Nerd</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="container padded"></div>
<br /><br />
<div id="sub-footer">
<div class="container">
<div class="row">
<div class="col-lg-4">
<p id="copyright-section">
Copyright &copy; 2014. All Rights Reserved.
</p>
</div>
<div class="col-lg-4">
{{HTML::image('images/mentconnect.png', "logo", array('width' => '140px', 'height' => '50px'))}}
</div>
<div class="col-lg-4">
<p id="love">
Built With Laravel + Bootstrap Frameworks by Elisha Chirchir.
</p>
</div>
</div>
</div>
</div>
</body>
</html>
app/views/users/mentors.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Users - mentconnect inc</title>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
{{HTML::style('css/mentconnect.css')}}
</head>
<body>
<header id="cta" class="background-showcase">
<div id="nv" class="navbar">
<div class="container">
<a class="navbar-brand" href="/">
<div class="asset logo-white-header">
{{ HTML::image("images/mentconnect.png", "editor", array("width" => "130px", "height" => "44px")) }}
</div>
</a>
<ul class=" nav navbar-nav pull-right">
<li class>
{{HTML::link('mentors', 'Mentors') }}
</li>
<li class>
{{HTML::link('mentees', 'Mentees') }}
</li>
<li class="button">
{{HTML::link('login', 'Sign In') }}
</li>
</ul>
</div>
</div>
</header>
<div id="main">
<div class="container padded">
<div id="feature-screenshot">
<h2>Let there be mentors and mentees. Let there be learning!</h2>
<p class="center-feature-sub-content">
Most of us will agree that we spent a significant amount of time trying to learn what we have learned so far. The other fact is that most of that time went to waste because we did not know where to look or who to ask questions when we needed it most. So, today we join hands in harmony to eliminate the time wastage and focus on building the best products on the planet and beyond.
</p>
<hr />
</div>
<div class="row">
<div class="col-lg">
<table class="table table-striped table-hover">
<thead>
<tr>
<td><strong>First</strong></td>
<td><strong>Name</strong></td>
<td><strong>Location</strong></td>
<td><strong>Bio</strong></td>
<td><strong>View</strong></td>
</tr>
</thead>
<tbody>
@foreach($mentors as $key => $value)
<tr>
<td>{{ $value->first }}</td>
<td>{{ $value->last }}</td>
<td>{{ $value->location }}</td>
<td>{{ $value->bio }}</td>
<td>
<a class="btn btn-small btn-primary" href="{{ URL::to('users/' . $value->id) }}">View this Nerd</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="container padded"></div>
<br /><br />
<div id="sub-footer">
<div class="container">
<div class="row">
<div class="col-lg-4">
<p id="copyright-section">
Copyright &copy; 2014. All Rights Reserved.
</p>
</div>
<div class="col-lg-4">
{{HTML::image('images/mentconnect.png', "logo", array('width' => '140px', 'height' => '50px'))}}
</div>
<div class="col-lg-4">
<p id="love">
Built With Laravel + Bootstrap Frameworks by Elisha Chirchir.
</p>
</div>
</div>
</div>
</div>
</body>
</html>
app/views/users/profile.blade.php
2323
2424
2525
26
26
27
2728
2829
2930
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Mentconnect</a>
{{HTML::link('/', 'Mentconnect', array('class' => 'navbar-brand'))}}
</div>
<!-- Collect the nav links, forms, and other content for toggling -->

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.11986s using 13 queries.