Index: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js |
— | — | @@ -83,15 +83,16 @@ |
84 | 84 | ) //TODO |
85 | 85 | .appendTo( $header ); |
86 | 86 | |
87 | | - $storyBody.append( $( "<div />" ).addClass( "story-text" ) |
88 | | - .text( story["*"] ) |
89 | | - .prepend( $( "<img />" ) |
90 | | - // TODO: replace by wgScriptPath + path/to/scropped/img |
91 | | - .attr( "src", "http://upload.wikimedia.org/wikipedia/mediawiki/9/99/SemanticMaps.png" ) |
92 | | - .addClass( "story-image" ) |
93 | | - ) |
94 | | - ); |
| 87 | + var textAndImg = $( "<div />" ).addClass( "story-text" ).text( story["*"] ); |
95 | 88 | |
| 89 | + if ( story.imageurl ) { |
| 90 | + textAndImg.prepend( |
| 91 | + $( "<img />" ).attr( "src", story.imageurl ).addClass( "story-image" ) |
| 92 | + ); |
| 93 | + } |
| 94 | + |
| 95 | + $storyBody.append( textAndImg ); |
| 96 | + |
96 | 97 | // TODO: add delete button that hides the story from the storyboard (=unpublish+hide?) |
97 | 98 | |
98 | 99 | $storyboard.append( $storyBody ); |
Index: trunk/extensions/Storyboard/api/ApiQueryStories.php |
— | — | @@ -49,7 +49,9 @@ |
50 | 50 | $this->addTables( 'storyboard' ); |
51 | 51 | $this->addFields( array( |
52 | 52 | 'story_id', |
| 53 | + 'story_author_id', |
53 | 54 | 'story_author_name', |
| 55 | + 'story_author_image', |
54 | 56 | 'story_title', |
55 | 57 | 'story_text', |
56 | 58 | 'story_created' |
— | — | @@ -91,6 +93,7 @@ |
92 | 94 | 'author' => $story->story_author_name, |
93 | 95 | 'title' => $story->story_title, |
94 | 96 | 'created' => wfTimestamp( TS_ISO_8601, $story->story_created ), |
| 97 | + 'imageurl' => $story->story_author_image |
95 | 98 | ); |
96 | 99 | ApiResult::setContent( $res, ( is_null( $story->story_text ) ? '' : $story->story_text ) ); |
97 | 100 | $this->getResult()->addValue( array( 'query', $this->getModuleName() ), null, $res ); |