Permalink
Browse files

Weekly commit and update

  • Loading branch information...
lklancir committed Jul 19, 2015
1 parent 5b52fe6 commit 67a1a5fdc2acee84763b6ae48e311e8af23c3dfd
Showing with 577 additions and 99 deletions.
  1. BIN .DS_Store
  2. +3 −0 .meteor/packages
  3. +6 −0 .meteor/versions
  4. BIN client/.DS_Store
  5. BIN client/app/.DS_Store
  6. +0 −21 client/app/core/router.js
  7. +0 −19 client/app/core/sezonci.js
  8. +0 −3 client/app/home/home.html
  9. +17 −18 client/app/{core → home}/sezonci.html
  10. +32 −0 client/app/home/sezonci.js
  11. BIN client/app/layouts/.DS_Store
  12. +7 −0 client/app/layouts/createAccount.html
  13. +6 −0 client/app/layouts/employerLayout.html
  14. +6 −0 client/app/layouts/main.html
  15. +19 −0 client/app/navigation/createAccountNav.html
  16. +30 −0 client/app/navigation/employerNav.html
  17. +15 −11 client/app/navigation/{navigation.html → mainNav.html}
  18. +1 −1 client/app/navigation/navigation.js
  19. +21 −0 client/app/users/employee/employee.js
  20. +15 −0 client/app/users/employee/employeeRegistration.html
  21. +9 −0 client/app/users/employer/addJob.html
  22. +6 −2 client/app/users/employer/employer.html
  23. +62 −0 client/app/users/employer/employer.js
  24. +16 −0 client/app/users/employer/employerRegistration.html
  25. +3 −0 client/app/users/employer/myJobs.html
  26. +0 −3 client/app/verification/verification.html
  27. 0 client/app/{info/how_it_works.html → views/howItWorks.html}
  28. +3 −0 client/app/views/login.html
  29. +43 −0 client/app/views/signup.html
  30. +3 −0 client/app/views/verification.html
  31. BIN lib/.DS_Store
  32. +1 −0 lib/collections/employee.js
  33. +1 −0 lib/collections/employer.js
  34. +12 −0 lib/collections/jobs.js
  35. BIN lib/controllers/.DS_Store
  36. +27 −0 lib/controllers/profile.js
  37. +98 −0 lib/routing/router.js
  38. +42 −0 server/methods.js
  39. +41 −0 server/publications.js
  40. +29 −18 server/server.js
  41. +3 −3 server/smtp.js
BIN +0 Bytes (100%) .DS_Store
Binary file not shown.
@@ -12,3 +12,6 @@ iron:router
email
accounts-base
accounts-ui-unstyled
matb33:collection-hooks
houston:admin
sacha:spin
@@ -10,12 +10,15 @@ blaze-tools@1.0.3
boilerplate-generator@1.0.3
callback-hook@1.0.3
check@1.0.5
coffeescript@1.0.6
dburles:mongo-collection-instances@0.2.6
ddp@1.1.0
deps@1.0.7
ejson@1.0.6
email@1.0.6
fastclick@1.0.3
geojson-utils@1.0.3
houston:admin@2.0.3
html-tools@1.0.4
htmljs@1.0.4
http@1.1.0
@@ -34,6 +37,7 @@ launch-screen@1.0.2
livedata@1.0.13
localstorage@1.0.3
logging@1.0.7
matb33:collection-hooks@0.7.13
meteor@1.1.6
meteor-platform@1.2.2
minifiers@1.1.5
@@ -50,13 +54,15 @@ reactive-var@1.0.5
reload@1.1.3
retry@1.0.3
routepolicy@1.0.5
sacha:spin@2.3.1
service-configuration@1.0.4
session@1.1.0
sha@1.0.3
spacebars@1.0.6
spacebars-compiler@1.0.6
srp@1.0.3
templating@1.1.1
tmeasday:paginated-subscription@0.2.4
tracker@1.0.7
ui@1.0.6
underscore@1.0.3
BIN +6 KB client/.DS_Store
Binary file not shown.
Binary file not shown.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -3,14 +3,13 @@
</head>

<body>
{{>navigation}}

<div class="container">

<!-- kontrola izbornika za različite sesije
ili je sesija prazna i daj public stvari
ili je poslodavac ili radnik
-->
{{>index}}

</div>

@@ -20,23 +19,19 @@



<template name="index">
{{#if isInRole 'admin'}}
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Super Secret Section</h3>
</div>
<div class="panel-body">
<p>
For Admins Only
</p>
</div>
<div class="panel-footer">
<template name="home">
{{#if isInRole 'employer'}}
<p>samo test</p>

</div>
</div>
</div>
{{#each jobListings}}
<ul>
<li>{{jobTitle}}</li>
<li>{{jobDescription}}</li>
<li>{{jobCategory}}</li>
<li>{{jobLocation}}</li>
</ul>

{{/each}}
{{/if}}
{{#if isInRole 'view-projects'}}
<div class="col-md-4">
@@ -54,3 +49,7 @@ <h3 class="panel-title">Everyone can see this.</h3>
</div>
{{/if}}
</template>

<template name="job">

</template>
@@ -0,0 +1,32 @@
if (Meteor.isClient) {
Meteor.subscribe("jobs");
Template.home.helpers({
jobListings: function(){
return Jobs.find();
}
});

// Template.Homepage.created = function() {
// if (Accounts._verifyEmailToken) {
// Accounts.verifyEmail(Accounts._verifyEmailToken, function(err) {
// if (err != null) {
// if (err.message = 'Verify email link expired [403]') {
// console.log('Sorry this verification link has expired.')
// }
// } else {
// console.log('Thank you! Your email address has been confirmed.')
//
// }
// });
// }
// };









}
Binary file not shown.
@@ -0,0 +1,7 @@
<template name="createAccount">
{{>createAccountNav}}

{{>yield}}


</template>
@@ -0,0 +1,6 @@
<template name="employerLayout">
{{>employerNav}}
{{>yield}}
<hr />
<p>OVO JE EMPLOYER SEKCIJA FOOTER</p>
</template>
@@ -0,0 +1,6 @@
<template name="main">
{{>mainNav}}
{{>yield}}
<hr />
<p>Copyright &copy; Siginum, 2014-2015.</p>
</template>
@@ -0,0 +1,19 @@
<template name="createAccountNav">
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header nav-">
<a class="navbar-brand" href="/">Sezonci</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar">
<!-- <ul class="nav navbar-nav">
<li class="active"><a href="{{ pathFor 'home' }}">Sezonci</a></li>
</ul> -->
<ul class="nav navbar-nav navbar-right">
<li>{{>loginButtons}}</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</template>
@@ -0,0 +1,30 @@
<template name="employerNav">
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{pathFor 'home'}}">Sezonci</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav">
<li class="active"><a href="{{pathFor 'employerProfile'}}">PROFIL</a></li>
<li><a href="{{pathFor 'addJob'}}">DODAJ POSAO</a></li>
<li><a href="{{pathFor 'myJobs'}}">MOJI POSLOVI</a></li>

</ul>

<ul class="nav navbar-nav navbar-right">
<li><a href="#"></a></li>

</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</template>
@@ -1,4 +1,4 @@
<template name="navigation">
<template name="mainNav">

<!-- TU TREBA čekirati dal je session up and running i puknuti drugačiju navigaciju?
tj. orijentirati se prema session, kad nije logiran ima to, kad je logiran nekaj drugi etc...
@@ -9,12 +9,6 @@
<div class="container-fluid">

<div class="navbar-header nav-">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Sezonci</a>
</div>

@@ -59,15 +53,25 @@

{{/if}}

<li><a href="{{pathFor route='employer'}}">Poslodavci</a></li>
<li><a href="{{pathFor route='employee'}}">Posloprimci</a></li>

<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Vrste poslova <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">TEST1</a></li>
<li><a href="#">TEST2</a></li>
<li class="divider"></li>
</ul>
</li>

<li><a href="{{pathFor route='howItWorks'}}">Kako radi</a></li>
<li><a href="{{pathFor route='employerProfile'}}">EMPLOYER LINK</a></li>

</ul>

<ul class="nav navbar-nav navbar-right">
<li><a href="#"></a>{{>loginButtons}}</li>
<li><a href="#" class="btn btn-default">Zaposli se!</a></li>
<li><a href="{{pathFor 'login'}}" class="btn btn-default">Login</a></li>
<li><a href="{{pathFor 'signup'}}" class="btn btn-default">Registracija</a></li>
<li><a href="{{pathFor 'employeeRegistration'}}" class="btn btn-default">Zaposli se!</a></li>
</ul>

</div><!-- /.navbar-collapse -->
@@ -1,5 +1,5 @@
if (Meteor.isClient) {
Template.navigation.events({
Template.mainNav.events({
"click .navigation_search": function (event) {
// This function is called when navigation search is changed (quicksearch)
// classes used: .navigation_search, .ns_selected, .ns_text
@@ -0,0 +1,21 @@
Template.employeeRegistration.events({
'submit form': function(event){
event.preventDefault();
var name = $('[name=name]').val();
var surname = $('[name=surname]').val();
var email = $('[name=email]').val();
var password = $('[name=password]').val();

var options = {
email:email,
password:password,
profile: {
name:name,
surname: surname,
type:'2'
}
};
var userId = Accounts.createUser(options);
Router.go('verification');
}
});
@@ -0,0 +1,15 @@
<template name="employeeRegistration">

{{#if currentUser}}
<p>GLE, STARI.... VEĆ SI ULOGIRAN PA NE BUDES SE VALJDA OPET REGISTRIRAL - NISI VALJDA HAXOR NEKi?</p>
{{else}}
<h2>Register</h2>
<form class="register">
<p>Name: <input type="text" name="name"></p>
<p>Surname: <input type="text" name="surname"></p>
<p>Email: <input type="email" name="email"></p>
<p>Password: <input type="password" name="password"></p>
<p><input type="submit" value="Register"></p>
</form>
{{/if}}
</template>
@@ -0,0 +1,9 @@
<template name="addJob">
<form class="addJob">
<p>Naslov: <input type="text" name="jobTitle"></p>
<p>Opis: <input type="text" name="jobDescription"></p>
<p>Kategorija: <input type="text" name="jobCategory"></p>
<p>Lokacija: <input type="text" name="jobLocation"></p>
<p><input type="submit" value="addJob"></p>
</form>
</template>
@@ -1,3 +1,7 @@
<template name="employer">
<h1> EMP MADAFAKA</h1>
<template name="employerProfile">
<h1> Employer</h1>


<h2></h2>
<h2>{{currentUser.profile.name}} {{currentUser.profile.surname}}</h2>
</template>
Oops, something went wrong.

1 comment on commit 67a1a5f

@lklancir

This comment has been minimized.

Copy link
Owner Author

lklancir commented on 67a1a5f Jul 19, 2015

Sitemap:
sitemap

•Following the sitemap, a guest user can now land on the page but does not see anything except the login and registration.
•He can register either as an employer or employee
•He is assigned a role accordingly and according to that can access his dedicated profile
•The employer profile is set up and the employer is able to add a job
•A job listing now appears on the homepage
•For now and user with an employer role can see the job listings so we have to change that to employees also
•Basic routing is set up
•Email verification is set up
•Main mongo collections are setup and they are employers, employees and jobs

Please sign in to comment.