jsf initial
13
build.gradle
@ -117,11 +117,12 @@ dependencies {
|
|||||||
|
|
||||||
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
|
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
|
||||||
|
|
||||||
compile group: 'org.webjars', name: 'bootstrap', version: '4.1.0'
|
//primefaces
|
||||||
compile group: 'org.webjars', name: 'bootstrap-select', version: '1.13.3'
|
compile group: 'org.primefaces', name: 'primefaces', version: '7.0'
|
||||||
compile group: 'org.webjars', name: 'jquery', version: '3.3.1-1'
|
compile group: 'net.bootsfaces', name: 'bootsfaces', version: '1.4.2'
|
||||||
compile group: 'org.webjars.npm', name: 'jquery.easing', version: '1.4.1'
|
compile group: 'org.joinfaces', name: 'jsf-spring-boot-starter', version: '4.0.8'
|
||||||
compile group: 'org.webjars', name: 'font-awesome', version: '4.7.0'
|
compile group: 'org.javassist', name: 'javassist', version: '3.25.0-GA'
|
||||||
|
compile group: 'org.primefaces.themes', name: 'all-themes', version: '1.0.10'
|
||||||
|
|
||||||
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.6.0'
|
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.6.0'
|
||||||
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.6.0'
|
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.6.0'
|
||||||
@ -132,4 +133,4 @@ dependencies {
|
|||||||
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-support', version: '3.3.1'
|
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-support', version: '3.3.1'
|
||||||
//testCompile group: 'com.google.guava', name: 'guava', version: '21.0'
|
//testCompile group: 'com.google.guava', name: 'guava', version: '21.0'
|
||||||
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
|
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package ru.ulstu.configuration;
|
package ru.ulstu.configuration;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
||||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
@ -9,20 +8,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
public class MvcConfiguration implements WebMvcConfigurer {
|
public class MvcConfiguration implements WebMvcConfigurer {
|
||||||
@Override
|
@Override
|
||||||
public void addViewControllers(ViewControllerRegistry registry) {
|
public void addViewControllers(ViewControllerRegistry registry) {
|
||||||
registry.addViewController("/{articlename:\\w+}");
|
registry.addRedirectViewController("/", "/index.xhtml");
|
||||||
registry.addViewController("/admin/{articlename:\\w+}");
|
registry.addRedirectViewController("/default", "/index.xhtml");
|
||||||
registry.addViewController("/papers/{articlename:\\w+}");
|
|
||||||
registry.addViewController("/grants/{articlename:\\w+}");
|
|
||||||
registry.addViewController("/conferences/{articlename:\\w+}");
|
|
||||||
registry.addViewController("/students/{articlename:\\w+}");
|
|
||||||
registry.addRedirectViewController("/", "/index");
|
|
||||||
registry.addRedirectViewController("/default", "/index");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
|
||||||
registry
|
|
||||||
.addResourceHandler("/webjars/**")
|
|
||||||
.addResourceLocations("/webjars/");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
27
src/main/java/ru/ulstu/index/controller/IndexView.java
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package ru.ulstu.index.controller;
|
||||||
|
|
||||||
|
import ru.ulstu.index.model.Section;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import javax.faces.view.ViewScoped;
|
||||||
|
import javax.inject.Named;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Named
|
||||||
|
@ViewScoped
|
||||||
|
public class IndexView {
|
||||||
|
private List<Section> sections = new ArrayList<>();
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
sections.add(new Section("Статьи", "papers.jpg"));
|
||||||
|
sections.add(new Section("Гранты", "grants.jpg"));
|
||||||
|
sections.add(new Section("Проекты", "projects.jpg"));
|
||||||
|
sections.add(new Section("Проекты", "projects.jpg"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Section> getSections() {
|
||||||
|
return sections;
|
||||||
|
}
|
||||||
|
}
|
27
src/main/java/ru/ulstu/index/model/Section.java
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package ru.ulstu.index.model;
|
||||||
|
|
||||||
|
public class Section {
|
||||||
|
private String title;
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
public Section(String title, String image) {
|
||||||
|
this.title = title;
|
||||||
|
this.image = image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage(String image) {
|
||||||
|
this.image = image;
|
||||||
|
}
|
||||||
|
}
|
24
src/main/resources/META-INF/resources/basicTemplate.xhtml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:h="http://java.sun.com/jsf/html"
|
||||||
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
|
|
||||||
|
<h:head>
|
||||||
|
<title>Fuzzy logic</title>
|
||||||
|
<h:outputStylesheet name="css/style.css"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||||
|
</h:head>
|
||||||
|
|
||||||
|
<h:body>
|
||||||
|
<div class="ui-g">
|
||||||
|
<div class="ui-g-2"></div>
|
||||||
|
<div class="ui-g-8">
|
||||||
|
<div class="ui-fluid">
|
||||||
|
<ui:insert name="content">Content</ui:insert>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h:body>
|
||||||
|
</html>
|
7
src/main/resources/META-INF/resources/css/style.css
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.ui-picklist-list-wrapper {
|
||||||
|
width: 50% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-picklist-list {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
BIN
src/main/resources/META-INF/resources/img/conference/back.png
Normal file
After Width: | Height: | Size: 307 B |
BIN
src/main/resources/META-INF/resources/img/conference/delete.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
src/main/resources/META-INF/resources/img/conference/edit.png
Normal file
After Width: | Height: | Size: 254 B |
BIN
src/main/resources/META-INF/resources/img/conference/paper.png
Normal file
After Width: | Height: | Size: 597 B |
BIN
src/main/resources/META-INF/resources/img/header-bg.jpg
Normal file
After Width: | Height: | Size: 539 KiB |
BIN
src/main/resources/META-INF/resources/img/main/ajax-loader.gif
Normal file
After Width: | Height: | Size: 673 B |
BIN
src/main/resources/META-INF/resources/img/main/career.jpg
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
src/main/resources/META-INF/resources/img/main/conf.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
src/main/resources/META-INF/resources/img/main/grants.jpg
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
src/main/resources/META-INF/resources/img/main/papers.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
src/main/resources/META-INF/resources/img/main/projects.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
src/main/resources/META-INF/resources/img/main/students.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
src/main/resources/META-INF/resources/img/main/tasks.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
src/main/resources/META-INF/resources/img/main/team.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
src/main/resources/META-INF/resources/img/main/templates.jpg
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
src/main/resources/META-INF/resources/img/map-image.png
Normal file
After Width: | Height: | Size: 356 KiB |
18
src/main/resources/META-INF/resources/index.xhtml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html">
|
||||||
|
<ui:composition template="/basicTemplate.xhtml">
|
||||||
|
<ui:define name="content">
|
||||||
|
<p:dataGrid id="sections" var="section" value="#{indexView.sections}" columns="3" layout="grid"
|
||||||
|
style="text-align:center">
|
||||||
|
<p:panel id="pnl" header="#{section.title}" style="text-align:center;">
|
||||||
|
<h:panelGrid columns="1" style="width:100%;">
|
||||||
|
<p:graphicImage style="width:100%" name="img/main/#{section.image}"/>
|
||||||
|
</h:panelGrid>
|
||||||
|
</p:panel>
|
||||||
|
</p:dataGrid>
|
||||||
|
</ui:define>
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
@ -14,6 +14,9 @@ server.ssl.key-password=password
|
|||||||
logging.level.ru.ulstu=DEBUG
|
logging.level.ru.ulstu=DEBUG
|
||||||
#HtmlUnit
|
#HtmlUnit
|
||||||
logging.level.com.gargoylesoftware.htmlunit=ERROR
|
logging.level.com.gargoylesoftware.htmlunit=ERROR
|
||||||
|
#jsf
|
||||||
|
joinfaces.primefaces.theme=bootstrap
|
||||||
|
joinfaces.primefaces.font-awesome=true
|
||||||
# Mail Settings
|
# Mail Settings
|
||||||
spring.mail.host=smtp.yandex.ru
|
spring.mail.host=smtp.yandex.ru
|
||||||
spring.mail.port=465
|
spring.mail.port=465
|
||||||
|