diff options
author | you | 2017-05-27 13:43:47 +0300 |
---|---|---|
committer | you | 2017-05-27 13:43:47 +0300 |
commit | 97e743385c94ac8a6084726d499c33373e255177 (patch) | |
tree | 0077987e3ecabe939f5a0595b07a6ca4ca25577b /juick-www/src/main/webapp | |
parent | 6273f6ae0842f34b0c6863cf98b6f6c4cd3cd314 (diff) |
juick-www: cleanup templates
Diffstat (limited to 'juick-www/src/main/webapp')
6 files changed, 39 insertions, 39 deletions
diff --git a/juick-www/src/main/webapp/WEB-INF/views/blog.html b/juick-www/src/main/webapp/WEB-INF/views/blog.html index f68ebf3e..a47e952a 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/blog.html +++ b/juick-www/src/main/webapp/WEB-INF/views/blog.html @@ -39,12 +39,12 @@ {% if not readonly %} <nav class="l"> {% if visitor.uid > 0 %} - <a href="/post?body=!+%23{{ msg.getMid() }}" class="a-like">{{ i18n("messages","message.recommend") }}</a> + <a href="/post?body=!+%23{{ msg.mid }}" class="a-like">{{ i18n("messages","message.recommend") }}</a> {% else %} <a href="/login" class="a-login">{{ i18n("messages","message.recommend") }}</a> {% endif %} {% if visitor.uid > 0 and (not msg.ReadOnly or visitor.uid == msg.user.uid) %} - <a href="/{{ msg.getMid() }}" class="a-comment">{{ i18n("messages","message.comment") }}</a> + <a href="/{{ msg.mid }}" class="a-comment">{{ i18n("messages","message.comment") }}</a> {% elseif visitor.uid == 0 and not msg.ReadOnly %} <a href="/login" class="a-login">{{ i18n("messages","message.comment") }}</a> {% endif %} @@ -60,11 +60,11 @@ {% endif %} <nav class="s"> {% if msg.Likes > 0 %} - <a href="/{{ msg.getUser().getName() }}/{{ msg.getMid() }}" class="likes"> + <a href="/{{ msg.user.name }}/{{ msg.mid }}" class="likes"> <i data-icon="ei-heart" data-size="s"></i> {{ msg.Likes }}</a> {% endif %} {% if msg.Replies > 0 %} - <a href="/{{ msg.getUser().getName() }}/{{ msg.getMid() }}" class="replies"> + <a href="/{{ msg.user.name }}/{{ msg.mid }}" class="replies"> <i data-icon="ei-comment" data-size="s"></i> {{ msg.Replies }}</a> {% endif %} </nav> diff --git a/juick-www/src/main/webapp/WEB-INF/views/index.html b/juick-www/src/main/webapp/WEB-INF/views/index.html index 88178cc5..05ee25c5 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/index.html +++ b/juick-www/src/main/webapp/WEB-INF/views/index.html @@ -8,16 +8,16 @@ {% include "views/partial/newmessage" %} {% endif %} {% for msg in msgs %} -<article data-mid="{{ msg.getMid() }}"> - <header class="h">@<a href="/{{ msg.getUser().getName() }}/">{{ msg.getUser().getName() }}</a>: - <div class="msg-avatar"><a href="/{{ msg.getUser().getName() }}/"> - <img src="//i.juick.com/a/{{ msg.getUser().getUid() }}.png" alt="{{ msg.getUser().getName() }}"/></a></div> +<article data-mid="{{ msg.mid }}"> + <header class="h">@<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>: + <div class="msg-avatar"><a href="/{{ msg.user.name }}/"> + <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/></a></div> <div class="msg-menu"><a href="#"></a></div> <div class="msg-ts"> - <a href="/{{ msg.getUser().getName() }}/{{ msg.getMid() }}"> - <time datetime="{{ msg.getDate() | date('yyyy-MM-dd HH:mm:ss')}}Z" - title="{{msg.getDate() | date('yyyy-MM-dd HH:mm:ss')}} GMT"> - {{ msg.getDate() | prettyTime }} + <a href="/{{ msg.user.name }}/{{ msg.mid }}"> + <time datetime="{{ msg.date | date('yyyy-MM-dd HH:mm:ss')}}Z" + title="{{msg.date | date('yyyy-MM-dd HH:mm:ss')}} GMT"> + {{ msg.date | prettyTime }} </time> </a> </div> @@ -27,8 +27,8 @@ </header> <p>{{ msg | formatMessage }}</p> {% if msg.AttachmentType is not empty %} - <p class="ir"><a href="//i.juick.com/p/{{ msg.getMid() }}.{{ msg.AttachmentType }}" data-fname="{{ msg.getMid() }}.{{ msg.AttachmentType }}"> - <img src="//i.juick.com/photos-512/{{ msg.getMid() }}.{{ msg.AttachmentType }}" alt=""/></a> + <p class="ir"><a href="//i.juick.com/p/{{ msg.mid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}.{{ msg.AttachmentType }}"> + <img src="//i.juick.com/photos-512/{{ msg.mid }}.{{ msg.AttachmentType }}" alt=""/></a> </p> {% endif %} {% if msg.AttachmentType is not empty %} @@ -37,12 +37,12 @@ {% if not readonly %} <nav class="l"> {% if visitor.uid > 0 %} - <a href="/post?body=!+%23{{ msg.getMid() }}" class="a-like">{{ i18n("messages","message.recommend") }}</a> + <a href="/post?body=!+%23{{ msg.mid }}" class="a-like">{{ i18n("messages","message.recommend") }}</a> {% else %} <a href="/login" class="a-login">{{ i18n("messages","message.recommend") }}</a> {% endif %} {% if visitor.uid > 0 and (not msg.ReadOnly or visitor.uid == msg.user.uid) %} - <a href="/{{ msg.getMid() }}" class="a-comment">{{ i18n("messages","message.comment") }}</a> + <a href="/{{ msg.mid }}" class="a-comment">{{ i18n("messages","message.comment") }}</a> {% elseif visitor.uid == 0 and not msg.ReadOnly %} <a href="/login" class="a-login">{{ i18n("messages","message.comment") }}</a> {% endif %} @@ -58,11 +58,11 @@ {% endif %} <nav class="s"> {% if msg.Likes > 0 %} - <a href="/{{ msg.getUser().getName() }}/{{ msg.getMid() }}" class="likes"> + <a href="/{{ msg.user.name }}/{{ msg.mid }}" class="likes"> <i data-icon="ei-heart" data-size="s"></i> {{ msg.Likes }}</a> {% endif %} {% if msg.Replies > 0 %} - <a href="/{{ msg.getUser().getName() }}/{{ msg.getMid() }}" class="replies"> + <a href="/{{ msg.user.name }}/{{ msg.mid }}" class="replies"> <i data-icon="ei-comment" data-size="s"></i> {{ msg.Replies }}</a> {% endif %} </nav> diff --git a/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html b/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html index d360a651..ef327734 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html +++ b/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html @@ -6,19 +6,19 @@ <li class="msg"> <div class="msg-cont"> <div class="msg-header"> - @<a href="/{{ msg.getUser().getName() }}/">{{ msg.getUser().getName() }}</a>: + @<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>: <div class="msg-avatar"> - <a href="/{{ msg.getUser().getName() }}/"> - <img src="//i.juick.com/a/{{ msg.getUser().getUID() }}.png" alt="{{ msg.getUser().getName() }}"/> + <a href="/{{ msg.user.name }}/"> + <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/> </a> </div> - <div class="msg-ts">{{ msg.getDate() }}</div> + <div class="msg-ts">{{ msg.date }}</div> </div> <div class="msg-txt">{{ msg | formatMessage }}</div> {% if not readonly %} <form action="/pm/send" method="POST" enctype="multipart/form-data"> - <input type="hidden" name="uname" value="{{ msg.getUser().getName() }}"/> + <input type="hidden" name="uname" value="{{ msg.user.name }}"/> <div class="msg-comment"> <div class="ta-wrapper"> <textarea name="body" rows="1" class="replypm" placeholder="Написать ответ"></textarea> diff --git a/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html b/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html index 5a3daa1d..cd1a4a94 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html +++ b/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html @@ -15,13 +15,13 @@ <li class="msg"> <div class="msg-cont"> <div class="msg-header"> - @<a href="/{{ msg.getUser().getName() }}/">{{ msg.getUser().getName() }}</a>: + @<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>: <div class="msg-avatar"> - <a href="/{{ msg.getUser().getName() }}/"> - <img src="//i.juick.com/a/{{ msg.getUser().getUID() }}.png" alt="{{ msg.getUser().getName() }}"/> + <a href="/{{ msg.user.name }}/"> + <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/> </a> </div> - <div class="msg-ts">{{ msg.getDate() }}</div> + <div class="msg-ts">{{ msg.date }}</div> </div> <div class="msg-txt">{{ msg | formatMessage }}</div> </div> diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_about.html b/juick-www/src/main/webapp/WEB-INF/views/settings_about.html index a11a1609..04f82b58 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/settings_about.html +++ b/juick-www/src/main/webapp/WEB-INF/views/settings_about.html @@ -2,12 +2,12 @@ {% block content %} <article> <form action="/settings" method="POST" enctype="multipart/form-data"> - <p>Full name: <input type="text" name="fullname" value="{{ userinfo.getFullName() }}"/></p> - <p>Country: <input type="text" name="country" value="{{ userinfo.getCountry() }}"/></p> - <p>URL: <input type="text" name="url" value="{{ userinfo.getUrl() }}" size="32"/><br/> + <p>Full name: <input type="text" name="fullname" value="{{ userinfo.fullName }}"/></p> + <p>Country: <input type="text" name="country" value="{{ userinfo.country }}"/></p> + <p>URL: <input type="text" name="url" value="{{ userinfo.url }}" size="32"/><br/> <small>Please, start with "http://"</small></p> <p>About:<br/> - <input type="text" name="descr" value="{{ userinfo.getDescription() }}" style="width: 100%"/><br/> + <input type="text" name="descr" value="{{ userinfo.description }}" style="width: 100%"/><br/> <small>Max. 255 symbols</small></p> <p>Avatar: <input type="file" name="avatar"/><br/> <small>Recommendations: PNG, 96x96, <50Kb. Also, JPG and GIF supported.</small></p> diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_main.html b/juick-www/src/main/webapp/WEB-INF/views/settings_main.html index 39c6d875..7a95f2a9 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/settings_main.html +++ b/juick-www/src/main/webapp/WEB-INF/views/settings_main.html @@ -5,11 +5,11 @@ <form action="/settings" method="POST" enctype="multipart/form-data"> <fieldset> <legend>Notification options</legend> - <p><input type="checkbox" name="jnotify" value="1" {% if notify_options.isRepliesEnabled() %} + <p><input type="checkbox" name="jnotify" value="1" {% if notify_options.repliesEnabled %} checked="checked" {% endif %}/> Reply notifications ("Message posted")</p> - <p><input type="checkbox" name="subscr_notify" value="1" {% if notify_options.isSubscriptionsEnabled() %} + <p><input type="checkbox" name="subscr_notify" value="1" {% if notify_options.subscriptionsEnabled %} checked="checked" {% endif %}/> Subscriptions notifications ("@user subscribed...")</p> - <p><input type="checkbox" name="recomm" value="1" {% if notify_options.isRecommendationsEnabled() %} + <p><input type="checkbox" name="recomm" value="1" {% if notify_options.recommendationsEnabled %} checked="checked" {% endif %}/> Posts recommendations ("Recommended by @user")</p> <p><input type="hidden" name="page" value="main"/><input type="submit" value=" OK "/></p> </fieldset> @@ -41,7 +41,7 @@ {% endfor %} {% for auth in auths %} <label><input type="radio" name="delete" - value="xmpp-unauth;{{ auth.getAccount() }}">{{ auth.getAccount() }}</label> + value="xmpp-unauth;{{ auth.account }}">{{ auth.account }}</label> — <a href="#" onclick="alert(\'To confirm, please send "AUTH {{ auth.getAuthCode() }}" (without quotes) from this account to "juick@juick.com".\'); return false;">Confirm</a><br/> {% endfor %} @@ -83,13 +83,13 @@ Sent to <select name="account"> <option value="">Disabled</option> {% for email in emails %} - <option value="{{ email }}" {% if eopts.getEmail()== email %} selected="selected" {% endif %}> + <option value="{{ email }}" {% if eopts.email == email %} selected="selected" {% endif %}> {{ email }} </option> {% endfor %} </select> every day at <select name="time"> {% for hour in hours %} - <option value="{{ hour }}" {% if eopts.getSubscriptionHour() == hour %} selected="selected" {% + <option value="{{ hour }}" {% if eopts.subscriptionHour == hour %} selected="selected" {% endif %}> {{ hour }}:00 GMT </option> @@ -111,8 +111,8 @@ <legend style="background: url(//static.juick.com/settings/facebook.png) no-repeat; padding-left: 58px; line-height: 48px;"> Facebook </legend> - {% if fbstatus.isConnected() %} - {% if fbstatus.isCrosspostEnabled() %} + {% if fbstatus.connected %} + {% if fbstatus.crosspostEnabled %} <form action="/settings" method="post"> <div> Facebook: <b>Enabled</b> — |