Skip to content

Commit

Permalink
re #76 factorized the view in media/
Browse files Browse the repository at this point in the history
  • Loading branch information
allan-simon committed Jul 5, 2013
1 parent b943bb6 commit d51feb0
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 151 deletions.
2 changes: 1 addition & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.6)
project(tatowiki)

# set the version
set(PROJECT_VERSION "0.20.1")
set(PROJECT_VERSION "0.20.2")
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
add_custom_target(
dist
Expand Down
41 changes: 41 additions & 0 deletions app/src/views/webs/commons/media/list_all.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<% c++ #include "contents/Media.h" %>
<% skin %>
<% view common_media_list_all uses contents::media::ListAll extends master %>
<% template title() %><% gt "All uploaded files" %><% end template %>


<% template main_content() %>
<% include begin_module() %>
<h1><% gt "All uploaded files" %></h1>
<% foreach file in files %>
<ul>
<% item %>
<li>
<a href="<%= file.URLname %>">
<%= file.name %>
</a>
( <%= file.URLname %> )
</li>
<% end %>
</ul>
<% end foreach %>
<% include end_module() %>
<% end template %>

<% template annexe_content() %>
<% include begin_module() %>
<h2><%gt "Actions" %></h2>

<ul class="annexeMenu">
<li>
<a href="upload-image">
<%gt "Upload a new image" %>
</a>
</li>
</ul>
<% include end_module() %>
<% end template %>


<% end view %>
<% end skin %>
44 changes: 44 additions & 0 deletions app/src/views/webs/commons/media/upload_image.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<% c++ #include "contents/Media.h" %>
<% skin %>
<% view common_media_upload_image uses contents::media::UploadImage extends master %>
<% template title() %><% gt "Upload an image" %><% end template %>

<% template main_content() %>
<% include begin_module() %>
<h2><% gt "Upload an image" %></h2>
<form
method="POST"
action="/media/upload-image_treat"
id="upload_image_form"
enctype="multipart/form-data"
>
<table class='input'>
<% include widget_row(uploadImageForm.image) %>
</table>
<div class="submit">
<% form input uploadImageForm.submit %>
</div>
</form>
<% include end_module() %>
<% end template %>

<% template annexe_content() %>
<% include begin_module() %>
<h2><%gt "Actions" %></h2>

<ul class="annexeMenu">
<li>
<a href="list-all">
<%gt "View all images" %>
</a>
</li>
</ul>
<% include end_module() %>
<% end template %>





<% end view %>
<% end skin %>
37 changes: 1 addition & 36 deletions app/src/views/webs/responsive/media/list_all.tmpl
Original file line number Diff line number Diff line change
@@ -1,41 +1,6 @@
<% c++ #include "contents/Media.h" %>
<% skin %>
<% view media_list_all uses contents::media::ListAll extends master %>
<% template title() %><% gt "All uploaded files" %><% end template %>


<% template main_content() %>
<% include begin_module() %>
<h1><% gt "All uploaded files" %></h1>
<% foreach file in files %>
<ul>
<% item %>
<li>
<a href="<%= file.URLname %>">
<%= file.name %>
</a>
( <%= file.URLname %> )
</li>
<% end %>
</ul>
<% end foreach %>
<% include end_module() %>
<% end template %>

<% template annexe_content() %>
<% include begin_module() %>
<h2><%gt "Actions" %></h2>

<ul class="annexeMenu">
<li>
<a href="upload-image">
<%gt "Upload a new image" %>
</a>
</li>
</ul>
<% include end_module() %>
<% end template %>

<% view media_list_all uses contents::media::ListAll extends common_media_list_all %>

<% end view %>
<% end skin %>
40 changes: 1 addition & 39 deletions app/src/views/webs/responsive/media/upload_image.tmpl
Original file line number Diff line number Diff line change
@@ -1,44 +1,6 @@
<% c++ #include "contents/Media.h" %>
<% skin %>
<% view media_upload_image uses contents::media::UploadImage extends master %>
<% template title() %><% gt "Upload an image" %><% end template %>

<% template main_content() %>
<% include begin_module() %>
<h2><% gt "Upload an image" %></h2>
<form
method="POST"
action="/media/upload-image_treat"
id="upload_image_form"
enctype="multipart/form-data"
>
<table class='input'>
<% include widget_row(uploadImageForm.image) %>
</table>
<div class="submit">
<% form input uploadImageForm.submit %>
</div>
</form>
<% include end_module() %>
<% end template %>

<% template annexe_content() %>
<% include begin_module() %>
<h2><%gt "Actions" %></h2>

<ul class="annexeMenu">
<li>
<a href="list-all">
<%gt "View all images" %>
</a>
</li>
</ul>
<% include end_module() %>
<% end template %>




<% view media_upload_image uses contents::media::UploadImage extends common_media_upload_image %>

<% end view %>
<% end skin %>
37 changes: 1 addition & 36 deletions app/src/views/webs/tatoeba/media/list_all.tmpl
Original file line number Diff line number Diff line change
@@ -1,41 +1,6 @@
<% c++ #include "contents/Media.h" %>
<% skin %>
<% view media_list_all uses contents::media::ListAll extends master %>
<% template title() %><% gt "All uploaded files" %><% end template %>

<% template main_content() %>
<% include begin_module() %>
<h1><% gt "All uploaded files" %></h1>
<% foreach file in files %>
<ul>
<% item %>
<li>
<a href="<%= file.URLname %>">
<%= file.name %>
</a>
( <%= file.URLname %> )
</li>
<% end %>
</ul>
<% end foreach %>
<% include end_module() %>
<% end template %>

<% template annexe_content() %>
<% include begin_module() %>
<h2><%gt "Actions" %></h2>

<ul class="annexeMenu">
<li>
<a href="upload-image">
<%gt "Upload a new image" %>
</a>
</li>
</ul>
<% include end_module() %>
<% end template %>


<% view media_list_all uses contents::media::ListAll extends common_media_list_all %>

<% end view %>
<% end skin %>
40 changes: 1 addition & 39 deletions app/src/views/webs/tatoeba/media/upload_image.tmpl
Original file line number Diff line number Diff line change
@@ -1,44 +1,6 @@
<% c++ #include "contents/Media.h" %>
<% skin %>
<% view media_upload_image uses contents::media::UploadImage extends master %>
<% template title() %><% gt "Upload an image" %><% end template %>

<% template main_content() %>
<% include begin_module() %>
<h2><% gt "Upload an image" %></h2>
<form
method="POST"
action="/media/upload-image_treat"
id="upload_image_form"
enctype="multipart/form-data"
>
<table class='input'>
<% include widget_row(uploadImageForm.image) %>
</table>
<div class="submit">
<% form input uploadImageForm.submit %>
</div>
</form>
<% include end_module() %>
<% end template %>

<% template annexe_content() %>
<% include begin_module() %>
<h2><%gt "Actions" %></h2>

<ul class="annexeMenu">
<li>
<a href="list-all">
<%gt "View all images" %>
</a>
</li>
</ul>
<% include end_module() %>
<% end template %>




<% view media_upload_image uses contents::media::UploadImage extends common_media_upload_image %>

<% end view %>
<% end skin %>

0 comments on commit d51feb0

Please sign in to comment.