diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index a9b0252..a1dc0f2 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.6) project(tatowiki) # set the version -set(PROJECT_VERSION "0.20.3") +set(PROJECT_VERSION "0.20.4") set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}) add_custom_target( dist diff --git a/app/src/views/webs/commons/history/all_versions_of.tmpl b/app/src/views/webs/commons/history/all_versions_of.tmpl new file mode 100644 index 0000000..73176e2 --- /dev/null +++ b/app/src/views/webs/commons/history/all_versions_of.tmpl @@ -0,0 +1,61 @@ +<% c++ #include "contents/History.h" %> +<% skin %> +<% view common_history_all_versions_of uses contents::history::AllVersionsOf extends master %> +<% template title() %><% gt "Article's history" %><% end template %> + + +<% template main_content() %> +<% include begin_module() %> + <% foreach change in changes %> + + <% end foreach %> +<% include end_module () %> +<% end template %> + + +<% template annexe_content() %> +<% include begin_module() %> +

<%gt "Actions" %>

+ + +<% include end_module () %> +<% end template %> + + + +<% end view %> +<% end skin %> diff --git a/app/src/views/webs/commons/history/diff_between.tmpl b/app/src/views/webs/commons/history/diff_between.tmpl new file mode 100644 index 0000000..10c6ce0 --- /dev/null +++ b/app/src/views/webs/commons/history/diff_between.tmpl @@ -0,0 +1,18 @@ +<% c++ #include "contents/History.h" %> +<% skin %> +<% view common_history_diff_between uses contents::history::DiffBetween extends master %> +<% template title() %><% gt "TODO TITLE" %><% end template %> + + +<% template body() %> + Edit Me History / DiffBetween +
" > + <% form as_p diffBetweenForm %> +
+<% end template %> + + + +<% end view %> +<% end skin %> + diff --git a/app/src/views/webs/commons/history/recent_changes.tmpl b/app/src/views/webs/commons/history/recent_changes.tmpl new file mode 100644 index 0000000..b0ee842 --- /dev/null +++ b/app/src/views/webs/commons/history/recent_changes.tmpl @@ -0,0 +1,61 @@ +<% c++ #include "contents/History.h" %> +<% skin %> +<% view common_history_recent_changes uses contents::history::RecentChanges extends master %> +<% template title() %><% gt "Recent changes" %><% end template %> + +/** + * + */ +<% template history_of_url( std::string const& slug) %>/history/all-versions-of/<%= slug %><% end template %> + + +/** + * + */ +<% template diff_with_previous_of_url( int const& articleId, int const& version) %>/history/diff-with-previous-version-of/<%= articleId %>/<%= version %><% end template %> + + + + +<% template main_content() %> +<% include begin_module() %> +

<% gt "Recent changes" %>

+ + <% foreach version in articlesVersions %> + + <% end foreach %> +<% include end_module () %> +<% end template %> + +/** + * @brief TODO maybe put some texts there + */ +<% template annexe_content() %> +<% end template %> + + +<% end view %> +<% end skin %> diff --git a/app/src/views/webs/commons/history/revert_to_version.tmpl b/app/src/views/webs/commons/history/revert_to_version.tmpl new file mode 100644 index 0000000..3c6ac4b --- /dev/null +++ b/app/src/views/webs/commons/history/revert_to_version.tmpl @@ -0,0 +1,14 @@ +<% c++ #include "contents/History.h" %> +<% skin %> +<% view common_history_revert_to_version uses contents::history::RevertToVersion extends master %> +<% template title() %><% gt "TODO TITLE" %><% end template %> + + +<% template body() %> + Edit Me History / RevertToVersion +<% end template %> + + + +<% end view %> +<% end skin %> diff --git a/app/src/views/webs/commons/history/show_diff_between.tmpl b/app/src/views/webs/commons/history/show_diff_between.tmpl new file mode 100644 index 0000000..6095292 --- /dev/null +++ b/app/src/views/webs/commons/history/show_diff_between.tmpl @@ -0,0 +1,74 @@ +<% c++ #include "contents/History.h" %> +<% skin %> +<% view common_history_show_diff_between uses contents::history::ShowDiffBetween extends master %> +<% template title() %><% gt "Difference between version {1} and {2} " using oldVersion, newVersion %><% end template %> + +/** + * + */ +<% template main_content() %> +<% include begin_module() %> +
+

<% gt "Version at: {1,dt=s}" using diff.oldVersionTime %>

+
<%= diff.oldContent %>
+

<% gt "version at: {1,dt=s}" using diff.newVersionTime %>

+
<%= diff.newContent %>
+<% include end_module () %> +<% end template %> + + +<% template annexe_content() %> +<% include begin_module() %> +

<% gt "Note" %>

+

+ <% gt "The lines in green are the lines that have been added in the new version." %> + <% gt "The lines in red are those that have been removed." %> +

+<% include end_module () %> +<% include begin_module() %> +

<%gt "Actions" %>

+ + +<% include end_module () %> +<% end template %> + +/** + * + */ +<% template local_css() %> + <%include css_link("external/diffview.css") %> +<% end template %> + +/** + * + */ +<% template footer_js() %> + <% include js_link("external/difflib.js") %> + <% include js_link("external/diffview.js") %> + <% include js_link("diffpage.js") %> +<% end template %> + + +<% end view %> +<% end skin %> diff --git a/app/src/views/webs/commons/history/show_version.tmpl b/app/src/views/webs/commons/history/show_version.tmpl new file mode 100644 index 0000000..c61b2ae --- /dev/null +++ b/app/src/views/webs/commons/history/show_version.tmpl @@ -0,0 +1,53 @@ +<% c++ #include "contents/History.h" %> +<% skin %> +<% view common_history_show_version uses contents::history::ShowVersion extends master %> +//TODO +<% template title() %><% gt "Previous version" %><% end template %> + +<% template main_content() %> +<% include begin_module() %> +

<% gt "Notice" %>

+ <% gt "This page show a previous version of the article" %> +<% include end_module () %> + +<% include begin_module() %> + <%= articleVersion.article.content | ext markdown %> +<% include end_module () %> +<% end template %> + + +<% template annexe_content() %> +<% include begin_module() %> +

<%gt "Actions" %>

+ + +<% include end_module () %> +<% end template %> + + + + + +<% end view %> +<% end skin %> diff --git a/app/src/views/webs/responsive/history/all_versions_of.tmpl b/app/src/views/webs/responsive/history/all_versions_of.tmpl index 9fb228b..c944bb6 100644 --- a/app/src/views/webs/responsive/history/all_versions_of.tmpl +++ b/app/src/views/webs/responsive/history/all_versions_of.tmpl @@ -1,61 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_all_versions_of uses contents::history::AllVersionsOf extends master %> -<% template title() %><% gt "Article's history" %><% end template %> - - -<% template main_content() %> -<% include begin_module() %> - <% foreach change in changes %> - - <% end foreach %> -<% include end_module () %> -<% end template %> - - -<% template annexe_content() %> -<% include begin_module() %> -

<%gt "Actions" %>

- - -<% include end_module () %> -<% end template %> - - +<% view history_all_versions_of uses contents::history::AllVersionsOf extends common_history_all_versions_of %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/responsive/history/diff_between.tmpl b/app/src/views/webs/responsive/history/diff_between.tmpl index e4fa439..61f3831 100644 --- a/app/src/views/webs/responsive/history/diff_between.tmpl +++ b/app/src/views/webs/responsive/history/diff_between.tmpl @@ -1,17 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_diff_between uses contents::history::DiffBetween extends master %> -<% template title() %><% gt "TODO TITLE" %><% end template %> - - -<% template body() %> - Edit Me History / DiffBetween -
" > - <% form as_p diffBetweenForm %> -
-<% end template %> - - +<% view history_diff_between uses contents::history::DiffBetween extends common_history_diff_between %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/responsive/history/recent_changes.tmpl b/app/src/views/webs/responsive/history/recent_changes.tmpl index a059ab0..1dafe15 100644 --- a/app/src/views/webs/responsive/history/recent_changes.tmpl +++ b/app/src/views/webs/responsive/history/recent_changes.tmpl @@ -1,61 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_recent_changes uses contents::history::RecentChanges extends master %> -<% template title() %><% gt "Recent changes" %><% end template %> - -/** - * - */ -<% template history_of_url( std::string const& slug) %>/history/all-versions-of/<%= slug %><% end template %> - - -/** - * - */ -<% template diff_with_previous_of_url( int const& articleId, int const& version) %>/history/diff-with-previous-version-of/<%= articleId %>/<%= version %><% end template %> - - - - -<% template main_content() %> -<% include begin_module() %> -

<% gt "Recent changes" %>

- - <% foreach version in articlesVersions %> - - <% end foreach %> -<% include end_module () %> -<% end template %> - -/** - * @brief TODO maybe put some texts there - */ -<% template annexe_content() %> -<% end template %> - +<% view history_recent_changes uses contents::history::RecentChanges extends common_history_recent_changes %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/responsive/history/revert_to_version.tmpl b/app/src/views/webs/responsive/history/revert_to_version.tmpl index 0c44286..0f59219 100644 --- a/app/src/views/webs/responsive/history/revert_to_version.tmpl +++ b/app/src/views/webs/responsive/history/revert_to_version.tmpl @@ -1,14 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_revert_to_version uses contents::history::RevertToVersion extends master %> -<% template title() %><% gt "TODO TITLE" %><% end template %> - - -<% template body() %> - Edit Me History / RevertToVersion -<% end template %> - - +<% view history_revert_to_version uses contents::history::RevertToVersion extends common_history_revert_to_version %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/responsive/history/show_diff_between.tmpl b/app/src/views/webs/responsive/history/show_diff_between.tmpl index 3ad9d78..a7bdfdb 100644 --- a/app/src/views/webs/responsive/history/show_diff_between.tmpl +++ b/app/src/views/webs/responsive/history/show_diff_between.tmpl @@ -1,74 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_show_diff_between uses contents::history::ShowDiffBetween extends master %> -<% template title() %><% gt "Difference between version {1} and {2} " using oldVersion, newVersion %><% end template %> - -/** - * - */ -<% template main_content() %> -<% include begin_module() %> -
-

<% gt "Version at: {1,dt=s}" using diff.oldVersionTime %>

-
<%= diff.oldContent %>
-

<% gt "version at: {1,dt=s}" using diff.newVersionTime %>

-
<%= diff.newContent %>
-<% include end_module () %> -<% end template %> - - -<% template annexe_content() %> -<% include begin_module() %> -

<% gt "Note" %>

-

- <% gt "The lines in green are the lines that have been added in the new version." %> - <% gt "The lines in red are those that have been removed." %> -

-<% include end_module () %> -<% include begin_module() %> -

<%gt "Actions" %>

- - -<% include end_module () %> -<% end template %> - -/** - * - */ -<% template local_css() %> - <%include css_link("external/diffview.css") %> -<% end template %> - -/** - * - */ -<% template footer_js() %> - <% include js_link("external/difflib.js") %> - <% include js_link("external/diffview.js") %> - <% include js_link("diffpage.js") %> -<% end template %> - +<% view history_show_diff_between uses contents::history::ShowDiffBetween extends common_history_show_diff_between %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/responsive/history/show_version.tmpl b/app/src/views/webs/responsive/history/show_version.tmpl index 94e915b..7fdce7c 100644 --- a/app/src/views/webs/responsive/history/show_version.tmpl +++ b/app/src/views/webs/responsive/history/show_version.tmpl @@ -1,53 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_show_version uses contents::history::ShowVersion extends master %> -//TODO -<% template title() %><% gt "Previous version" %><% end template %> - -<% template main_content() %> -<% include begin_module() %> -

<% gt "Notice" %>

- <% gt "This page show a previous version of the article" %> -<% include end_module () %> - -<% include begin_module() %> - <%= articleVersion.article.content | ext markdown %> -<% include end_module () %> -<% end template %> - - -<% template annexe_content() %> -<% include begin_module() %> -

<%gt "Actions" %>

- - -<% include end_module () %> -<% end template %> - - - - +<% view history_show_version uses contents::history::ShowVersion extends common_history_show_version %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/tatoeba/history/all_versions_of.tmpl b/app/src/views/webs/tatoeba/history/all_versions_of.tmpl index bb08cd3..c944bb6 100644 --- a/app/src/views/webs/tatoeba/history/all_versions_of.tmpl +++ b/app/src/views/webs/tatoeba/history/all_versions_of.tmpl @@ -1,61 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_all_versions_of uses contents::history::AllVersionsOf extends master %> -<% template title() %><% gt "Article's history" %><% end template %> - - -<% template main_content() %> -
- <% foreach change in changes %> - - <% end foreach %> -
-<% end template %> - - -<% template annexe_content() %> -
-

<%gt "Actions" %>

- - -
-<% end template %> - - +<% view history_all_versions_of uses contents::history::AllVersionsOf extends common_history_all_versions_of %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/tatoeba/history/diff_between.tmpl b/app/src/views/webs/tatoeba/history/diff_between.tmpl index e4fa439..61f3831 100644 --- a/app/src/views/webs/tatoeba/history/diff_between.tmpl +++ b/app/src/views/webs/tatoeba/history/diff_between.tmpl @@ -1,17 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_diff_between uses contents::history::DiffBetween extends master %> -<% template title() %><% gt "TODO TITLE" %><% end template %> - - -<% template body() %> - Edit Me History / DiffBetween -
" > - <% form as_p diffBetweenForm %> -
-<% end template %> - - +<% view history_diff_between uses contents::history::DiffBetween extends common_history_diff_between %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/tatoeba/history/recent_changes.tmpl b/app/src/views/webs/tatoeba/history/recent_changes.tmpl index 0a9125e..1dafe15 100644 --- a/app/src/views/webs/tatoeba/history/recent_changes.tmpl +++ b/app/src/views/webs/tatoeba/history/recent_changes.tmpl @@ -1,61 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_recent_changes uses contents::history::RecentChanges extends master %> -<% template title() %><% gt "Recent changes" %><% end template %> - -/** - * - */ -<% template history_of_url( std::string const& slug) %>/history/all-versions-of/<%= slug %><% end template %> - - -/** - * - */ -<% template diff_with_previous_of_url( int const& articleId, int const& version) %>/history/diff-with-previous-version-of/<%= articleId %>/<%= version %><% end template %> - - - - -<% template main_content() %> -
-

<% gt "Recent changes" %>

- - <% foreach version in articlesVersions %> - - <% end foreach %> -
-<% end template %> - -/** - * @brief TODO maybe put some texts there - */ -<% template annexe_content() %> -<% end template %> - +<% view history_recent_changes uses contents::history::RecentChanges extends common_history_recent_changes %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/tatoeba/history/revert_to_version.tmpl b/app/src/views/webs/tatoeba/history/revert_to_version.tmpl index 0c44286..0f59219 100644 --- a/app/src/views/webs/tatoeba/history/revert_to_version.tmpl +++ b/app/src/views/webs/tatoeba/history/revert_to_version.tmpl @@ -1,14 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_revert_to_version uses contents::history::RevertToVersion extends master %> -<% template title() %><% gt "TODO TITLE" %><% end template %> - - -<% template body() %> - Edit Me History / RevertToVersion -<% end template %> - - +<% view history_revert_to_version uses contents::history::RevertToVersion extends common_history_revert_to_version %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/tatoeba/history/show_diff_between.tmpl b/app/src/views/webs/tatoeba/history/show_diff_between.tmpl index a53d078..a7bdfdb 100644 --- a/app/src/views/webs/tatoeba/history/show_diff_between.tmpl +++ b/app/src/views/webs/tatoeba/history/show_diff_between.tmpl @@ -1,75 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_show_diff_between uses contents::history::ShowDiffBetween extends master %> -<% template title() %><% gt "Difference between version {1} and {2} " using oldVersion, newVersion %><% end template %> - -/** - * - */ -<% template main_content() %> -
-
-

<% gt "Version at: {1,dt=s}" using diff.oldVersionTime %>

-
<%= diff.oldContent %>
-

<% gt "version at: {1,dt=s}" using diff.newVersionTime %>

-
<%= diff.newContent %>
- -
-<% end template %> - - -<% template annexe_content() %> -
-

<% gt "Note" %>

-

- <% gt "The lines in green are the lines that have been added in the new version." %> - <% gt "The lines in red are those that have been removed." %> -

-
-
-

<%gt "Actions" %>

- - -
-<% end template %> - -/** - * - */ -<% template css() %> - <%include css_link("external/diffview.css") %> -<% end template %> - -/** - * - */ -<% template footer_js() %> - <% include js_link("external/difflib.js") %> - <% include js_link("external/diffview.js") %> - <% include js_link("diffpage.js") %> -<% end template %> - +<% view history_show_diff_between uses contents::history::ShowDiffBetween extends common_history_show_diff_between %> <% end view %> <% end skin %> diff --git a/app/src/views/webs/tatoeba/history/show_version.tmpl b/app/src/views/webs/tatoeba/history/show_version.tmpl index b2bc5b7..7fdce7c 100644 --- a/app/src/views/webs/tatoeba/history/show_version.tmpl +++ b/app/src/views/webs/tatoeba/history/show_version.tmpl @@ -1,54 +1,6 @@ <% c++ #include "contents/History.h" %> <% skin %> -<% view history_show_version uses contents::history::ShowVersion extends master %> -//TODO -<% template title() %><% gt "Previous version" %><% end template %> - -<% template main_content() %> - -
-

<% gt "Notice" %>

- <% gt "This page show a previous version of the article" %> -
- -
- <%= articleVersion.article.content | ext markdown %> -
-<% end template %> - - -<% template annexe_content() %> -
-

<%gt "Actions" %>

- - -
-<% end template %> - - - - +<% view history_show_version uses contents::history::ShowVersion extends common_history_show_version %> <% end view %> <% end skin %>