Merge branch '8-navigation' into 'master'
Resolve "Создать утилитарный класс для навигации" Closes #8 See merge request romanov73/git-extractor!15merge-requests/14/merge
commit
d2f4363b64
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Anton Romanov - All Rights Reserved
|
||||
* You may use, distribute and modify this code, please write to: romanov73@gmail.com.
|
||||
*/
|
||||
|
||||
package ru.ulstu.extractor.controller;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class Route {
|
||||
public static final String LIST_INDEXED_REPOSITORIES = "listRepositories";
|
||||
public static final String LIST_REPOSITORY_BRANCHES = "listBranches";
|
||||
public static final String INDEXING_NEW_REPOSITORY = "indexNewRepository";
|
||||
public static final String FILTER_COMMITS = "filterCommits";
|
||||
|
||||
public static String getLIST_INDEXED_REPOSITORIES() {
|
||||
return LIST_INDEXED_REPOSITORIES;
|
||||
}
|
||||
|
||||
public static String getLIST_REPOSITORY_BRANCHES() {
|
||||
return LIST_REPOSITORY_BRANCHES;
|
||||
}
|
||||
|
||||
public static String getINDEXING_NEW_REPOSITORY() {
|
||||
return INDEXING_NEW_REPOSITORY;
|
||||
}
|
||||
|
||||
public static String getFILTER_COMMITS() {
|
||||
return FILTER_COMMITS;
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{default}">
|
||||
<head>
|
||||
<title>Простая обработка формы на Spring MVC</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
<div class="container" layout:fragment="content">
|
||||
<h1>Форма</h1>
|
||||
<form action="#" th:action="@{/sendEmail}" th:object="${emailForm}" method="post">
|
||||
<p style="color:red" th:text="${error}"></p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Тема:</td>
|
||||
<td><input type="text" th:field="*{subject}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Кому:</td>
|
||||
<td><input type="text" th:field="*{to}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Сообщение:</td>
|
||||
<td><textarea th:field="*{message}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="submit" value="Отправить"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</html>
|
@ -1,13 +1,14 @@
|
||||
<!--
|
||||
~ Copyright (C) 2021 Anton Romanov - All Rights Reserved
|
||||
~ You may use, distribute and modify this code, please write to: romanov73@gmail.com.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{default}">
|
||||
<head>
|
||||
<title>Индексировать новый репозиторий</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
<div class="container" layout:fragment="content">
|
||||
<form action="#" th:action="@{/newRepo}" th:object="${repoForm}" method="post">
|
||||
<form action="#" th:action="${@route.INDEXING_NEW_REPOSITORY}" th:object="${repoForm}" method="post">
|
||||
<p style="color:red" th:text="${error}"></p>
|
||||
<button class="btn btn-outline-dark dropdown-toggle" type="button" data-toggle="collapse"
|
||||
data-target="#collapseOne" aria-expanded="false" aria-controls="collapseExample"
|
@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||
<html
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{default}">
|
||||
<head>
|
||||
<title>Простая обработка формы на Spring MVC</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
<div class="container" layout:fragment="content">
|
||||
<body>
|
||||
<form oninput="result">
|
||||
<p>Данные репозитория:</p>
|
||||
<p>
|
||||
<output name="result"></output>
|
||||
</form>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
Loading…
Reference in New Issue