Skip to content

Commit

Permalink
povezanalista oglasa sa neprimjerenim sadrzajem
Browse files Browse the repository at this point in the history
  • Loading branch information
sumejjah committed May 28, 2017
1 parent 861a7fd commit 9ff3754
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Oglasi.Client/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ app.config(function ($routeProvider) {
});

$routeProvider.when("/advert/with_report", {
controller: "advertReportController",
controller: "advertReportAllController",
templateUrl: "views/advert/advert_with_reports.html"
});

Expand Down
17 changes: 17 additions & 0 deletions Oglasi.Client/app/controllers/advert/advertReportAllController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(function () {
'use strict';
app.controller('advertReportAllController', ['$scope', 'advertService', 'userAccountService', function ($scope, advertService, userAccountService) {


$scope.adverts = [];

advertService.getAdvertsWithReport()
.then(function(response){
$scope.adverts = response.data;
});



}]);

}());
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function () {
'use strict';
app.controller('advertReportController', ['$scope', 'advertService', function ($scope, advertService) {
app.controller('advertReportController', ['$scope', 'advertService', 'userAccountService', function ($scope, advertService, userAccountService) {

// $scope.getTitleOwner = function() {
// advertService.getTitleOwner()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
$location.path('/login');
}


$scope.getDetails = function() {
userAccountService.details()
.then(function(response) {
Expand Down
1 change: 1 addition & 0 deletions Oglasi.Client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<script src="/app/controllers/advert/advertSubscriptionController.js"></script>
<script src="/app/controllers/advert/advertReportController.js"></script>
<script src="/app/controllers/advert/advertReportAllController.js"></script>
<script src="/app/controllers/advert/advertReportDetailsController.js"></script>
<script src="/app/controllers/advert/advertReportOneController.js"></script>

Expand Down
1 change: 1 addition & 0 deletions Oglasi.Client/views/userAccount/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ <h4 class="list-group-item-heading"><b>{{advert.title}}</b></h4>
<li><a href="/#!/advert/details/{{advert.id}}/update">Update</a></li>
<li><a ng-click="deleteAdvert(advert.id)">Delete</a></li>
<li><a href="/#!/advert/{{advert.id}}/subscriptions">Prijave</a></li>
<li><a href="/#!/advert/with_report">Oglasi sa neprimjerenim sadržajem</a></li>
</ul>
</div>
<!-- <button ng-click="location.href=/#!/advert/details/{{advert.advertID}}" > klikni me</button> -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class OglasiApplication {
public static void main(String[] args) {
SpringApplication.run(OglasiApplication.class, args);
}
/*

@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurerAdapter() {
Expand All @@ -29,5 +29,5 @@ public void addCorsMappings(CorsRegistry registry) {
};

}
*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import si.tim1.oglasi.filters.JWTAuthenticationFilter;
import si.tim1.oglasi.filters.JWTLoginFilter;
import si.tim1.oglasi.services.CustomUserDetailsService;
/*

@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled=true)
Expand Down Expand Up @@ -72,4 +72,3 @@ protected void configure(AuthenticationManagerBuilder auth) throws Exception {
}

}
*/

0 comments on commit 9ff3754

Please sign in to comment.