Skip to content

Commit

Permalink
More Language-ized updates to news module [#296]
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Nov 8, 2011
1 parent b8b82cd commit 45e1c3c
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 48 deletions.
63 changes: 63 additions & 0 deletions framework/core/lang/English - US.php

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions framework/modules/news/views/news/configure/news.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*
*}

<h2>Configure this News Module</h2>
<h2>{'Configure this News Module'|gettext}</h2>
{*control type=dropdown name=order label="Sort Order" items="$sortopts" value=$config.order*}
{control type="checkbox" name="only_featured" label="Only show Featured News Items" value=1 checked=$config.only_featured}
{control type="radiogroup" name="usebody" label="Body Text"|gettext value=$config.usebody|default:0 items="Full,Summary,None" values="0,1,2"}
{control type="checkbox" name="only_featured" label="Only show Featured News Items"|gettext value=1 checked=$config.only_featured}
{control type="radiogroup" name="usebody" label="Body Text"|gettext value=$config.usebody|default:0 items="Full,Summary,None"|gettext values="0,1,2"}

7 changes: 3 additions & 4 deletions framework/modules/news/views/news/configure/rss_pull.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
<div id="rsspullControl" class="control">
<h2>{"Add RSS Feeds"|gettext}</h2>
{control type="text" id="feedmaker" name="feedmaker" label="Add RSS Feed"}
<a class="addtolist" href="#">Add to list</a>
<a class="addtolist" href="#">{'Add to list'|gettext}</a>
<h4>{"Current Feeds"|gettext}</h4>
<ul id="rsspull-feeds">
{foreach from=$config.pull_rss item=feed}
{if $feed!=""}<li>{control type="hidden" name="pull_rss[]" value=$feed}{$feed} - <a class="delete removerss" href="#">{"Remove"|gettext}</a></li>{/if}
{foreachelse}
<li id="norssfeeds">You don't have any RSS feeds configured</li>
<li id="norssfeeds">{'You don\'t have any RSS feeds configured'|gettext}</li>
{/foreach}
</ul>

{script unique="rssfeedpicker" yui3mods=1}
{literal}
YUI(EXPONENT.YUI3_CONFIG).use('node','yui2-yahoo-dom-event', function(Y) {
Expand Down Expand Up @@ -62,8 +63,6 @@
list.removeChild(lItem);
});
});


{/literal}
{/script}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
*
*}

<h2>Configure Headlines View</h2>
{control type="checkbox" name="hidedate" label="Hide the date?"|gettext checked=$config.hidedate value=1}
<h2>{'Configure Headlines View'|gettext}</h2>
{control type="checkbox" name="hidedate" label="Hide the date"|gettext|cat:"?" checked=$config.hidedate value=1}
36 changes: 18 additions & 18 deletions framework/modules/news/views/news/edit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,43 @@
{/css}

<div id="newsedit" class="module news edit">
{if $record->id != ""}<h1>Editing {$record->title}</h1>{else}<h1>Create News Post</h1>{/if}
{if $record->id != ""}<h1>{'Editing'|gettext} {$record->title}</h1>{else}<h1>{'New'|gettext} {$modelname}</h1>{/if}
{form action=update}
{control type=hidden name=id value=$record->id}
<div id="newsedit-tabs" class="yui-navset yui3-skin-sam hide">
<ul class="yui-nav">
<li class="selected"><a href="#tab1"><em>Post</em></a></li>
<li><a href="#tab2"><em>Publish</em></a></li>
<li><a href="#tab3"><em>Files</em></a></li>
<li><a href="#tab5"><em>SEO</em></a></li>
<li class="selected"><a href="#tab1"><em>{'Post'|gettext}</em></a></li>
<li><a href="#tab2"><em>{'Publish'|gettext}</em></a></li>
<li><a href="#tab3"><em>{'Files'|gettext}</em></a></li>
<li><a href="#tab5"><em>{'SEO'|gettext}</em></a></li>
</ul>
<div class="yui-content">
<div id="tab1">
{control type=text name=title label="Title" value=$record->title}
{control type="editor" name="body" label="Body" value=$record->body}
{control type="checkbox" name="is_featured" label="Feature this news post?" value=1 checked=$record->is_featured}
{control type=text name=title label="Title"|gettext value=$record->title}
{control type="editor" name="body" label="Body"|gettext value=$record->body}
{control type="checkbox" name="is_featured" label="Feature this news post"|gettext|cat:"?" value=1 checked=$record->is_featured}
{if $config.enable_ealerts}
{control type="checkbox" name="send_ealerts" label="Send E-Alerts?" value=1}
{control type="checkbox" name="send_ealerts" label="Send E-Alerts"|gettext|cat:"?" value=1}
{/if}
</div>
<div id="tab2">
{control type="yuidatetimecontrol" name="publish" label="Publish Date" edit_text="Publish Immediately" value=$record->publish}
{control type="yuidatetimecontrol" name="unpublish" label="Un-publish Date" edit_text="Do Not Un-Publish" value=$record->unpublish}
{control type="yuidatetimecontrol" name="publish" label="Publish Date"|gettext edit_text="Publish Immediately" value=$record->publish}
{control type="yuidatetimecontrol" name="unpublish" label="Un-publish Date"|gettext edit_text="Do Not Un-Publish" value=$record->unpublish}
</div>
<div id="tab3">
{control type=files name=images label="Attachable Files" value=$record->expFile}
{control type=files name=images label="Attachable Files"|gettext value=$record->expFile}
</div>
<div id="tab5">
<h2>SEO Settings</h2>
{control type="text" name="sef_url" label="SEF URL" value=$record->sef_url}
{control type="text" name="meta_title" label="Meta Title" value=$record->meta_title}
{control type="textarea" name="meta_keywords" label="Meta Keywords" rows=5 cols=35 value=$record->meta_keywords}
{control type="textarea" name="meta_description" label="Meta Description" rows=5 cols=35 value=$record->meta_description}
<h2>{'SEO Settings'|gettext}</h2>
{control type="text" name="sef_url" label="SEF URL"|gettext value=$record->sef_url}
{control type="text" name="meta_title" label="Meta Title"|gettext value=$record->meta_title}
{control type="textarea" name="meta_keywords" label="Meta Keywords"|gettext rows=5 cols=35 value=$record->meta_keywords}
{control type="textarea" name="meta_description" label="Meta Description"|gettext rows=5 cols=35 value=$record->meta_description}
</div>
</div>
</div>
<div class="loadingdiv">{"Loading News Item"|gettext}</div>
{control type=buttongroup submit="Save News Post" cancel="Cancel"}
{control type=buttongroup submit="Save News Post"|gettext cancel="Cancel"|gettext}
{/form}
</div>

Expand Down
4 changes: 2 additions & 2 deletions framework/modules/news/views/news/show.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
{permissions}
<div class="item-actions">
{if $permissions.edit == true}
{icon action=edit record=$record title="Edit this news post"}
{icon action=edit record=$record}
{/if}
{if $permissions.delete == true}
{icon action=delete record=$record title="Delete this news post" onclick="return confirm('Are you sure you want to delete `$record->title`?');"}
{icon action=delete record=$record}
{/if}
</div>
{/permissions}
Expand Down
10 changes: 5 additions & 5 deletions framework/modules/news/views/news/showExpired.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*}

<div class="module news show-expired">
<h1>{$moduletitle|default:"Expired News"}</h1>
<h1>{$moduletitle|default:"Expired News"|gettext}</h1>
{pagelinks paginate=$page top=1}
<table id="prods">
<thead>
<tr>
{$page->header_columns}
<th>Admin</th>
<th>{'Admin'|gettext}</th>
</tr>
</thead>
<tbody>
Expand All @@ -34,17 +34,17 @@
{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
<div class="item-actions">
{if $permissions.edit == true}
{icon action=edit record=$listing title="Edit this news post"}
{icon action=edit record=$listing}
{/if}
{if $permissions.delete == true}
{icon action=delete record=$listing title="Delete this news post" onclick="return confirm('Are you sure you want to delete `$item->title`?');"}
{icon action=delete record=$listing}
{/if}
</div>
{/permissions}
</td>
</tr>
{foreachelse}
<td colspan=3>There is no expired news.</td>
<td colspan=3>{'There is no expired news'|gettext}.</td>
{/foreach}
</tbody>
</table>
Expand Down
14 changes: 7 additions & 7 deletions framework/modules/news/views/news/showUnpublished.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
{/css}

<div class="module news show-expired">
<h1>{$moduletitle|default:"Expired News"}</h1>
<h1>{$moduletitle|default:"Expired News"|gettext}</h1>
{pagelinks paginate=$page top=1}
<table id="prods" class="exp-skin-table" width="95%">
<thead>
<tr>
{$page->header_columns}
<th>Actions</th>
<th>{'Actions'|gettext}</th>
</tr>
</thead>
<tbody>
Expand All @@ -35,26 +35,26 @@
<td>{$listing->publish|format_date:"%B %e, %Y"}</td>
<td>
{if $listing->unpublish == 0}
Unpublished
{'Unpublished'|gettext}
{else}
Expired - {$listing->unpublish|format_date:"%B %e, %Y"}
{'Expired'|gettext} - {$listing->unpublish|format_date:"%B %e, %Y"}
{/if}
</td>
<td>
{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
<div class="item-actions">
{if $permissions.edit == true}
{icon action=edit record=$listing title="Edit this news post"}
{icon action=edit record=$listing}
{/if}
{if $permissions.delete == true}
{icon action=delete record=$listing title="Delete this news post" onclick="return confirm('Are you sure you want to delete `$item->title`?');"}
{icon action=delete record=$listing}
{/if}
</div>
{/permissions}
</td>
</tr>
{foreachelse}
<td colspan=3>There is no expired news.</td>
<td colspan=3>{'There is no expired news'|gettext}.</td>
{/foreach}
</tbody>
</table>
Expand Down
8 changes: 4 additions & 4 deletions framework/modules/news/views/news/showall.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<div class="module news showall">
{if $enable_rss == true}
<a class="rsslink" href="{rsslink}">Subscribe to {$config.feed_title}</a>
<a class="rsslink" href="{rsslink}">{'Subscribe to'|gettext} {$config.feed_title}</a>
{/if}
{if $moduletitle}<h1>{$moduletitle}</h1>{/if}

Expand All @@ -26,7 +26,7 @@
<a class="add" href="{link action=create}">{"Add a news post"|gettext}</a>
{/if}
{if $permissions.showUnpublished == 1 }
| <a class="view" href="{link action=showUnpublished}">{"View Expired/Unpublished News"|gettext}</a>
| <a class="view" href="{link action=showUnpublished}">{"View Expired/Unpublished News"|gettext}</a>
{/if}
</div>
{/permissions}
Expand All @@ -43,10 +43,10 @@
{permissions}
<div class="item-actions">
{if $permissions.edit == true}
{icon action=edit record=$item title="Edit News Post"}
{icon action=edit record=$item}
{/if}
{if $permissions.delete == true}
{icon action=delete record=$item title="Delete News Post" onclick="return confirm('Are you sure you want to delete `$item->title`?');"}
{icon action=delete record=$item}
{/if}
</div>
{/permissions}
Expand Down
6 changes: 3 additions & 3 deletions framework/modules/news/views/news/showall_headlines.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div class="module news headlines">
{if $enable_rss == true}
<a class="rsslink" href="{rsslink}">Subscribe to {$config.feed_title}</a>
<a class="rsslink" href="{rsslink}">{'Subscribe to'|gettext} {$config.feed_title}</a>
{/if}
{if $moduletitle != ""}<h2>{$moduletitle}</h2>{/if}

Expand Down Expand Up @@ -52,10 +52,10 @@
{permissions}
<div class="item-actions">
{if $permissions.edit == true}
{icon action=edit record=$item title="Edit this news post"}
{icon action=edit record=$item}
{/if}
{if $permissions.delete == true}
{icon action=delete record=$item title="Delete this news post" onclick="return confirm('Are you sure you want to delete `$item->title`?');"}
{icon action=delete record=$item}
{/if}
{if $permissions.edit == true && $config.order == 'rank ASC'}
{if $smarty.foreach.items.first == 0}
Expand Down

0 comments on commit 45e1c3c

Please sign in to comment.