diff --git a/src/main/java/com/health/config/SecurityConfig.java b/src/main/java/com/health/config/SecurityConfig.java index 9d8b80f..6282979 100644 --- a/src/main/java/com/health/config/SecurityConfig.java +++ b/src/main/java/com/health/config/SecurityConfig.java @@ -90,7 +90,7 @@ public static BCryptPasswordEncoder passwordEncoder() { "/addPreRequisticWhenNotRequired/**", "/addPreRequistic/**", "/addVideo/**", "/addSlide/**", "/addScript/**", "/listTutorialForContributorReview/**", "/Contributor/review/**", "/uploadTimescript/**", "/addLiveTutorial", "/updateLiveTutorial", "/addSpokenVideo", "/spokenVideo/edit/**", "/addVideoResource", - "/createPackage", + "/createPackage", "/packageName/edit/**", "/updatePackageName", }; @@ -149,9 +149,9 @@ protected void configure(HttpSecurity http) throws Exception { .antMatchers("/addBrochure/**", "/addCarousel/**", "/addConsultant/**", "/addEvent/**", "/addTestimonial/**", "/addPromoVideo/**", "/addResearchPaper/**", "/brochure/edit/**", "/promoVideo/edit/**", "/carousel/edit/**", "/event/edit/**", "/testimonial/edit/**", - - "/researchPaper/edit/**", "/enableDisableBrouchure/**", "/enableDisableConsultant/**", - "/enableDisableTestimonial/**", "/addCitation/**", "/citation/edit/**") + "/createPackage", "/packageName/edit/**", "/updatePackageName", "/researchPaper/edit/**", + "/enableDisableBrouchure/**", "/enableDisableConsultant/**", "/enableDisableTestimonial/**", + "/addCitation/**", "/citation/edit/**") .hasAnyAuthority("SUPER_USER", "CONTRIBUTOR").antMatchers(PUBLIC_MATCHERS).permitAll().anyRequest() .authenticated().and().exceptionHandling().accessDeniedPage("/access-denied"); diff --git a/src/main/java/com/health/controller/AjaxController.java b/src/main/java/com/health/controller/AjaxController.java index 9caf5b0..04d1ea9 100644 --- a/src/main/java/com/health/controller/AjaxController.java +++ b/src/main/java/com/health/controller/AjaxController.java @@ -589,7 +589,7 @@ private HashMap setResponse(Integer status) { } - @GetMapping("/enableDisablePacakgeAndPackLan") + @GetMapping("/enableDisablePacakgeLanguage") public @ResponseBody boolean enableDisablePacakgeAndPackLan(int packLanId) { PackageLanguage packLan = packLanService.findBypackageLanId(packLanId); @@ -597,38 +597,15 @@ private HashMap setResponse(Integer status) { if (packLan.isStatus()) { packLan.setStatus(false); packLanService.save(packLan); + return true; } else { packLan.setStatus(true); packLanService.save(packLan); + return true; } - PackageContainer packContainer = packLan.getPackageContainer(); - Set packLanList = packContainer.getPackageLanguages(); - - boolean flag = false; - - for (PackageLanguage temp : packLanList) { - if (temp.getPackageLanId() == packLan.getPackageLanId()) { - if (packLan.isStatus()) { - flag = true; - } - } else if (temp.isStatus()) { - flag = true; - } - } - - if (flag) { - packContainer.setStatus(true); - } else { - packContainer.setStatus(false); - } - - packageContainerService.save(packContainer); - - return true; - } catch (Exception e) { logger.error("Error in Enable Disbale PacakgeAndPackLan: {}", packLan, e); @@ -1066,12 +1043,12 @@ private HashMap setResponse(Integer status) { PackageContainer packageContainer = packageContainerService.findByPackageId(packageId); List languages = new ArrayList<>(); if (packageContainer != null) { - languages = packLanService.findAllLanguagesByPackageContainer(packageContainer); + languages = packLanService.findAllEnabledLanguagesByPackageContainer(packageContainer); } if (languages.size() > 0) { for (Language lan : languages) { - logger.info("lan:{}", lan.getLangName()); + langName.put(lan.getLanId(), lan.getLangName()); } diff --git a/src/main/java/com/health/controller/HomeController.java b/src/main/java/com/health/controller/HomeController.java index e6dc284..9e676ab 100644 --- a/src/main/java/com/health/controller/HomeController.java +++ b/src/main/java/com/health/controller/HomeController.java @@ -4477,7 +4477,7 @@ public String createPackageGet(HttpServletRequest req, Principal principal, Mode public String createPackagePost(HttpServletRequest req, Model model, Principal principal, @RequestParam(name = "packageContainerId") int packageContainerId, @RequestParam(name = "packageName") String packageName, @RequestParam(name = "languageId") int languageId, - @RequestParam(name = "tutorialforPackage") int[] tutorialIds, + @RequestParam(name = "tutorialforPackage") Optional tutorialIds, @RequestParam("weekName") List weekIds, @RequestParam(name = "videoName") List videoIds, @RequestParam(name = "title") List titles) { @@ -4531,9 +4531,7 @@ public String createPackagePost(HttpServletRequest req, Model model, Principal p List tutorialWithWeekAndPackages = new ArrayList<>(); try { - logger.info("WeekIds Size:{} ", weekIds.size()); - logger.info("VideoIds Size:{}", videoIds.size()); - logger.info("Title Size:{}", titles.size()); + for (int i = 0; i < weekIds.size(); i++) { if (i < titles.size()) logger.info("Title: {}", titles.get(i)); @@ -4546,6 +4544,7 @@ public String createPackagePost(HttpServletRequest req, Model model, Principal p if (weekTitleVideo == null) { weekTitleVideo = new WeekTitleVideo(titles.get(i), dateAdded, week, video); + weekTitleVideo.setUser(usr); weekTitleVideoService.save(weekTitleVideo); // Save the weekTitle before using it // weekTitles.add(weekTitle); @@ -4564,15 +4563,22 @@ public String createPackagePost(HttpServletRequest req, Model model, Principal p } } - // weekTitleVideoService.saveAll(weekTitles); - // tutorialWithWeekAndPackageService.saveAll(tutorialWithWeekAndPackages); List packLanTutorialResourceList = new ArrayList<>(); - for (int j = 0; j < tutorialIds.length; j++) { - Tutorial tutorial = tutService.findByTutorialId(tutorialIds[j]); - PackLanTutorialResource temp = new PackLanTutorialResource(dateAdded, tutorial, packageLanguage); + if (tutorialIds != null && tutorialIds.isPresent() && tutorialIds.get().length > 0) { + for (int j = 0; j < tutorialIds.get().length; j++) { + Tutorial tutorial = tutService.findByTutorialId(tutorialIds.get()[j]); + List existingTutorials = packLanTutorialResourceService + .findResourcesByTutorialAndPackageLanguage(tutorial, packageLanguage); + + if (existingTutorials == null || existingTutorials.size() < 1) { + PackLanTutorialResource temp = new PackLanTutorialResource(dateAdded, tutorial, + packageLanguage); + + packLanTutorialResourceList.add(temp); + } - packLanTutorialResourceList.add(temp); + } } if (packLanTutorialResourceList.size() > 0) @@ -4590,6 +4596,68 @@ public String createPackagePost(HttpServletRequest req, Model model, Principal p return createPackageGet(req, principal, model); } + @GetMapping("/packageName/edit/{id}") + public String editPackageNameGet(@PathVariable int id, HttpServletRequest req, Model model, Principal principal) { + + User usr = getUser(principal); + logger.info("{} {} {}", usr.getUsername(), req.getMethod(), req.getRequestURI()); + model.addAttribute("userInfo", usr); + + PackageContainer packageContainer = packageContainerService.findByPackageId(id); + + if (packageContainer == null) { + + return "redirect:/createPackage"; + } + + model.addAttribute("packageContainer", packageContainer); + + return "updatePackageName"; + } + + @PostMapping("/updatePackageName") + public String updatePackageNamePost(HttpServletRequest req, Model model, Principal principal) { + + User usr = getUser(principal); + logger.info("{} {} {}", usr.getUsername(), req.getMethod(), req.getRequestURI()); + + model.addAttribute("userInfo", usr); + + String packageId = req.getParameter("packageId"); + String packageName = req.getParameter("packageName"); + + PackageContainer packageContainer = packageContainerService.findByPackageId(Integer.parseInt(packageId)); + + model.addAttribute("packageContainer", packageContainer); + if (packageContainer == null) { + model.addAttribute("error_msg", "Package doesn't exist"); + return "updatePackageName"; + } + + try { + List packagelanguageList = new ArrayList<>(packageContainer.getPackageLanguages()); + for (PackageLanguage temp : packagelanguageList) { + String langName = temp.getLan().getLangName(); + zipCreationThreadService.deleteKeyFromZipNamesAndPackageAndLanZipIfExists( + packageContainer.getPackageName(), langName, env); + } + + packageContainer.setPackageName(packageName); + packageContainerService.save(packageContainer); + + } catch (Exception e) { + + model.addAttribute("error_msg", CommonData.RECORD_ERROR); + model.addAttribute("packageContainer", packageContainer); + return "updatePackageName"; + } + + model.addAttribute("success_msg", CommonData.RECORD_UPDATE_SUCCESS_MSG); + model.addAttribute("packageContainer", packageContainer); + + return "updatePackageName"; + } + /****************************************** * Assign Tutorial on Week And Package End ********************/ @@ -4629,6 +4697,8 @@ public String hstTrainingModules(@RequestParam(name = "week", required = false, weekTitleVideoList.sort(Comparator .comparingInt((WeekTitleVideo wtv) -> ServiceUtility.extractInteger(wtv.getWeek().getWeekName())) .thenComparing(wtv -> wtv.getVideoResource().getLan().getLangName()) + .thenComparing(Comparator.comparing((WeekTitleVideo wtv) -> wtv.getVideoResource().getSessionName(), + Comparator.nullsLast(Comparator.naturalOrder()))) .thenComparing(WeekTitleVideo::getTitle)); model.addAttribute("userInfo", usr); @@ -4669,8 +4739,18 @@ public String hstTrainingModuleView(@PathVariable(name = "weekTitleVideoId") int } - if (relatedweekTitleVideoList != null && relatedweekTitleVideoList.size() > 0) + if (relatedweekTitleVideoList != null && relatedweekTitleVideoList.size() > 0) { + relatedweekTitleVideoList.sort(Comparator + .comparingInt( + (WeekTitleVideo wtv) -> ServiceUtility.extractInteger(wtv.getWeek().getWeekName())) + .thenComparing( + Comparator.comparing((WeekTitleVideo wtv) -> wtv.getVideoResource().getSessionName(), + Comparator.nullsLast(Comparator.naturalOrder()))) + .thenComparing(WeekTitleVideo::getTitle)); + model.addAttribute("relatedweekTitleVideoList", relatedweekTitleVideoList); + } + model.addAttribute("weekTitleVideo", weekTitleVideo); } model.addAttribute("foundVideo", foundVideo); diff --git a/src/main/java/com/health/model/User.java b/src/main/java/com/health/model/User.java index f6cf98e..ea21b3e 100644 --- a/src/main/java/com/health/model/User.java +++ b/src/main/java/com/health/model/User.java @@ -175,6 +175,10 @@ public void setOrgRolev(OrganizationRole orgRolev) { @JsonIgnore private Set spokenvideos = new HashSet(); + @OneToMany(mappedBy = "user", cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JsonIgnore + private Set weekTitleVideos = new HashSet(); + @OneToMany(mappedBy = "user", cascade = CascadeType.ALL, fetch = FetchType.LAZY) @JsonIgnore private Set topics = new HashSet(); @@ -260,6 +264,14 @@ public void setSpokenvideos(Set spokenvideos) { this.spokenvideos = spokenvideos; } + public Set getWeekTitleVideos() { + return weekTitleVideos; + } + + public void setWeekTitleVideos(Set weekTitleVideos) { + this.weekTitleVideos = weekTitleVideos; + } + @Override public String getPassword() { return password; diff --git a/src/main/java/com/health/model/VideoResource.java b/src/main/java/com/health/model/VideoResource.java index 5c24916..2614f46 100644 --- a/src/main/java/com/health/model/VideoResource.java +++ b/src/main/java/com/health/model/VideoResource.java @@ -32,6 +32,9 @@ public class VideoResource implements Serializable { @Column(name = "file_name", nullable = false) private String fileName; + @Column(name = "session_name") + private String SessionName; + @Column(name = "video_path", nullable = false, unique = true) private String videoPath; @@ -84,6 +87,14 @@ public Language getLan() { return lan; } + public String getSessionName() { + return SessionName; + } + + public void setSessionName(String sessionName) { + SessionName = sessionName; + } + public void setLan(Language lan) { this.lan = lan; } diff --git a/src/main/java/com/health/model/WeekTitleVideo.java b/src/main/java/com/health/model/WeekTitleVideo.java index 2669498..c201f43 100644 --- a/src/main/java/com/health/model/WeekTitleVideo.java +++ b/src/main/java/com/health/model/WeekTitleVideo.java @@ -47,6 +47,10 @@ public class WeekTitleVideo implements Serializable { @JoinColumn(name = "week_id", nullable = false) private Week week; + @ManyToOne + @JoinColumn(name = "user_id", nullable = false) + private User user; + @ManyToOne @JoinColumn(name = "video_resource_id", nullable = false) private VideoResource videoResource; @@ -123,6 +127,14 @@ public WeekTitleVideo() { } + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + public Set getTutorialsWithWeekAndPack() { return tutorialsWithWeekAndPack; } diff --git a/src/main/java/com/health/repository/PackLanTutorialResourceRepository.java b/src/main/java/com/health/repository/PackLanTutorialResourceRepository.java index c569383..04161a1 100644 --- a/src/main/java/com/health/repository/PackLanTutorialResourceRepository.java +++ b/src/main/java/com/health/repository/PackLanTutorialResourceRepository.java @@ -21,4 +21,6 @@ PackLanTutorialResource findByPackageLanguageAndTutorial(@Param("packageLanguage @Query("SELECT ptr FROM PackLanTutorialResource ptr WHERE ptr.packageLanguage = :packageLanguage") List findByPackageLanguage(@Param("packageLanguage") PackageLanguage packageLanguage); + List findByTutorialAndPackageLanguage(Tutorial tutorial, PackageLanguage packageLanguage); + } \ No newline at end of file diff --git a/src/main/java/com/health/repository/PackageLanguageRepository.java b/src/main/java/com/health/repository/PackageLanguageRepository.java index 5967c10..e3bc992 100644 --- a/src/main/java/com/health/repository/PackageLanguageRepository.java +++ b/src/main/java/com/health/repository/PackageLanguageRepository.java @@ -24,9 +24,13 @@ PackageLanguage findByPackageContainerAndLan(@Param("packageContainer") PackageC @Query("SELECT DISTINCT pl.packageContainer FROM PackageLanguage pl") List findAllDistinctPackageContainers(); - @Query("SELECT DISTINCT pl.packageContainer FROM PackageLanguage pl where pl.packageContainer.status=:value") + @Query("SELECT DISTINCT pl.packageContainer FROM PackageLanguage pl where pl.status=:value") List findAllDistinctPackageContainersByStatus(boolean value); + @Query("SELECT pl.lan FROM PackageLanguage pl WHERE pl.packageContainer = :packageContainer AND pl.status = true") + List findAllEnabledLanguagesByPackageContainer( + @Param("packageContainer") PackageContainer packageContainer); + List findAllByStatus(boolean value); } diff --git a/src/main/java/com/health/service/PackLanTutorialResourceService.java b/src/main/java/com/health/service/PackLanTutorialResourceService.java index 23c6975..8ee1bb6 100644 --- a/src/main/java/com/health/service/PackLanTutorialResourceService.java +++ b/src/main/java/com/health/service/PackLanTutorialResourceService.java @@ -18,4 +18,7 @@ public interface PackLanTutorialResourceService { void saveAll(List packLanTutorialResourceList); + List findResourcesByTutorialAndPackageLanguage(Tutorial tutorial, + PackageLanguage packageLanguage); + } diff --git a/src/main/java/com/health/service/PackageLanguageService.java b/src/main/java/com/health/service/PackageLanguageService.java index d04d89e..b3f446b 100644 --- a/src/main/java/com/health/service/PackageLanguageService.java +++ b/src/main/java/com/health/service/PackageLanguageService.java @@ -24,4 +24,6 @@ public interface PackageLanguageService { List findAllByStatus(boolean value); + List findAllEnabledLanguagesByPackageContainer(PackageContainer packageContainer); + } diff --git a/src/main/java/com/health/service/impl/PackageLanguageServiceImpl.java b/src/main/java/com/health/service/impl/PackageLanguageServiceImpl.java index 260798d..a9412ad 100644 --- a/src/main/java/com/health/service/impl/PackageLanguageServiceImpl.java +++ b/src/main/java/com/health/service/impl/PackageLanguageServiceImpl.java @@ -65,4 +65,10 @@ public List findAllDistinctEnabledPackageContainers() { return packageList; } + @Override + public List findAllEnabledLanguagesByPackageContainer(PackageContainer packageContainer) { + + return repo.findAllEnabledLanguagesByPackageContainer(packageContainer); + } + } diff --git a/src/main/java/com/health/service/impl/VideoResourceServiceImpl.java b/src/main/java/com/health/service/impl/VideoResourceServiceImpl.java index fe53c06..8fc6d06 100644 --- a/src/main/java/com/health/service/impl/VideoResourceServiceImpl.java +++ b/src/main/java/com/health/service/impl/VideoResourceServiceImpl.java @@ -104,6 +104,7 @@ public void saveVideoResourcesFromCSV(MultipartFile file, Model model) String[] header = csvReader.readNext(); int fileNameColumn = -1; int thumbnailColumn = -1; + int sessionColumn = -1; int languageColumn = -1; @@ -119,10 +120,15 @@ public void saveVideoResourcesFromCSV(MultipartFile file, Model model) languageColumn = i; break; + case "Session": + sessionColumn = i; + break; + } + } - if (fileNameColumn == -1 || languageColumn == -1 || thumbnailColumn == -1) { + if (fileNameColumn == -1 || languageColumn == -1 || thumbnailColumn == -1 || sessionColumn == -1) { model.addAttribute("error_msg", "Some Errors Occurred; missing header FileName , thumnail,or language"); return; @@ -143,7 +149,8 @@ public void saveVideoResourcesFromCSV(MultipartFile file, Model model) rowIndex++; - if (!processRow(row, languageColumn, fileNameColumn, thumbnailColumn, model, videoResourceList)) { + if (!processRow(row, languageColumn, fileNameColumn, thumbnailColumn, sessionColumn, model, + videoResourceList)) { continue; } } @@ -168,8 +175,8 @@ public void saveVideoResourcesFromCSV(MultipartFile file, Model model) } } - private boolean processRow(String[] row, int languageColumn, int fileNameColumn, int thumbnailColumn, Model model, - List videoResourceList) { + private boolean processRow(String[] row, int languageColumn, int fileNameColumn, int thumbnailColumn, + int sessionColumn, Model model, List videoResourceList) { logger.info("Processing row: {}", Arrays.toString(row)); Language lan = lanService.getByLanName(row[languageColumn]); @@ -180,6 +187,7 @@ private boolean processRow(String[] row, int languageColumn, int fileNameColumn, String langName = lan.getLangName(); String fileName = row[fileNameColumn]; String thumbnailName = row[thumbnailColumn]; + String sessionName = row[sessionColumn]; boolean nonEmptyThumbnail = true; if (thumbnailName == null || thumbnailName.isEmpty()) { nonEmptyThumbnail = false; @@ -217,12 +225,16 @@ private boolean processRow(String[] row, int languageColumn, int fileNameColumn, if (thumbnailFile.exists() && nonEmptyThumbnail) videoResource.setThumbnailPath(thumnailPath); videoResource.setDateAdded(ServiceUtility.getCurrentTime()); + if (!sessionName.isEmpty()) + videoResource.setSessionName(sessionName); videoResourceList.add(videoResource); } else { if (thumbnailFile.exists() && nonEmptyThumbnail) { videoResource.setThumbnailPath(thumnailPath); + if (!sessionName.isEmpty()) + videoResource.setSessionName(sessionName); videoResource.setDateAdded(ServiceUtility.getCurrentTime()); videoResourceList.add(videoResource); } diff --git a/src/main/java/com/health/service/impl/packLanTutorialResourceServiceImpl.java b/src/main/java/com/health/service/impl/packLanTutorialResourceServiceImpl.java index 85243e5..0dc9ec5 100644 --- a/src/main/java/com/health/service/impl/packLanTutorialResourceServiceImpl.java +++ b/src/main/java/com/health/service/impl/packLanTutorialResourceServiceImpl.java @@ -48,4 +48,10 @@ public void saveAll(List packLanTutorialResourceList) { } + @Override + public List findResourcesByTutorialAndPackageLanguage(Tutorial tutorial, + PackageLanguage packageLanguage) { + return repo.findByTutorialAndPackageLanguage(tutorial, packageLanguage); + } + } diff --git a/src/main/java/com/health/threadpool/ZipCreationThreadService.java b/src/main/java/com/health/threadpool/ZipCreationThreadService.java index 293f475..209e5a5 100644 --- a/src/main/java/com/health/threadpool/ZipCreationThreadService.java +++ b/src/main/java/com/health/threadpool/ZipCreationThreadService.java @@ -185,10 +185,10 @@ private CompletableFuture createZip(String originalPackageName, String l String tutorialPath = temp.getVideoResource().getVideoPath(); String thumbnailPath = temp.getVideoResource().getThumbnailPath(); - String weekTitleVideoString = Integer.toString(temp.getWeekTitleVideoId()); + String sessionName = temp.getVideoResource().getSessionName(); Path destInationDirectoryforLanAndWeek = Paths.get(destInationDirectory1.toString(), File.separator, - langName, File.separator, weekName, File.separator, weekTitleVideoString); + langName, File.separator, weekName, File.separator, sessionName); try { ServiceUtility.createFolder(destInationDirectoryforLanAndWeek); } catch (IOException e) { @@ -398,19 +398,19 @@ private Map getTrainingModuleData(String weekName, String langNa if (tutWithWeekAndPacagekList.size() > 0) { for (TutorialWithWeekAndPackage temp : tutWithWeekAndPacagekList) { WeekTitleVideo weekTitleVideo = temp.getWeekTitle(); - int weekTitleVideoId = weekTitleVideo.getWeekTitleVideoId(); - String weekTitleVideoString = Integer.toString(weekTitleVideoId); + + String sessionName = weekTitleVideo.getVideoResource().getSessionName(); String title = weekTitleVideo.getTitle().replace(' ', '_'); String weekNameTemp = weekTitleVideo.getWeek().getWeekName().replace(' ', '_'); - Path sourcePath = Paths.get(langName, File.separator, weekNameTemp, File.separator, - weekTitleVideoString, File.separator, title + ".mp4"); + Path sourcePath = Paths.get(langName, File.separator, weekNameTemp, File.separator, sessionName, + File.separator, title + ".mp4"); String videoPath = sourcePath.toString(); weekTitleVideo.setIndexVideoPath(videoPath); Path sourcePathforThumbnail = Paths.get(langName, File.separator, weekNameTemp, File.separator, - weekTitleVideoString, File.separator, "thumbnail.jpg"); + sessionName, File.separator, "thumbnail.jpg"); String thumnailPath = sourcePathforThumbnail.toString(); String thumbnail = ServiceUtility.convertFilePathToUrl(thumnailPath); @@ -424,6 +424,9 @@ private Map getTrainingModuleData(String weekName, String langNa .comparingInt( (WeekTitleVideo wtv) -> ServiceUtility.extractInteger(wtv.getWeek().getWeekName())) .thenComparing(wtv -> wtv.getVideoResource().getLan().getLangName()) + .thenComparing( + Comparator.comparing((WeekTitleVideo wtv) -> wtv.getVideoResource().getSessionName(), + Comparator.nullsLast(Comparator.naturalOrder()))) .thenComparing(WeekTitleVideo::getTitle)); } diff --git a/src/main/resources/static/js/ajaxSupport.js b/src/main/resources/static/js/ajaxSupport.js index 979908b..257ebeb 100644 --- a/src/main/resources/static/js/ajaxSupport.js +++ b/src/main/resources/static/js/ajaxSupport.js @@ -317,7 +317,7 @@ $(document).ready(function() { $.ajax({ type : "GET", - url : projectPath+"enableDisablePacakgeAndPackLan", + url : projectPath+"enableDisablePacakgeLanguage", data : { "packLanId" : test_id }, @@ -352,7 +352,7 @@ $(document).ready(function() { $.ajax({ type : "GET", - url : projectPath+"enableDisablePacakgeAndPackLan", + url : projectPath+"enableDisablePacakgeLanguage", data : { "packLanId" : test_id }, @@ -4923,8 +4923,8 @@ $('#resourceCategoryId').on('change',function() { $(".logoToUpload").on('change', function() { var fileSize = this.files[0].size; - if(fileSize > 500000){ - alert("File size should be less than 5kB"); + if(fileSize > 10000000){ + alert("File size should be less than 10 MB"); this.value=""; return false; } diff --git a/src/main/resources/templates/addCategory.html b/src/main/resources/templates/addCategory.html index f467ab9..8eac344 100644 --- a/src/main/resources/templates/addCategory.html +++ b/src/main/resources/templates/addCategory.html @@ -70,8 +70,8 @@

Add Category

Logo * (Only png/jpeg/jpg format) - Max file size : 500 kB + accept=".jpg, .jpeg ,.png" required="required" onchange="validate_file_size(this, 10000000)"/> + Max file size : 10 MB
diff --git a/src/main/resources/templates/addPackage.html b/src/main/resources/templates/addPackage.html index 4ee6693..b27adc9 100644 --- a/src/main/resources/templates/addPackage.html +++ b/src/main/resources/templates/addPackage.html @@ -151,9 +151,9 @@

Create Package of Tutorials

- + name="categoryforPackage" > @@ -170,10 +170,10 @@

Create Package of Tutorials

To select all topics press ctrl + A keys.
- +
@@ -206,7 +206,7 @@

Create Package of Tutorials

- +
@@ -256,6 +256,7 @@

Create Package of Tutorials

Date Added Package + Action Language Enable/Disable WeekTitleVideo @@ -267,6 +268,7 @@

Create Package of Tutorials

+ Edit @@ -316,6 +318,7 @@

Create Package of Tutorials

Date Added Package + Action Language Tutorial @@ -327,6 +330,7 @@

Create Package of Tutorials

+ Edit diff --git a/src/main/resources/templates/addVideoResource.html b/src/main/resources/templates/addVideoResource.html index 0b16c5e..3f6836f 100644 --- a/src/main/resources/templates/addVideoResource.html +++ b/src/main/resources/templates/addVideoResource.html @@ -109,6 +109,7 @@

Add Video Resource

Date Added FileName + Session Language Video Thumbnail @@ -119,6 +120,7 @@

Add Video Resource

+
- +
diff --git a/src/main/resources/templates/updatePackageName.html b/src/main/resources/templates/updatePackageName.html new file mode 100644 index 0000000..9bf0da8 --- /dev/null +++ b/src/main/resources/templates/updatePackageName.html @@ -0,0 +1,83 @@ + + + + + + +
+
+
+
+
+
+
+
+ + +
+ + +
+
+
+
+

Update Package Name

+
+
+
+
+
+
+ + +
+ + + + +
+
+
+
+
+ + +
+ +
+
+
+
+ +
+ + + + + + + + \ No newline at end of file