Changeset 1493:10ad6c13c906
- Timestamp:
- 08/20/13 11:45:52 (11 years ago)
- Branch:
- twig
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r1492 r1493 171 171 'maxlength' => 255, 172 172 'required' => true, 173 'label' => __('Title '))))173 'label' => __('Title:')))) 174 174 ->addField( 175 175 new dcFieldTextArea('post_excerpt','', array( 176 176 'cols' => 50, 177 177 'rows' => 5, 178 'label' => __("Excerpt:")))) 178 'label' => __("Excerpt:").'<span class="form-note">'. 179 __('Add an introduction to the post.').'</span>'))) 179 180 ->addField( 180 181 new dcFieldTextArea('post_content','', array( … … 267 268 $form->can_edit_post = $post->isEditable(); 268 269 $form->can_delete= $post->isDeletable(); 270 $next_rs = $core->blog->getNextPost($post,1); 271 $prev_rs = $core->blog->getNextPost($post,-1); 272 273 if ($next_rs !== null) { 274 $_ctx->next_post = array('id' => $next_rs->post_id,'title' => $next_rs->post_title); 275 } 276 if ($prev_rs !== null) { 277 $_ctx->prev_post = array('id' => $prev_rs->post_id,'title' => $prev_rs->post_title); 278 } 269 279 $page_title = __('Edit entry'); 270 280 … … 348 358 )) 349 359 ->default_tab = $default_tab; 350 360 $_ctx->post_status = $form->post_status; 361 $_ctx->post_title = $form->post_title; 362 if ($form->post_status == 1) { 363 $_ctx->post_url = $post->getURL(); 364 } 351 365 352 366 -
inc/admin/default-templates/post.html.twig
r1491 r1493 13 13 <img alt="{{title}}" title="{{title}}" src="images/{{src}}" /> 14 14 {%- endmacro %} 15 {% macro post_link(id,title,link) -%} 16 <a href="post.php?id={{id}}" title="{{title}}">{{link}}</a> 17 {%- endmacro %} 18 15 19 {% block header %} 16 20 {{ parent() }} … … 26 30 {% block content %} 27 31 {{ parent() }} 32 {% if post_id and post_status == 1 %} 33 <p><a class="onblog_link" href="{{post_url}}" onclick="window.open(this.href);return false;" title="{{post_title}}"> {{__('Go to this entry on the site') }} <img src="images/outgoing-blue.png" alt="" /></a></p> 34 {% endif %} 35 {% if post_id %} 36 <p class="nav_prevnext"> 37 {% if prev_post %} 38 {{ _self.post_link(prev_post.id,prev_post.title,'« '~__('Previous entry')) }} 39 {% endif %} 40 {% if next_post %} 41 {{ _self.post_link(next_post.id,next_post.title,__('Next entry')~' »') }} 42 {% endif %} 43 </p> 44 {% endif %} 28 45 29 46 <div class="multi-part" title="{{__('Edit entry')}}" id="edit-entry"> 30 {% form 'post' %}47 {% form 'post' with {'id':'entry-form'} %} 31 48 <div id="entry-wrapper"> 32 49 <div id="entry-content"> 33 50 <div class="constrained"> 51 <h3 class="hidden">Edit post</h3> 34 52 {% for bl in main_blocks %} 35 53 {{ block(bl) }} … … 86 104 87 105 {% block post_title -%} 88 <p class="col">{{ form_field('post_title',{'class':'maximal'} ) }}</p>106 <p class="col">{{ form_field('post_title',{'class':'maximal'},{"labelclass":"no-margin"}) }}</p> 89 107 {%- endblock %} 90 108
Note: See TracChangeset
for help on using the changeset viewer.